generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (52 loc) · 1.49 KB
/
ci.yml
File metadata and controls
56 lines (52 loc) · 1.49 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
name: CI
on:
push:
branches:
- main
workflow_dispatch:
pull_request:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
flake-check:
name: nix flake check --no-build
runs-on: ubuntu-latest
outputs:
checks: ${{ steps.list-checks.outputs.checks }}
steps:
- &checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
filter: "tree:0"
- &install_nix
name: Install Nix
run: |
curl --proto '=https' --tlsv1.2 -sSf -L \
https://install.lix.systems/lix | sh -s -- install --no-confirm
sudo tee -a /etc/nix/nix.conf > /dev/null <<EOF
extra-substituters = https://d17qv3gttz4z4k.cloudfront.net
extra-trusted-public-keys = gglite-nix-cache-1:Zdz1mEqn//xa8ORxHkc76auwxmX8/6C2K/zWRjmq8Co=
log-lines = 0
EOF
- run: nix flake check --no-build -L
- id: list-checks
run:
echo "checks=$(nix eval .#checks.x86_64-linux --apply
builtins.attrNames --json)" >> $GITHUB_OUTPUT
build-checks:
needs: flake-check
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
check: ${{ fromJson(needs.flake-check.outputs.checks) }}
name: ${{ matrix.check }}
runs-on: ubuntu-latest
steps:
- *checkout
- *install_nix
- run: nix build -L .#checks.x86_64-linux.${{ matrix.check }}