Skip to content

Commit

Permalink
GHA: Workaround node20 GLIC issues in older Ubuntu containers
Browse files Browse the repository at this point in the history
Avoid errors like
> /__e/node20/bin/node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /__e/node20/bin/node)
when using Ubuntu 16/18 containers with the @v4 actions
See actions/checkout#1590
  • Loading branch information
Flamefire committed Feb 7, 2024
1 parent bd1d5af commit 1994c74
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,22 +141,51 @@ jobs:
echo "B2_USE_CCACHE=0" >> $GITHUB_ENV
fi
git config --global pack.threads 0
if [[ "${{matrix.container}}" == "ubuntu:16.04" ]] || [[ "${{matrix.container}}" == "ubuntu:18.04" ]]; then
# Ubuntu 16/18 can't run Node 20, so stick to older actions: https://github.com/actions/checkout/issues/1590
echo "GHA_USE_NODE_20=false" >> $GITHUB_ENV
else
echo "GHA_USE_NODE_20=true" >> $GITHUB_ENV
fi
- uses: actions/checkout@v3
if: env.GHA_USE_NODE_20 == 'false'
with:
# For coverage builds fetch the whole history, else only 1 commit using a 'fake ternary'
fetch-depth: ${{ matrix.coverage && '0' || '1' }}
- uses: actions/checkout@v4
if: env.GHA_USE_NODE_20 == 'true'
with:
# For coverage builds fetch the whole history, else only 1 commit using a 'fake ternary'
fetch-depth: ${{ matrix.coverage && '0' || '1' }}

- name: Cache ccache
uses: actions/cache@v3
if: env.B2_USE_CCACHE && env.GHA_USE_NODE_20 == 'false'
with:
path: ~/.ccache
key: ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}-${{github.sha}}
restore-keys: ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}-

- name: Cache ccache
uses: actions/cache@v4
if: env.B2_USE_CCACHE
if: env.B2_USE_CCACHE && env.GHA_USE_NODE_20 == 'true'
with:
path: ~/.ccache
key: ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}-${{github.sha}}
restore-keys: ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}-

- name: Fetch Boost.CI
uses: actions/checkout@v3
if: env.GHA_USE_NODE_20 == 'false'
with:
repository: boostorg/boost-ci
ref: master
path: boost-ci-cloned

- name: Fetch Boost.CI
uses: actions/checkout@v4
if: env.GHA_USE_NODE_20 == 'true'
with:
repository: boostorg/boost-ci
ref: master
Expand Down

0 comments on commit 1994c74

Please sign in to comment.