-
Notifications
You must be signed in to change notification settings - Fork 23
48 lines (43 loc) · 1.38 KB
/
test-flake.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
name: "Test Nix Flake"
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
compile-nix-flake:
name: 'Nix flake'
strategy:
fail-fast: false
matrix:
include:
- runner: [self-hosted, linux, normal-ephemeral]
os: ubuntu-20.04
- runner: macos-12
os: macos-12
- runner: MacM1
os: self-macos-12
runs-on: ${{ matrix.runner }}
steps:
- name: 'Check out code'
uses: actions/checkout@v3
with:
# Check out pull request HEAD instead of merge commit.
ref: ${{ github.event.pull_request.head.sha }}
- name: 'Install Nix'
if: ${{ !startsWith(matrix.os, 'self') }}
uses: cachix/install-nix-action@v22
with:
install_url: https://releases.nixos.org/nix/nix-2.13.3/install
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: 'Install Cachix'
if: ${{ !startsWith(matrix.os, 'self') }}
uses: cachix/cachix-action@v12
with:
name: k-framework
authToken: '${{ secrets.CACHIX_PUBLIC_TOKEN }}'
- name: 'Build LLVM backend'
run: GC_DONT_GC=1 nix build --print-build-logs .
- name: 'Test LLVM backend'
run: GC_DONT_GC=1 nix flake check --print-build-logs