-
Notifications
You must be signed in to change notification settings - Fork 7
111 lines (97 loc) · 2.8 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: "CI"
on:
push:
pull_request:
pull_request_target:
jobs:
lint:
name: Run formatting and linting checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
extra-platforms = ${{ inputs.target_triple }}
- name: Prefetch lint script dependencies
run: nix build .#lint-script
- name: Run lint script
run: nix run .#lint-script
ci-x86_64-linux:
uses: ./.github/workflows/ci-unix.yml
with:
build_runner: ubuntu-latest
e2e_test_runner: ubuntu-latest
target_triple: x86_64-linux
do_e2e_tests: true
use_cachix: ${{ github.event_name == 'push' }}
secrets: inherit
ci-x86_64-darwin:
uses: ./.github/workflows/ci-unix.yml
with:
build_runner: macos-13
e2e_test_runner: macos-13
target_triple: x86_64-darwin
do_e2e_tests: true
use_cachix: ${{ github.event_name == 'push' }}
secrets: inherit
ci-aarch64-linux:
uses: ./.github/workflows/ci-unix.yml
with:
build_runner: ubuntu-latest
target_triple: aarch64-linux
do_e2e_tests: false
use_cachix: ${{ github.event_name == 'push' }}
secrets: inherit
ci-aarch64-darwin:
uses: ./.github/workflows/ci-unix.yml
with:
build_runner: macos-latest
e2e_test_runner: macos-latest
target_triple: aarch64-darwin
do_e2e_tests: true
use_cachix: ${{ github.event_name == 'push' }}
secrets: inherit
ci-devshell:
strategy:
matrix:
include:
- runner: macos-latest
platform: x86_64-darwin
- runner: ubuntu-latest
platform: x86_64-linux
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v14
if: ${{ github.event_name == 'push' }}
with:
name: astralbijection
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Build dev shell
run: nix build .#devShells.${{ matrix.platform }}.default --show-trace --log-lines 10000 --fallback
make-release-group:
runs-on: ubuntu-latest
needs:
- ci-aarch64-darwin
- ci-aarch64-linux
- ci-x86_64-darwin
- ci-x86_64-linux
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
- name: Assemble release directory
run: |
mkdir release
for i in caligula-*; do
cp "$i/caligula" "release/$i"
done
tree
- uses: actions/upload-artifact@v4
with:
name: release
path: release