Skip to content

Commit 4bca55d

Browse files
committed
GHA: Handle removal of Node 16
Download an unofficial Node 20 build against glibc 2.17
1 parent 0d67b84 commit 4bca55d

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,12 @@ jobs:
134134

135135
timeout-minutes: 120
136136
runs-on: ${{matrix.os}}
137-
container: ${{matrix.container}}
138-
env: {B2_USE_CCACHE: 1, ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true}
137+
container:
138+
image: ${{matrix.container}}
139+
volumes:
140+
- /node20217:/node20217:rw,rshared
141+
- ${{ startsWith(matrix.container, 'ubuntu:1') && '/node20217:/__e/node20:ro,rshared' || ' ' }}
142+
env: {B2_USE_CCACHE: 1}
139143

140144
steps:
141145
- name: Setup environment
@@ -158,22 +162,26 @@ jobs:
158162
echo "B2_USE_CCACHE=0" >> $GITHUB_ENV
159163
fi
160164
git config --global pack.threads 0
165+
if [[ "${{matrix.container}}" == "ubuntu:1"* ]]; then
166+
# Node 20 doesn't work with Ubuntu 16/18 glibc: https://github.com/actions/checkout/issues/1590
167+
curl -sL https://unofficial-builds.nodejs.org/download/release/v20.9.0/node-v20.9.0-linux-x64-glibc-217.tar.xz | tar -xJ --strip-components 1 -C /node20217
168+
fi
161169
162-
- uses: actions/checkout@v3
170+
- uses: actions/checkout@v4
163171
with:
164172
# For coverage builds fetch the whole history, else only 1 commit using a 'fake ternary'
165173
fetch-depth: ${{ matrix.coverage && '0' || '1' }}
166174

167175
- name: Cache ccache
168-
uses: actions/cache@v3
176+
uses: actions/cache@v4
169177
if: env.B2_USE_CCACHE
170178
with:
171179
path: ~/.ccache
172180
key: ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}-${{github.sha}}
173181
restore-keys: ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}-
174182

175183
- name: Fetch Boost.CI
176-
uses: actions/checkout@v3
184+
uses: actions/checkout@v4
177185
with:
178186
repository: boostorg/boost-ci
179187
ref: master

0 commit comments

Comments
 (0)