Skip to content

Commit 765e6fd

Browse files
committed
feat(ci): Update Cargo build
1 parent c1fc95c commit 765e6fd

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/build.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: "Build"
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
packages: write
15+
actions: write
16+
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ matrix.rust-version }}
19+
cancel-in-progress: true
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
rust-version: [ stable, beta, nightly ]
25+
26+
steps:
27+
- name: "Checkout"
28+
uses: actions/checkout@v4
29+
30+
- name: "Setup - Rust Toolchain"
31+
uses: dtolnay/rust-toolchain@56f84321dbccf38fb67ce29ab63e4754056677e0
32+
if: steps.changes.outputs.src == 'true'
33+
with:
34+
components: clippy,rustfmt
35+
toolchain: ${{ matrix.rust-version }}
36+
37+
- name: "Formatting Check"
38+
run: cargo fmt --check
39+
40+
- name: "Run build..."
41+
run: |
42+
set -e
43+
44+
cargo build --workspace
45+
cargo test --workspace
46+
47+

0 commit comments

Comments
 (0)