Skip to content

Commit 2b3eaec

Browse files
Flamefirejeking3
authored andcommitted
Fix node 20 issue on GHA CI
1 parent 05eeccc commit 2b3eaec

File tree

1 file changed

+4
-30
lines changed

1 file changed

+4
-30
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -122,52 +122,26 @@ jobs:
122122
echo "B2_USE_CCACHE=0" >> $GITHUB_ENV
123123
fi
124124
git config --global pack.threads 0
125-
if [[ "${{matrix.container}}" == "ubuntu:16.04" ]] || [[ "${{matrix.container}}" == "ubuntu:18.04" ]]; then
126-
# Ubuntu 16/18 can't run Node 20, so stick to older actions: https://github.com/actions/checkout/issues/1590
127-
echo "GHA_USE_NODE_20=false" >> $GITHUB_ENV
128-
echo "ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true" >> $GITHUB_ENV
129-
else
130-
echo "GHA_USE_NODE_20=true" >> $GITHUB_ENV
125+
if [[ "${{matrix.container}}" == "ubuntu:1"* ]]; then
126+
# Node 20 doesn't work with Ubuntu 16/18 glibc: https://github.com/actions/checkout/issues/1590
127+
curl -sL https://archives.boost.io/misc/node/node-v20.9.0-linux-x64-glibc-217.tar.xz | tar -xJ --strip-components 1 -C /node20217
131128
fi
132129
133-
- uses: actions/checkout@v3
134-
if: env.GHA_USE_NODE_20 == 'false'
135-
with:
136-
# For coverage builds fetch the whole history, else only 1 commit using a 'fake ternary'
137-
fetch-depth: ${{ matrix.coverage && '0' || '1' }}
138130
- uses: actions/checkout@v4
139-
if: env.GHA_USE_NODE_20 == 'true'
140131
with:
141132
# For coverage builds fetch the whole history, else only 1 commit using a 'fake ternary'
142133
fetch-depth: ${{ matrix.coverage && '0' || '1' }}
143134

144-
- name: Cache ccache
145-
uses: actions/cache@v3
146-
if: env.B2_USE_CCACHE && env.GHA_USE_NODE_20 == 'false'
147-
with:
148-
path: ~/.ccache
149-
key: ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}-${{github.sha}}
150-
restore-keys: ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}-
151-
152135
- name: Cache ccache
153136
uses: actions/cache@v4
154-
if: env.B2_USE_CCACHE && env.GHA_USE_NODE_20 == 'true'
137+
if: env.B2_USE_CCACHE
155138
with:
156139
path: ~/.ccache
157140
key: ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}-${{github.sha}}
158141
restore-keys: ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}-
159142

160-
- name: Fetch Boost.CI
161-
uses: actions/checkout@v3
162-
if: env.GHA_USE_NODE_20 == 'false'
163-
with:
164-
repository: boostorg/boost-ci
165-
ref: master
166-
path: boost-ci-cloned
167-
168143
- name: Fetch Boost.CI
169144
uses: actions/checkout@v4
170-
if: env.GHA_USE_NODE_20 == 'true'
171145
with:
172146
repository: boostorg/boost-ci
173147
ref: master

0 commit comments

Comments
 (0)