Skip to content

Commit 715c285

Browse files
committed
Update release workflow
1 parent c8e5997 commit 715c285

File tree

1 file changed

+16
-33
lines changed

1 file changed

+16
-33
lines changed

.github/workflows/release.yml

+16-33
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ on:
77
tags:
88
- "**"
99
jobs:
10-
codestyle:
10+
check:
11+
name: Check
1112
strategy:
1213
matrix:
1314
os:
@@ -16,15 +17,11 @@ jobs:
1617
- macos-latest
1718
runs-on: ${{ matrix.os }}
1819
steps:
19-
- name: Set up Rust
20-
uses: hecrj/setup-rust-action@v1
21-
with:
22-
components: rustfmt
23-
rust-version: stable
24-
- uses: actions/checkout@v1
25-
- run: cargo fmt --all -- --check
20+
- uses: actions/checkout@main
21+
- uses: ./.github/actions/check
2622

27-
lint:
23+
fmt:
24+
name: Rustfmt
2825
strategy:
2926
matrix:
3027
os:
@@ -33,14 +30,11 @@ jobs:
3330
- macos-latest
3431
runs-on: ${{ matrix.os }}
3532
steps:
36-
- name: Set up Rust
37-
uses: hecrj/setup-rust-action@v1
38-
with:
39-
components: clippy
40-
- uses: actions/checkout@v1
41-
- run: cargo clippy --all-targets -- -D clippy::all
33+
- uses: actions/checkout@main
34+
- uses: ./.github/actions/fmt
4235

43-
compile:
36+
clippy:
37+
name: Clippy
4438
strategy:
4539
matrix:
4640
os:
@@ -49,33 +43,22 @@ jobs:
4943
- macos-latest
5044
runs-on: ${{ matrix.os }}
5145
steps:
52-
- name: Set up Rust
53-
uses: hecrj/setup-rust-action@v1
54-
- uses: actions/checkout@master
55-
- run: cargo check --all
46+
- uses: actions/checkout@main
47+
- uses: ./.github/actions/clippy
5648

5749
test:
58-
needs: [codestyle, lint, compile]
50+
name: Test Suite
51+
needs: [check, fmt, clippy]
5952
strategy:
6053
matrix:
6154
os:
6255
- ubuntu-latest
6356
- windows-latest
6457
- macos-latest
6558
runs-on: ${{ matrix.os }}
66-
6759
steps:
68-
- name: Setup Rust
69-
uses: hecrj/setup-rust-action@v1
70-
with:
71-
rust-version: ${{ matrix.rust }}
72-
- name: Checkout
73-
uses: actions/checkout@v1
74-
- name: Install dependencies
75-
if: matrix.os == 'ubuntu-latest'
76-
run: sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev
77-
- name: Test
78-
run: cargo test
60+
- uses: actions/checkout@main
61+
- uses: ./.github/actions/test
7962

8063
build_and_upload_artifacts:
8164
name: Upload Artifacts

0 commit comments

Comments
 (0)