diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 68f8bc99..13599bc8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -119,14 +119,38 @@ jobs: git config --global pack.threads 0 ! command -v cmake &> /dev/null || echo "B2_FLAGS=--nowide-enable-cmake" >> $GITHUB_ENV + 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 + 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}}- + ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}} + + - name: Cache ccache + uses: actions/cache@v4 + if: env.B2_USE_CCACHE && env.GHA_USE_NODE_20 == 'true' with: path: ~/.ccache key: ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}-${{github.sha}} @@ -136,6 +160,15 @@ jobs: - 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 @@ -260,7 +293,7 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup MSYS2 environment uses: msys2/setup-msys2@v2 @@ -271,7 +304,7 @@ jobs: pacboy: gcc:p cmake:p ninja:p - name: Fetch Boost.CI - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: boostorg/boost-ci ref: master @@ -320,9 +353,9 @@ jobs: runs-on: ${{matrix.os}} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Fetch Boost.CI - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: boostorg/boost-ci ref: master diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index 39e0a4f5..50c4a39a 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -48,10 +48,10 @@ jobs: DEP_DIR: ${{github.workspace}}/dependencies BOOST_VERSION: 1.56.0 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Sanity check version run: grep -E 'set\(_version [0-9]' CMakeLists.txt - - uses: actions/cache@v1 + - uses: actions/cache@v4 id: cache-boost with: path: ${{env.DEP_DIR}} @@ -64,7 +64,7 @@ jobs: if: matrix.standalone == 'Boost' run: echo "BOOST_ROOT=${DEP_DIR//\\/\/}/boost_${BOOST_VERSION//./_}" >> $GITHUB_ENV # Install Boost - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 if: matrix.standalone == 'Boost' && steps.cache-boost.outputs.cache-hit != 'true' with: repository: boostorg/boost @@ -125,7 +125,7 @@ jobs: CreateDocuTest: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - name: Create documentation run: | sudo apt-get install -y doxygen @@ -134,9 +134,9 @@ jobs: CreateBoostDocuTest: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Fetch Boost.CI - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: boostorg/boost-ci ref: master @@ -153,7 +153,7 @@ jobs: CheckFormatting: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: DoozyX/clang-format-lint-action@v0.11 with: exclude: './doc' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 30523234..1dd3bc94 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,7 @@ jobs: DEP_DIR: ${{github.workspace}}/dependencies BOOST_VERSION: 1.56.0 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Extract tag name id: get_tag run: |