Skip to content

Commit

Permalink
feat(ci): run rustfmt, cargo test, cargo build (and do cross-build/cr…
Browse files Browse the repository at this point in the history
…oss-testing)
  • Loading branch information
klardotsh committed Feb 11, 2022
1 parent 3618f82 commit 5b4f518
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 9 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
on:
- push
name: build::linux
jobs:
build_linux_x86_64_musl:
name: x86_64-musl
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.58.0 # keep in sync with MSRV in README.md/Cargo.toml
target: x86_64-unknown-linux-musl
override: true
- uses: actions-rs/cargo@v1
with:
use-cross: true
command: test
args: --target x86_64-unknown-linux-musl
- uses: actions-rs/cargo@v1
with:
use-cross: true
command: build --release
args: --target x86_64-unknown-linux-musl

build_linux_aarch64_musl:
name: aarch64-musl
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.58.0 # keep in sync with MSRV in README.md/Cargo.toml
target: aarch64-unknown-linux-musl
override: true
- uses: actions-rs/cargo@v1
with:
use-cross: true
command: test
args: --target aarch64-unknown-linux-musl
- uses: actions-rs/cargo@v1
with:
use-cross: true
command: build --release
args: --target aarch64-unknown-linux-musl
40 changes: 31 additions & 9 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,35 @@
on: push
name: Clippy
on:
- push
name: lint
jobs:
clippy_check:
clippy:
name: clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: rustup install 1.58.0 # keep in sync with MSRV in README.md/Cargo.toml
- run: rustup component add clippy
- uses: actions-rs/clippy-check@v1
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
profile: minimal
toolchain: 1.58.0 # keep in sync with MSRV in README.md/Cargo.toml
override: true
components: rustfmt, clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings

rustfmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.58.0 # keep in sync with MSRV in README.md/Cargo.toml
override: true
components: rustfmt, clippy
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

0 comments on commit 5b4f518

Please sign in to comment.