Skip to content

Commit

Permalink
fix(ci): install Node.js 20 needed by newer GitHub Actions runner
Browse files Browse the repository at this point in the history
The actions/download-artifact action is failing with the following
message:

    /__e/node20/bin/node: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found (required by /__e/node20/bin/node)

The problem is that GitHub Actions is dropping Node.js 16 support [1],
and their Node.js 20 binary is too new for our Ubuntu 18.04 Docker
images.

Install our own copy of Node.js 20 which is compatible with Ubuntu
18.04.

[1] https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/
  • Loading branch information
strager committed Aug 18, 2024
1 parent 503ac6d commit e816b84
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/build-static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ jobs:
- {runs_on: ubuntu-latest, docker_container: "debian:buster", name: "Debian 10 Buster", archive_name: "linux", exe_file: "bin/quick-lint-js"}
- {runs_on: ubuntu-latest, docker_container: "fedora:35", name: "Fedora 35", archive_name: "linux", exe_file: "bin/quick-lint-js"}
- {runs_on: ubuntu-latest, docker_container: "fedora:36", name: "Fedora 36", archive_name: "linux", exe_file: "bin/quick-lint-js"}
- {runs_on: ubuntu-latest, docker_container: "ubuntu:18.04", name: "Ubuntu 18.04 LTS Bionic", archive_name: "linux", exe_file: "bin/quick-lint-js"}
- {runs_on: ubuntu-latest, docker_container: "ubuntu:18.04", name: "Ubuntu 18.04 LTS Bionic", archive_name: "linux", exe_file: "bin/quick-lint-js", install_node_20_ubuntu: true}
- {runs_on: ubuntu-latest, docker_container: "ubuntu:20.04", name: "Ubuntu 20.04 LTS Focal", archive_name: "linux", exe_file: "bin/quick-lint-js"}
runs-on: ${{ matrix.os.runs_on }}
container: ${{ matrix.os.docker_container }}
Expand All @@ -171,6 +171,16 @@ jobs:
uname -a || :
shell: bash

# Node.js 20 is required by actions/download-artifact.
# TODO(strager): Bake this step into the Docker image.
- name: install Node.js 20 on Ubuntu
if: ${{ matrix.os.install_node_20_ubuntu }}
run: |
curl -sL https://deb.nodesource.com/setup_18.x -o nodesource_setup.sh
bash nodesource_setup.sh
apt-get install nodejs
shell: bash

- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: quick-lint-js-${{ matrix.os.archive_name }}-${{ github.sha }}
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/debian-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ jobs:
- {arch: amd64, runs_on: ubuntu-latest, docker_container: "debian:buster", name: "Debian 10 Buster"}
- {arch: amd64, runs_on: ubuntu-latest, docker_container: "pureos/pureos:amber-latest", name: "PureOS Amber"}
- {arch: amd64, runs_on: ubuntu-latest, docker_container: "ubuntu:16.04", name: "Ubuntu 16.04 LTS Xenial"}
- {arch: amd64, runs_on: ubuntu-latest, docker_container: "ubuntu:18.04", name: "Ubuntu 18.04 LTS Bionic"}
- {arch: amd64, runs_on: ubuntu-latest, docker_container: "ubuntu:20.04", name: "Ubuntu 20.04 LTS Focal"}
- {arch: amd64, runs_on: ubuntu-latest, docker_container: "ubuntu:18.04", name: "Ubuntu 18.04 LTS Bionic", install_node_20_ubuntu: true}
- {arch: amd64, runs_on: ubuntu-latest, docker_container: "ubuntu:20.04", name: "Ubuntu 20.04 LTS Focal", install_node_20_ubuntu: true}
- {arch: arm64, runs_on: stracle-linux-aarch64, docker_container: "debian:bullseye", name: "Debian 11 Bullseye"}
- {arch: arm64, runs_on: stracle-linux-aarch64, docker_container: "debian:buster", name: "Debian 10 Buster"}
- {arch: arm64, runs_on: stracle-linux-aarch64, docker_container: "ubuntu:20.04", name: "Ubuntu 20.04 LTS Focal"}
Expand All @@ -89,8 +89,19 @@ jobs:
uname -a || :
- name: update apt
if: ${{ not matrix.os.install_node_20_ubuntu }}
run: apt-get update

# Node.js 20 is required by actions/download-artifact.
# TODO(strager): Bake this step into the Docker image.
- name: install Node.js 20 on Ubuntu
if: ${{ matrix.os.install_node_20_ubuntu }}
run: |
curl -sL https://deb.nodesource.com/setup_18.x -o nodesource_setup.sh
bash nodesource_setup.sh
apt-get install nodejs
shell: bash

- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: quick-lint-js-deb-${{ matrix.os.arch }}-${{ github.sha }}
Expand Down

0 comments on commit e816b84

Please sign in to comment.