-
Notifications
You must be signed in to change notification settings - Fork 48
74 lines (67 loc) · 2.19 KB
/
std.yml
File metadata and controls
74 lines (67 loc) · 2.19 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
on:
workflow_call:
inputs:
runs-on:
required: true
type: string
permissions:
contents: read
concurrency:
group: std-${{ github.workflow }}-${{ github.ref }}-${{ inputs.runs-on }}
cancel-in-progress: true
jobs:
discover:
env:
# use local flake so we can dirty the tree
flake_file: "./flake.nix"
flake_url: "."
outputs:
hits: ${{ steps.discovery.outputs.hits }}
runs-on: ${{ inputs.runs-on }}
steps:
- uses: actions/checkout@v3
- uses: nixbuild/nix-quick-install-action@v25
- name: Update subflake references
run: ./.github/workflows/update-subflake.sh
# - uses: DeterminateSystems/magic-nix-cache-action@main
- uses: divnix/std-action/discover@main
id: discovery
cli:
needs: [discover, tests]
if: fromJSON(needs.discover.outputs.hits).cli.build != '{}'
strategy:
matrix:
target: ${{ fromJSON(needs.discover.outputs.hits).cli.build }}
name: ${{ matrix.target.jobName }}
runs-on: ${{ inputs.runs-on }}
steps:
- uses: nixbuild/nix-quick-install-action@v25
# - uses: DeterminateSystems/magic-nix-cache-action@main
- uses: divnix/std-action/run@main
shells:
needs: [discover, tests]
if: fromJSON(needs.discover.outputs.hits).shells.build != '{}'
strategy:
matrix:
target: ${{ fromJSON(needs.discover.outputs.hits).shells.build }}
name: ${{ matrix.target.jobName }}
runs-on: ${{ inputs.runs-on }}
steps:
- uses: nixbuild/nix-quick-install-action@v25
# - uses: DeterminateSystems/magic-nix-cache-action@main
- uses: divnix/std-action/run@main
tests:
needs: discover
if: fromJSON(needs.discover.outputs.hits).checks.check != '{}'
strategy:
matrix:
target: ${{ fromJSON(needs.discover.outputs.hits).checks.check }}
name: ${{ matrix.target.jobName }}
runs-on: ${{ inputs.runs-on }}
steps:
- uses: nixbuild/nix-quick-install-action@v25
- uses: actions/checkout@v3
- name: Update subflake references
run: ./.github/workflows/update-subflake.sh
# - uses: DeterminateSystems/magic-nix-cache-action@main
- uses: divnix/std-action/run@main