Skip to content

Commit 65eceda

Browse files
committed
feat(ci): cross build test
1 parent b2de58a commit 65eceda

File tree

1 file changed

+35
-4
lines changed

1 file changed

+35
-4
lines changed

.github/workflows/rust.yml

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,43 @@ env:
1111

1212
jobs:
1313
build:
14+
name: Build - ${{ matrix.platform.target }}
15+
runs-on: ubuntu-24.04
16+
strategy:
17+
matrix:
18+
platform:
19+
# Tier 1
20+
- target: aarch64-unknown-linux-gnu
21+
- target: i686-unknown-linux-gnu
22+
- target: x86_64-unknown-linux-gnu
23+
# Tier 2 with host tools
24+
- target: arm-unknown-linux-gnueabi
25+
- target: arm-unknown-linux-gnueabihf
26+
- target: armv7-unknown-linux-gnueabihf
27+
- target: loongarch64-unknown-linux-gnu
28+
toolchain: 1.71.0
29+
- target: riscv64gc-unknown-linux-gnu
30+
- target: s390x-unknown-linux-gnu
31+
# Tier 2 without host tools
32+
- target: armv7-unknown-linux-gnueabi
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
- name: Build
37+
uses: houseabsolute/actions-rust-cross@v1
38+
with:
39+
toolchain: ${{ matrix.platform.toolchain || '1.70.0' }}
40+
command: build
41+
target: ${{ matrix.platform.target }}
42+
args: "--release --verbose --features feat-rate-limit"
43+
strip: true
1444

15-
runs-on: ubuntu-latest
16-
45+
test:
46+
runs-on: ubuntu-24.04
1747
steps:
1848
- uses: actions/checkout@v4
19-
- name: Build
20-
run: cargo build --verbose --features feat-rate-limit
49+
- uses: dtolnay/rust-toolchain@master
50+
with:
51+
toolchain: 1.70.0
2152
- name: Run tests
2253
run: cargo test --verbose --features feat-rate-limit

0 commit comments

Comments
 (0)