Skip to content

Commit 3acdef3

Browse files
hack version of node to allow checkout to run on older glibc
1 parent cd78539 commit 3acdef3

1 file changed

Lines changed: 20 additions & 5 deletions

File tree

.github/workflows/build.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,33 @@ jobs:
1717
container:
1818
image: ubuntu:16.04
1919
options: --user root
20+
volumes:
21+
# override /__e/node20 because GitHub Actions uses a version that requires too-recent glibc
22+
# see "Install node.js for GitHub Actions" below
23+
- /tmp:/__e/node20
2024

2125
steps:
26+
- name: Install dependencies
27+
run: |
28+
add-apt-repository ppa:git-core/ppa -y
29+
apt update
30+
apt install -y wget curl git build-essential cmake ca-certificates
31+
apt install -y libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev libwayland-dev libxkbcommon-dev
32+
33+
2234
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
35+
- name: hack node
36+
run: |
37+
# Install a Node.js version that works in older Ubuntu containers (read: does not require very recent glibc)
38+
NODE_VERSION=v20.18.1 &&
39+
NODE_TAR_FILE=node-$NODE_VERSION-linux-x64-glibc-217.tar.gz &&
40+
NODE_URL=https://unofficial-builds.nodejs.org/download/release/$NODE_VERSION/$NODE_TAR_FILE &&
41+
curl -Lo /tmp/$NODE_TAR_FILE $NODE_URL &&
42+
tar -C /__e/node20 -x --strip-components=1 -f /tmp/$NODE_TAR_FILE
2343
- uses: actions/checkout@v2
2444
with:
2545
submodules: recursive
2646

27-
- name: Install dependencies
28-
run: |
29-
apt update
30-
apt install -y wget curl git build-essential cmake
31-
apt install -y libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev libwayland-dev libxkbcommon-dev
3247

3348
- name: Setup Java 8
3449
run: |

0 commit comments

Comments
 (0)