|
7 | 7 | branches: [ master ]
|
8 | 8 |
|
9 | 9 | jobs:
|
10 |
| - test: |
| 10 | + test-linux: |
11 | 11 | runs-on: ubuntu-24.04
|
12 | 12 | steps:
|
13 | 13 | - uses: actions/checkout@v3
|
|
76 | 76 | # `test_translator.py` does not rebuild,
|
77 | 77 | # so changing `RUSTFLAGS` will not trigger a full rebuild.
|
78 | 78 | ./scripts/test_translator.py tests/
|
| 79 | +
|
| 80 | + test-mac: |
| 81 | + runs-on: macos-14 |
| 82 | + steps: |
| 83 | + - uses: actions/checkout@v3 |
| 84 | + - run: rustup component add rustfmt rustc-dev |
| 85 | + # Needs adding to the safelist for c2rust GitHub Actions |
| 86 | + #- uses: Swatinem/rust-cache@v2 |
| 87 | + - name: Provision macOS |
| 88 | + run: | |
| 89 | + ./scripts/provision_mac.sh |
| 90 | + # speeds up provisioning |
| 91 | + export HOMEBREW_NO_AUTO_UPDATE=1 |
| 92 | + # prepare environment for the following steps |
| 93 | + source $HOME/.cargo/env |
| 94 | + # print some useful info to help troubleshoot |
| 95 | + brew info llvm@17 |
| 96 | + which python3 |
| 97 | + /usr/bin/env python3 -c "import sys; print(sys.path)" |
| 98 | +
|
| 99 | + - name: cargo build --release |
| 100 | + run: | |
| 101 | + export LLVM_CONFIG_PATH=$(brew --prefix llvm@17)/bin/llvm-config |
| 102 | + export RUSTFLAGS="-D warnings" |
| 103 | + export RUSTDOCFLAGS="-D warnings" |
| 104 | + # Don't build with `--all-features` (see analogous step for Linux). |
| 105 | + cargo build --release |
| 106 | +
|
| 107 | + - name: cargo test --release --workspace |
| 108 | + run: | |
| 109 | + export RUSTFLAGS="-D warnings" |
| 110 | + export RUSTDOCFLAGS="-D warnings" |
| 111 | + cargo test --release --workspace |
| 112 | +
|
| 113 | + - name: Test translator |
| 114 | + run: | |
| 115 | + # `RUSTFLAGS` not set (see analogous step for Linux). |
| 116 | + ./scripts/test_translator.py tests/ |
0 commit comments