diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f8cdc2a..681ec3df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -141,23 +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' + 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 - container: ${{ matrix.container && 'ubuntu-22.04' || '' }} + if: env.GHA_USE_NODE_20 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 + 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 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' + 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 with: repository: boostorg/boost-ci ref: master