Skip to content

Commit

Permalink
Build linux binaries in 18.04 docker container
Browse files Browse the repository at this point in the history
Bump node version to 18.16.0 (latest version that has arm64 windows builds) and use 18.16.1 nodejs unofficial-builds on 18.04 dockerfile. Official nodejs 18+ requires GLIBC 2.28 (bionic has 2.27).

Add electron dependencies for checking with unit tests as well.
  • Loading branch information
theofficialgman committed Jul 8, 2023
1 parent 0fe3ab1 commit 52208d9
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ jobs:
build:
name: ${{ matrix.friendlyName }} ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
container: ${{ matrix.image }}
permissions:
contents: write
strategy:
fail-fast: false
matrix:
node: [18.14.0]
node: [18.16.0]
os: [macos-11, windows-2019, ubuntu-20.04]
arch: [x64, arm64]
include:
Expand All @@ -51,20 +52,50 @@ jobs:
friendlyName: Windows
- os: ubuntu-20.04
friendlyName: Ubuntu
image: ubuntu:18.04
timeout-minutes: 60
env:
RELEASE_CHANNEL: ${{ inputs.environment }}
steps:
- name: Install dependencies into dockerfile on Ubuntu
if: matrix.os == 'ubuntu-20.04'
run: |
# ubuntu dockerfile is very minimal (only 122 packages are installed)
# add dependencies expected by scripts
apt update
apt install -y software-properties-common lsb-release \
sudo wget curl build-essential jq autoconf automake \
pkg-config ca-certificates rpm \
# add electron dependencies
apt install -y libasound2 libatk-bridge2.0-0 libatk1.0-0 \
libatspi2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libdrm2 \
libexpat1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 \
libnss3 libpango-1.0-0 libx11-6 libxcb1 libxcomposite1 \
libxdamage1 libxext6 libxfixes3 libxkbcommon0 libxrandr2 \
libsecret-1-0
# install new enough git to run actions/checkout
sudo add-apt-repository ppa:git-core/ppa -y
sudo apt update
sudo apt install -y git
# avoid "fatal: detected dubious ownership in repository at '/__w/shiftkey/desktop'" error
git config --global --add safe.directory '*'
- uses: actions/checkout@v3
with:
repository: ${{ inputs.repository || github.repository }}
ref: ${{ inputs.ref }}
submodules: recursive
- name: Use Node.js ${{ matrix.node }}
if: matrix.os != 'ubuntu-20.04'
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: yarn
- name: Install unofficial-builds Node.js 18.16.1 on Ubuntu
if: matrix.os == 'ubuntu-20.04'
run: |
# this version supports older GLIBC (official builds required a minimum of GLIBC 2.28)
curl -sL 'https://unofficial-builds.nodejs.org/download/release/v18.16.1/node-v18.16.1-linux-x64-glibc-217.tar.xz' | xzcat | sudo tar -vx --strip-components=1 -C /usr/local/
sudo npm install --global yarn
# This step can be removed as soon as official Windows arm64 builds are published:
# https://github.com/nodejs/build/issues/2450#issuecomment-705853342
Expand Down

0 comments on commit 52208d9

Please sign in to comment.