diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 176b4899a..9a3e1e28e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -114,7 +114,6 @@ jobs: run: | sudo echo "set man-db/auto-update false" | sudo debconf-communicate sudo dpkg-reconfigure man-db - sudo apt-get install -y jq - name: Setup GCC if: matrix.compiler.toolset == 'gcc' @@ -130,11 +129,30 @@ jobs: sudo ./llvm.sh ${{ matrix.compiler.version }} sudo apt-get install -y libc++-${{ matrix.compiler.version }}-dev libc++abi-${{ matrix.compiler.version }}-dev libunwind-${{ matrix.compiler.version }}-dev + - uses: TheMrMilchmann/setup-msvc-dev@v3 + if: matrix.os.name == 'windows' + with: + arch: x64 + - name: Fetch Environment Info id: env-info shell: bash run: | set -e + case "${{ matrix.compiler.toolset }}" in + "gcc") + COMPILER_FULL_VERSION=$(${{ matrix.compiler.executable }} -dumpfullversion -dumpversion) + ;; + "clang") + COMPILER_FULL_VERSION=$(${{ matrix.compiler.executable }} -dumpversion) + ;; + "msvc") + COMPILER_FULL_VERSION=$(powershell -NoProfile -Command "(Get-Command ${{ matrix.compiler.executable }}).FileVersionInfo.FileVersion") + ;; + esac + echo "COMPILER_FULL_VERSION=$COMPILER_FULL_VERSION" + echo "compiler-full-version=$COMPILER_FULL_VERSION" >> "$GITHUB_OUTPUT" + export BOOST_RELEASE_VERSION_NAME=$(git for-each-ref refs/tags --sort=-refname --format='%(refname:lstrip=-1)' --count=1) echo "BOOST_RELEASE_VERSION_NAME: $BOOST_RELEASE_VERSION_NAME" echo "BOOST_RELEASE_VERSION_NAME=$BOOST_RELEASE_VERSION_NAME" >> "$GITHUB_OUTPUT" @@ -151,7 +169,7 @@ jobs: id: cache-boost uses: actions/cache/restore@v4 with: - key: ${{ steps.env-info.outputs.BOOST_RELEASE_VERSION_NAME }}-${{ matrix.os.name }}-${{ matrix.os.version }}-${{ matrix.compiler.toolset }}-${{ matrix.compiler.version }}-${{ matrix.cpp_version.name }}-${{ matrix.build_type.name }} + key: ${{ steps.env-info.outputs.BOOST_RELEASE_VERSION_NAME }}-${{ matrix.os.name }}-${{ matrix.os.version }}-${{ matrix.compiler.toolset }}-${{ steps.env-info.outputs.compiler-full-version }}-${{ matrix.cpp_version.name }}-${{ matrix.build_type.name }} path: | ${{ steps.env-info.outputs.BOOST_ROOT }} !${{ steps.env-info.outputs.BOOST_ROOT }}/.git @@ -232,7 +250,7 @@ jobs: id: cache-deps uses: actions/cache/restore@v4 with: - key: deps-${{ matrix.os.name }}-${{ matrix.os.version }}-${{ matrix.compiler.toolset }}-${{ matrix.compiler.version }}-${{ matrix.cpp_version.name }}-${{ matrix.build_type.name }} + key: deps-${{ matrix.os.name }}-${{ matrix.os.version }}-${{ matrix.compiler.toolset }}-${{ steps.env-info.outputs.compiler-full-version }}-${{ matrix.cpp_version.name }}-${{ matrix.build_type.name }} path: ${{ steps.env-info.outputs.BOOST_ROOT }}/libs/spirit_x4/build/_deps # Adapt CMP0168; enable caching in CI @@ -275,11 +293,6 @@ jobs: key: ${{ steps.cache-deps.outputs.cache-primary-key }} path: ${{ steps.env-info.outputs.BOOST_ROOT }}/libs/spirit_x4/build/_deps - - uses: TheMrMilchmann/setup-msvc-dev@v3 - if: matrix.os.name == 'windows' - with: - arch: x64 - - name: Test env: CLICOLOR_FORCE: 1