-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (51 loc) · 1.55 KB
/
nix-flake-ci.yml
File metadata and controls
59 lines (51 loc) · 1.55 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
name: Nix Flake CI
on:
push:
branches:
- main
paths:
- 'src/**'
- 'include/**'
- 'tests/**'
- 'CMakeLists.txt'
- '.github/workflows/nix-flake-ci.yml'
pull_request:
branches:
- main
paths:
- 'flake.nix'
- 'flake.lock'
- 'default.nix'
- '.github/workflows/nix-flake-ci.yml'
jobs:
nix-flake-test:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Nix
uses: cachix/install-nix-action@v24
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
experimental-features = nix-command flakes
- name: Test flake development shell
run: |
nix develop --command bash -c "echo 'Flake development shell entered successfully'"
nix develop --command bash -c "clang --version"
nix develop --command bash -c "cmake --version"
- name: Build vsdf with flake dependencies
run: |
nix develop --command bash -c "cmake -B build -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON -G Ninja ."
nix develop --command bash -c "cmake --build build"
- name: Run test suite
run: |
nix develop --command bash -c "./build/tests/vsdf_tests"
nix develop --command bash -c "./build/tests/filewatcher/filewatcher_tests"
- name: Test flake package build
run: |
nix build .#default