diff options
author | Simon Cook <simon.cook@embecosm.com> | 2022-04-12 18:03:58 +0200 |
---|---|---|
committer | Simon Cook <simon.cook@embecosm.com> | 2022-04-12 18:03:58 +0200 |
commit | 649f6640c6259f7bbea6727c73adfc8d03025a38 (patch) | |
tree | 2fec262e5025e7887e0d058d937c2c361ea62aac | |
parent | e9ab95c088060ab27d3665879cd1ae0b6cbdc912 (diff) | |
download | gcc-649f6640c6259f7bbea6727c73adfc8d03025a38.zip gcc-649f6640c6259f7bbea6727c73adfc8d03025a38.tar.gz gcc-649f6640c6259f7bbea6727c73adfc8d03025a38.tar.bz2 |
rust: Clang/macOS Testing
This adds a version of the build-and-check job that runs with clang on
macOS.
-rw-r--r-- | .github/workflows/ccpp.yml | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 6159047..f4bf50b 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -149,3 +149,57 @@ jobs: else \ exit 0; \ fi + + build-and-check-clang-macos: + + env: + # Force CC/CXX to be explicitly clang to make it clear which compiler is used + CC: clang + CXX: clang++ + + runs-on: macos-latest + + steps: + - uses: actions/checkout@v2 + + - name: Install Deps + run: | + brew install dejagnu mpfr libmpc gmp + + - name: Configure + run: | + mkdir -p gccrs-build; + cd gccrs-build; + ../configure \ + --enable-languages=rust \ + --disable-bootstrap \ + --enable-multilib \ + --with-native-system-header-dir=/usr/include \ + --with-sysroot=$(xcrun --show-sdk-path) + + - name: Build + shell: bash + run: | + cd gccrs-build; \ + make -j $(sysctl -n hw.ncpu) 2>&1 | tee log + + - name: Run Tests + run: | + cd gccrs-build; \ + make check-rust + - name: Archive check-rust results + uses: actions/upload-artifact@v2 + with: + name: check-rust-logs-macos + path: | + gccrs-build/gcc/testsuite/rust/ + - name: Check regressions + run: | + cd gccrs-build; \ + if grep -e "unexpected" -e "unresolved" gcc/testsuite/rust/rust.sum;\ + then \ + echo "some tests are not correct"; \ + exit 1; \ + else \ + exit 0; \ + fi |