Skip to content

Commit aea8b88

Browse files
committed
feat(ci): add cargo-cross tests
1 parent 19f5244 commit aea8b88

File tree

1 file changed

+21
-13
lines changed

1 file changed

+21
-13
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,31 +35,39 @@ jobs:
3535
fi
3636
3737
test-codspeed:
38+
runs-on: ${{ matrix.job.os }}
3839
strategy:
40+
fail-fast: false
3941
matrix:
40-
os: [ubuntu-latest, windows-latest, macos-latest]
41-
runs-on: ${{ matrix.os }}
42+
job:
43+
- { os: ubuntu-latest, target: arm-unknown-linux-gnueabihf }
44+
- { os: ubuntu-latest, target: aarch64-unknown-linux-musl }
45+
- { os: ubuntu-latest, target: i686-unknown-linux-gnu }
46+
- { os: ubuntu-latest, target: i686-unknown-linux-musl }
47+
- { os: ubuntu-latest, target: x86_64-unknown-linux-gnu }
48+
- { os: ubuntu-latest, target: x86_64-unknown-linux-musl }
49+
- { os: macos-latest, target: aarch64-apple-darwin }
50+
- { os: macos-latest, target: x86_64-apple-darwin }
51+
- { os: windows-latest, target: i686-pc-windows-msvc }
52+
- { os: windows-latest, target: x86_64-pc-windows-msvc }
53+
- { os: windows-latest, target: aarch64-pc-windows-msvc }
4254
steps:
4355
- uses: actions/checkout@v4
4456
with:
4557
submodules: true
58+
4659
- uses: moonrepo/setup-rust@v1
4760
with:
48-
cache-target: release
61+
targets: ${{ matrix.job.target }}
4962
env:
5063
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5164

52-
- run: cargo test -p codspeed
53-
if: runner.os == 'Linux'
65+
- uses: taiki-e/install-action@v2
66+
with:
67+
tool: cross@0.2.5
5468

55-
# We don't support Windows/MacOS for now, due to libclang not found on some runners:
56-
- run: LIBCLANG_PATH= cargo test -p codspeed
57-
if: runner.os == 'macOS'
58-
- run: |
59-
$env:LIBCLANG_PATH=""
60-
cargo test -p codspeed
61-
if: runner.os == 'Windows'
62-
shell: powershell
69+
- name: Build codspeed
70+
run: cross build -p codspeed --target ${{ matrix.job.target }}
6371

6472
msrv-check:
6573
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)