-
-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (72 loc) · 2.19 KB
/
ci.yml
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: CI
on:
push:
branches:
- main
paths:
- '**/Cargo.*'
- '**.rs'
pull_request:
branches:
- main
paths:
- '**/Cargo.*'
- '**.rs'
merge_group:
types: [checks_requested]
jobs:
checks:
if: ${{ ! startsWith(github.event.head_commit.message, 'release:') }}
name: Checks
runs-on: ubuntu-latest
steps:
- uses: DeterminateSystems/nix-installer-action@v14
- uses: DeterminateSystems/magic-nix-cache-action@v8
- uses: actions/checkout@v4
- name: Check (flake)
uses: DeterminateSystems/flake-checker-action@v9
with:
fail-mode: true
- name: Check (fmt)
run: nix develop --command -- cargo fmt --check
- name: Check (clippy)
run: nix develop --command -- cargo clippy --all-targets --all-features -- -D warnings
- name: Check (docs)
run: nix develop --command -- cargo doc --no-deps --all-features
build:
name: Test and Build
needs:
- checks
runs-on: ubuntu-latest
steps:
- uses: DeterminateSystems/nix-installer-action@v14
- uses: DeterminateSystems/magic-nix-cache-action@v8
- uses: actions/checkout@v4
# - name: Test
# run: nix develop --command -- cargo test --all-features
# timeout-minutes: 5
# the default package does run the tests
- name: Build
run: nix build . .#windows .#linux .#deb
# push the .#default package build result to cachix
- id: path
run: echo "PATH=$(readlink result)" >> $GITHUB_OUTPUT
- uses: cachix/cachix-action@v14
with:
name: necauqua
pathsToPush: ${{ steps.path.outputs.PATH }}
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Finalize artifacts
run: ./.github/workflows/finalize-artifacts.sh
- uses: actions/upload-artifact@v4
with:
name: Windows
path: noita-utility-box.exe
- uses: actions/upload-artifact@v4
with:
name: Generic Linux
path: noita-utility-box-linux-generic.tar.gz
- uses: actions/upload-artifact@v4
with:
name: Debian
path: noita-utility-box.deb