-
Notifications
You must be signed in to change notification settings - Fork 11
79 lines (74 loc) · 2.46 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
name: "CI"
on:
pull_request:
push:
jobs:
check-proto:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- uses: icewind1991/attic-action@v1
with:
name: ci
instance: https://cache.icewind.me
authToken: "${{ secrets.ATTIC_TOKEN }}"
- run: nix run .#proto-builder protobuf/steam/protos protobuf/steam/src/generated
- run: nix run .#proto-builder protobuf/tf2/protos protobuf/tf2/src/generated
- run: nix run .#proto-builder protobuf/csgo/protos protobuf/csgo/src/generated
- run: nix run .#proto-builder protobuf/dota2/protos protobuf/dota2/src/generated
- run: |
git diff
git diff-index --quiet HEAD --
matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
- id: set-matrix
run: echo "matrix={\"check\":$(nix eval --json '.#checks.x86_64-linux' --apply 'builtins.attrNames')}" | tee $GITHUB_OUTPUT
checks:
runs-on: ubuntu-latest
needs: [matrix]
strategy:
fail-fast: false
matrix: ${{fromJson(needs.matrix.outputs.matrix)}}
name: ${{ matrix.check }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- uses: icewind1991/attic-action@v1
with:
name: ci
instance: https://cache.icewind.me
authToken: "${{ secrets.ATTIC_TOKEN }}"
- run: nix build .#checks.x86_64-linux.${{ matrix.check }}
semver-checks:
runs-on: ubuntu-latest
needs: [checks]
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- uses: icewind1991/attic-action@v1
with:
name: ci
instance: https://cache.icewind.me
authToken: "${{ secrets.ATTIC_TOKEN }}"
- run: nix run .#semver-checks
tests:
runs-on: ubuntu-latest
needs: [checks]
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- uses: icewind1991/attic-action@v1
with:
name: ci
instance: https://cache.icewind.me
authToken: "${{ secrets.ATTIC_TOKEN }}"
- run: nix build .#checks.x86_64-linux.examples
- name: Login
run: |
./result/bin/login ${{ secrets.STEAM_USERNAME }} "${{ secrets.STEAM_PASSWORD }}" "${{ secrets.STEAM_GUARD_SECRET }}"