Skip to content

Commit 61351cc

Browse files
committed
ci: split verification and release workflows
1 parent 7e016af commit 61351cc

File tree

2 files changed

+74
-2
lines changed

2 files changed

+74
-2
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@ name: Build and Release
22

33
on:
44
push:
5-
branches:
6-
- main
75
tags:
86
- 'v*'
97
workflow_dispatch:
108

119
permissions:
1210
contents: write
1311

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
1416
jobs:
1517
build:
1618
name: Build - ${{ matrix.platform.os_name }} (${{ matrix.platform.arch }})

.github/workflows/ci.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths-ignore:
8+
- 'docs/**'
9+
- '**/*.md'
10+
- 'LICENSE'
11+
pull_request:
12+
branches:
13+
- main
14+
paths-ignore:
15+
- 'docs/**'
16+
- '**/*.md'
17+
- 'LICENSE'
18+
workflow_dispatch:
19+
20+
permissions:
21+
contents: read
22+
23+
concurrency:
24+
group: ${{ github.workflow }}-${{ github.ref }}
25+
cancel-in-progress: true
26+
27+
jobs:
28+
verify:
29+
name: Verify (Linux-x86_64)
30+
runs-on: ubuntu-latest
31+
env:
32+
RUSTC_WRAPPER: sccache
33+
SCCACHE_GHA_ENABLED: "true"
34+
35+
steps:
36+
- name: Checkout code
37+
uses: actions/checkout@v4
38+
39+
- name: Install Rust
40+
uses: dtolnay/rust-toolchain@stable
41+
42+
- name: Setup sccache
43+
uses: mozilla-actions/sccache-action@v0.0.9
44+
45+
- name: Cache Rust dependencies
46+
uses: Swatinem/rust-cache@v2
47+
with:
48+
shared-key: cargo-registry-${{ runner.os }}
49+
cache-targets: false
50+
51+
- name: Reset sccache stats
52+
shell: bash
53+
run: sccache --zero-stats || true
54+
55+
- name: cargo fmt --check
56+
run: cargo fmt -- --check
57+
58+
- name: cargo check
59+
run: cargo check
60+
61+
- name: cargo clippy -D warnings
62+
run: cargo clippy -- -D warnings
63+
64+
- name: cargo test
65+
run: cargo test
66+
67+
- name: Show sccache stats
68+
if: always()
69+
shell: bash
70+
run: sccache --show-stats || true

0 commit comments

Comments
 (0)