Skip to content

Commit cd95a0d

Browse files
committed
ci: add github ci intergration to ensure PRs build successfully
This adds GitHub Actions integration to automatically build (and run tests, should they be added in the future) on Windows, MacOS, and Linux. This will (hopefully) prevent issues like Spagett1gh-87 (introduced by Spagett1gh-83) from recurring in the future. Related-to: Spagett1gh-83, Spagett1gh-86, Spagett1gh-87
1 parent 1cbe554 commit cd95a0d

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

.github/workflows/tests.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Cargo Tests
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
env:
8+
CARGO_TERM_COLOR: always
9+
10+
jobs:
11+
test:
12+
name: Build and Test
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
matrix:
16+
os:
17+
- windows-latest
18+
- macos-latest
19+
- ubuntu-latest
20+
toolchain:
21+
- stable
22+
- beta
23+
- nightly
24+
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@v4
27+
- name: Install ${{ matrix.toolchain}} Rust toolchain
28+
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
29+
- if: matrix.os == 'ubuntu-latest'
30+
name: Install Linux build dependencies
31+
run: sudo apt-get -yq install libgtk-3-dev libudev-dev
32+
- name: Run cargo tests
33+
run: cargo test --verbose

0 commit comments

Comments
 (0)