GH CI: Set -isysroot to the default pipeline SDK path & use OSX11

This commit is contained in:
Iain Buclaw 2022-09-24 11:29:25 +02:00
parent 16058a041b
commit d579c467c1

View file

@ -56,9 +56,9 @@ jobs:
# very few PRs actually benefit from this. # very few PRs actually benefit from this.
fail-fast: false fail-fast: false
matrix: matrix:
# OSX 10.15, Ubuntu 18.04 in order to support older LLVM / GCC # Mac OS 11, Ubuntu 18.04 in order to support older LLVM / GCC
# Ubuntu 20.04 in order to support newer LLVM / GCC # Ubuntu 20.04 in order to support newer LLVM / GCC
os: [ macOS-10.15, ubuntu-18.04, ubuntu-20.04, windows-2019 ] os: [ macOS-11, ubuntu-18.04, ubuntu-20.04, windows-2019 ]
target: [ target: [
# Versions of clang earlier than 8 are not available on 18.04 # Versions of clang earlier than 8 are not available on 18.04
@ -99,17 +99,17 @@ jobs:
- { os: ubuntu-20.04, target: g++-6 } - { os: ubuntu-20.04, target: g++-6 }
- { os: ubuntu-20.04, target: g++-5 } - { os: ubuntu-20.04, target: g++-5 }
# OSX only supports clang # OSX only supports clang
- { os: macOS-10.15, target: g++-11 } - { os: macOS-11, target: g++-11 }
- { os: macOS-10.15, target: g++-10 } - { os: macOS-11, target: g++-10 }
- { os: macOS-10.15, target: g++-9 } - { os: macOS-11, target: g++-9 }
- { os: macOS-10.15, target: g++-8 } - { os: macOS-11, target: g++-8 }
- { os: macOS-10.15, target: g++-7 } - { os: macOS-11, target: g++-7 }
- { os: macOS-10.15, target: g++-6 } - { os: macOS-11, target: g++-6 }
- { os: macOS-10.15, target: g++-5 } - { os: macOS-11, target: g++-5 }
- { os: macOS-10.15, target: msvc-2019 } - { os: macOS-11, target: msvc-2019 }
- { os: macOS-10.15, target: msvc-2017 } - { os: macOS-11, target: msvc-2017 }
- { os: macOS-10.15, target: msvc-2015 } - { os: macOS-11, target: msvc-2015 }
- { os: macOS-10.15, target: msvc-2013 } - { os: macOS-11, target: msvc-2013 }
# We don't test g++ on Windows as DMD only mangles for MSVC # We don't test g++ on Windows as DMD only mangles for MSVC
- { os: windows-2019, target: g++-11 } - { os: windows-2019, target: g++-11 }
- { os: windows-2019, target: g++-10 } - { os: windows-2019, target: g++-10 }
@ -157,13 +157,13 @@ jobs:
# Platform boilerplate # Platform boilerplate
- { os: ubuntu-18.04, arch: x86_64-linux-gnu-ubuntu-18.04 } - { os: ubuntu-18.04, arch: x86_64-linux-gnu-ubuntu-18.04 }
- { os: ubuntu-20.04, arch: x86_64-linux-gnu-ubuntu-20.04 } - { os: ubuntu-20.04, arch: x86_64-linux-gnu-ubuntu-20.04 }
- { os: macOS-10.15, arch: x86_64-apple-darwin } - { os: macOS-11, arch: x86_64-apple-darwin }
# Clang 9.0.0 have a different arch for OSX # Clang 9.0.0 have a different arch for OSX
- { os: macOS-10.15, target: clang-9.0.0, arch: x86_64-darwin-apple } - { os: macOS-11, target: clang-9.0.0, arch: x86_64-darwin-apple }
# Those targets will generate artifacts that can be used by other testers # Those targets will generate artifacts that can be used by other testers
- { storeArtifacts: false } - { storeArtifacts: false }
- { os: ubuntu-18.04, target: g++-9, storeArtifacts: true } - { os: ubuntu-18.04, target: g++-9, storeArtifacts: true }
- { os: macOS-10.15, target: clang-9.0.0, storeArtifacts: true } - { os: macOS-11, target: clang-9.0.0, storeArtifacts: true }
#- { os: windows-2019, target: msvc-2019, storeArtifacts: true } #- { os: windows-2019, target: msvc-2019, storeArtifacts: true }
# We're using the latest available images at the time of this commit. # We're using the latest available images at the time of this commit.
@ -221,7 +221,7 @@ jobs:
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ${{ github.workspace }}/clang+llvm-${{ matrix.cxx-version }}-${{ matrix.arch }}/ path: ${{ github.workspace }}/clang+llvm-${{ matrix.cxx-version }}-${{ matrix.arch }}/
key: ${{ matrix.cxx-version }}-${{ matrix.arch }}-1 key: ${{ matrix.cxx-version }}-${{ matrix.arch }}-2022-09-25-2121
- name: '[Posix] Setting up clang ${{ matrix.cxx-version }}' - name: '[Posix] Setting up clang ${{ matrix.cxx-version }}'
if: matrix.compiler == 'clang' && runner.os != 'Windows' && steps.cache-clang.outputs.cache-hit != 'true' if: matrix.compiler == 'clang' && runner.os != 'Windows' && steps.cache-clang.outputs.cache-hit != 'true'
@ -236,7 +236,7 @@ jobs:
# On OSX, the system header are installed via `xcode-select` and not distributed with clang # On OSX, the system header are installed via `xcode-select` and not distributed with clang
# Since some part of the testsuite rely on CC being only a binary (not a command), # Since some part of the testsuite rely on CC being only a binary (not a command),
# and config files where only introduced from 6.0.0, use a wrapper script. # and config files where only introduced from 6.0.0, use a wrapper script.
if [ "${{ matrix.os }}" == "macOS-10.15" ]; then if [ "${{ matrix.os }}" == "macOS-11" ]; then
# Note: heredoc shouldn't be indented # Note: heredoc shouldn't be indented
cat << 'EOF' > ${TMP_CC}-wrapper cat << 'EOF' > ${TMP_CC}-wrapper
#!/bin/bash #!/bin/bash
@ -258,9 +258,10 @@ jobs:
if: matrix.compiler == 'clang' && runner.os != 'Windows' if: matrix.compiler == 'clang' && runner.os != 'Windows'
run: | run: |
TMP_CC='${{ github.workspace }}/clang+llvm-${{ matrix.cxx-version }}-${{ matrix.arch }}/bin/clang' TMP_CC='${{ github.workspace }}/clang+llvm-${{ matrix.cxx-version }}-${{ matrix.arch }}/bin/clang'
if [ "${{ matrix.os }}" == "macOS-10.15" ]; then if [ "${{ matrix.os }}" == "macOS-11" ]; then
echo "CC=${TMP_CC}-wrapper" >> $GITHUB_ENV echo "CC=${TMP_CC}-wrapper" >> $GITHUB_ENV
echo "CXX=${TMP_CC}++-wrapper" >> $GITHUB_ENV echo "CXX=${TMP_CC}++-wrapper" >> $GITHUB_ENV
echo "SDKROOT=$(xcrun --show-sdk-path)" >> $GITHUB_ENV
else else
echo "CC=${TMP_CC}" >> $GITHUB_ENV echo "CC=${TMP_CC}" >> $GITHUB_ENV
echo "CXX=${TMP_CC}++" >> $GITHUB_ENV echo "CXX=${TMP_CC}++" >> $GITHUB_ENV