-
-
Notifications
You must be signed in to change notification settings - Fork 15
59 lines (54 loc) · 1.44 KB
/
main.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
on:
- push
- pull_request
name: Main
env:
RUST_BACKTRACE: '1'
jobs:
build:
strategy:
matrix:
include:
- rust-target: x86_64-pc-windows-msvc
artifact-name: win64
- rust-target: i686-pc-windows-msvc
artifact-name: win32
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.7'
- uses: mtkennerly/dunamai-action@v1
with:
env-var: DUNAMAI_VERSION
args: --style semver
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable-${{ matrix.rust-target }}
- run: cargo build --release
- uses: actions/upload-artifact@v4
with:
name: shawl-v${{ env.DUNAMAI_VERSION }}-${{ matrix.artifact-name }}
path: target/release/shawl.exe
test:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo test -- --test-threads 1
lint:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.7'
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- run: |
pip install pre-commit
pre-commit run --all-files --show-diff-on-failure