@@ -13,35 +13,26 @@ concurrency:
1313 cancel-in-progress : true
1414
1515jobs :
16- ci_linux :
17- name : Linux
18- runs-on : ubuntu-latest
16+ rust_tests :
17+ name : Rust tests (${{ matrix.name }})
18+ runs-on : ${{ matrix.os }}
1919 timeout-minutes : 45
20- env :
21- DO_DOCKER : 0
20+ strategy :
21+ fail-fast : false
22+ matrix :
23+ include :
24+ - name : Linux
25+ os : ubuntu-latest
26+ - name : macOS
27+ os : macos-latest
2228 steps :
2329 - uses : actions/checkout@v5
2430
2531 - uses : actions-rust-lang/setup-rust-toolchain@v1
2632 with :
2733 toolchain : stable
28- target : arm-unknown-linux-gnueabihf
2934 rustflags : " "
3035
31- - uses : actions/setup-python@v6
32- with :
33- python-version : " 3.12"
34- architecture : " x64"
35- cache : " pip"
36- cache-dependency-path : open-codegen/setup.py
37-
38- - uses : egor-tensin/setup-clang@v1
39-
40- - name : Install ARM cross-compiler and C libraries
41- run : |
42- sudo apt-get update
43- sudo apt-get install -y gcc-arm-linux-gnueabihf libc6-dev-armhf-cross
44-
4536 - name : Cargo tests
4637 run : cargo test
4738
@@ -50,25 +41,31 @@ jobs:
5041 cargo test --features rp
5142 cargo test --features jem
5243
53- - name : Run tests (script.sh)
54- env :
55- CC_arm_unknown_linux_gnueabihf : arm-linux-gnueabihf-gcc
56- AR_arm_unknown_linux_gnueabihf : arm-linux-gnueabihf-ar
57- run : bash ./ci/script.sh
58-
59- ci_macos :
60- name : macOS
61- runs-on : macos-latest
44+ python_tests :
45+ name : Python tests (${{ matrix.name }})
46+ needs : rust_tests
47+ runs-on : ${{ matrix.os }}
6248 timeout-minutes : 45
49+ strategy :
50+ fail-fast : false
51+ matrix :
52+ include :
53+ - name : Linux
54+ os : ubuntu-latest
55+ skip_rpi_test : 0
56+ - name : macOS
57+ os : macos-latest
58+ skip_rpi_test : 1
6359 env :
6460 DO_DOCKER : 0
65- SKIP_RPI_TEST : 1
61+ SKIP_RPI_TEST : ${{ matrix.skip_rpi_test }}
6662 steps :
6763 - uses : actions/checkout@v5
6864
6965 - uses : actions-rust-lang/setup-rust-toolchain@v1
7066 with :
7167 toolchain : stable
68+ components : clippy
7269 rustflags : " "
7370
7471 - uses : actions/setup-python@v6
@@ -77,16 +74,30 @@ jobs:
7774 cache : " pip"
7875 cache-dependency-path : open-codegen/setup.py
7976
80- - name : Install LLVM
81- run : brew install llvm
77+ - uses : egor-tensin/setup-clang@v1
78+ if : runner.os == 'Linux'
8279
83- - name : Cargo tests
84- run : cargo test
80+ - name : Install Linux ARM target
81+ if : runner.os == 'Linux'
82+ run : rustup target add arm-unknown-linux-gnueabihf
8583
86- - name : Cargo tests (RP and JEM)
84+ - name : Install ARM cross-compiler and C libraries
85+ if : runner.os == 'Linux'
8786 run : |
88- cargo test --features rp
89- cargo test --features jem
87+ sudo apt-get update
88+ sudo apt-get install -y gcc-arm-linux-gnueabihf libc6-dev-armhf-cross
89+
90+ - name : Install LLVM
91+ if : runner.os == 'macOS'
92+ run : brew install llvm
93+
94+ - name : Run Python tests and generated Clippy checks
95+ if : runner.os == 'Linux'
96+ env :
97+ CC_arm_unknown_linux_gnueabihf : arm-linux-gnueabihf-gcc
98+ AR_arm_unknown_linux_gnueabihf : arm-linux-gnueabihf-ar
99+ run : bash ./ci/script.sh
90100
91- - name : Run tests (script.sh)
101+ - name : Run Python tests and generated Clippy checks
102+ if : runner.os == 'macOS'
92103 run : bash ./ci/script.sh
0 commit comments