Skip to content

Commit 1310a6b

Browse files
committed
github: build linux-native-basic-udev in ci
Build linux-native-basic-udev as part of CI. Build it on both Linux native, as well as on Windows to verify that cross-compiling works. Signed-off-by: Sean Cross <[email protected]>
1 parent 1a1d1a7 commit 1310a6b

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/rust.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,28 @@ jobs:
8989
- name: Verify package
9090
run: cargo package --no-default-features --features linux-native --verbose
9191

92+
build-linux-native-basic-udev:
93+
runs-on: ubuntu-latest
94+
env:
95+
DEBIAN_FRONTEND: noninteractive
96+
steps:
97+
- name: Checkout repository and submodules
98+
uses: actions/checkout@v4
99+
with:
100+
submodules: recursive
101+
- name: Install dependencies
102+
run: |
103+
sudo apt-get update -y
104+
sudo apt-get install -y libudev-dev
105+
- name: Install Rust toolchain
106+
uses: dtolnay/rust-toolchain@stable
107+
- name: Build
108+
run: cargo build --no-default-features --features linux-native-basic-udev --verbose
109+
- name: Run tests
110+
run: cargo test --no-default-features --features linux-native-basic-udev --verbose
111+
- name: Verify package
112+
run: cargo package --no-default-features --features linux-native-basic-udev --verbose
113+
92114
build-windows:
93115
runs-on: windows-latest
94116
steps:
@@ -121,6 +143,24 @@ jobs:
121143
- name: Verify package
122144
run: cargo package --no-default-features --features windows-native --verbose
123145

146+
build-linux-on-windows:
147+
runs-on: windows-latest
148+
steps:
149+
- name: Checkout repository and submodules
150+
uses: actions/checkout@v4
151+
with:
152+
submodules: recursive
153+
- name: Install Rust toolchain
154+
uses: dtolnay/rust-toolchain@stable
155+
- name: Install Linux target
156+
run: rustup target add arm-unknown-linux-musleabihf
157+
- name: Build
158+
run: cargo build --target arm-unknown-linux-musleabihf --no-default-features --features linux-native-basic-udev --verbose
159+
- name: Run tests
160+
run: cargo test --target arm-unknown-linux-musleabihf --no-default-features --features linux-native-basic-udev --verbose
161+
- name: Verify package
162+
run: cargo package --target arm-unknown-linux-musleabihf --no-default-features --features linux-native-basic-udev --verbose
163+
124164
build-macos:
125165
runs-on: macos-latest
126166
steps:

0 commit comments

Comments
 (0)