-
Notifications
You must be signed in to change notification settings - Fork 0
185 lines (154 loc) · 4.64 KB
/
Copy pathci.yaml
File metadata and controls
185 lines (154 loc) · 4.64 KB
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
name: ci
on:
push:
branches:
- main
- release
pull_request:
branches:
- main
- release
workflow_dispatch:
env:
CABAL_VERS: "3.12"
GHC_VERS: "9.12.2"
CABAL_PROJ: "cabal.ghc9122.project"
NAVI_VERS: "0.1"
jobs:
cabal:
strategy:
fail-fast: false
matrix:
ghc:
- vers: "9.6.7"
proj_file: ""
- vers: "9.8.4"
proj_file: ""
- vers: "9.10.2"
proj_file: ""
- vers: "9.12.2"
proj_file: "--project-file cabal.ghc9122.project"
platform:
- os: "macos-latest"
e2e: "RUN_E2E=1"
- os: "ubuntu-latest"
e2e: ""
name: cabal (${{ matrix.ghc.vers }}, ${{ matrix.platform.os }})
runs-on: ${{ matrix.platform.os }}
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/setup@v2
with:
ghc-version: ${{ matrix.ghc.vers }}
- name: Configure
run: cabal configure ${{ matrix.ghc.proj_file }} --enable-tests --ghc-options -Werror
- name: Compile
run: cabal build ${{ matrix.ghc.proj_file }}
- name: Unit Tests
run: cabal test ${{ matrix.ghc.proj_file }} unit
- name: Integration Tests
run: cabal test ${{ matrix.ghc.proj_file }} integration
- name: End-to-end Tests
shell: bash
run: |
${{ matrix.platform.e2e }} cabal test ${{ matrix.ghc.proj_file }} e2e
- name: Cabal check
run: cabal check
- name: Outdated
run: cabal outdated
nix:
strategy:
fail-fast: false
matrix:
os:
- "macos-latest"
- "ubuntu-latest"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup nix
uses: cachix/install-nix-action@v30
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
nix_path: nixpkgs=channel:nixos-unstable
- name: Compile & Test
run: nix build
lint:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- name: Setup nix
uses: cachix/install-nix-action@v30
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
nix_path: nixpkgs=channel:nixos-unstable
- name: Formatting
run: |
nix run .#format
git diff --exit-code --color=always
- name: Linting
run: nix run .#lint
release:
needs: [cabal, nix, lint]
if: github.ref == 'refs/heads/release'
strategy:
fail-fast: false
matrix:
platform:
- name: "macos-13"
os: "macos-13"
script: ".github/scripts/release_osx.sh"
script_args: ""
- name: "macos-14"
os: "macos-14"
script: ".github/scripts/release_osx.sh"
script_args: ""
- name: "macos-15"
os: "macos-15"
script: ".github/scripts/release_osx.sh"
script_args: ""
- name: "alpine_amd64"
os: "ubuntu-24.04"
script: ".github/scripts/release_linux.sh"
script_args: "alpine_amd64"
- name: "alpine_arm64v8"
os: "ubuntu-24.04-arm"
script: ".github/scripts/release_linux.sh"
script_args: "alpine_arm64v8"
runs-on: ${{ matrix.platform.os }}
steps:
- uses: actions/checkout@v4
- name: Verify env vars
run: .github/scripts/verify_env.sh
- uses: docker/setup-docker-action@v4
if: ${{ matrix.platform.name == 'alpine_amd64' || matrix.platform.name == 'alpine_arm64v8' }}
# So we have sha256sum
- name: Install coreutils
if: ${{ matrix.platform.os == 'macos-13' || matrix.platform.os == 'macos-14' }}
run: brew install coreutils
- uses: haskell-actions/setup@v2
if: ${{ matrix.platform.name != 'alpine_amd64' && matrix.platform.name != 'alpine_arm64v8' }}
with:
ghc-version: ${{ env.GHC_VERS }}
cabal-version: ${{ env.CABAL_VERS }}
- name: Install binary
shell: bash
run: |
${{ matrix.platform.script }} ${{ matrix.platform.script_args }}
- name: Upload binary
uses: actions/upload-artifact@v4
with:
name: release-artifacts-${{ matrix.platform.name }}
path: navi*.zip
retention-days: 1
merge-releases:
runs-on: "ubuntu-latest"
needs: release
steps:
- name: Merge Release Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: release-artifacts
pattern: release-artifacts-*
delete-merged: true
retention-days: 1