forked from balena-os/wifi-connect
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
47d750d
commit e542a30
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Rust | ||
|
||
on: | ||
push: | ||
branches: [ "master", "dev" ] | ||
paths-ignore: | ||
- "ui/**" | ||
- "docs/**" | ||
pull_request: | ||
branches: [ "master", "dev" ] | ||
paths-ignore: | ||
- "ui/**" | ||
- "docs/**" | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
target: | ||
- aarch64-unknown-linux-gnu | ||
- armv7-unknown-linux-gnueabihf | ||
- x86_64-unknown-linux-gnu | ||
- i686-unknown-linux-gnu | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Cargo cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Setup toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
targets: ${{ matrix.target }} | ||
- name: Install Cross | ||
run: which cross || cargo install cross | ||
- name: Build | ||
run: cross build --release --target=${{ matrix.target }} | ||
- name: Test | ||
run: cross test --release --target=${{ matrix.target }} | ||
- name: Format | ||
run: cargo fmt --all -- --check |