From 9b2a0a541e4193b5faff78db7e53b64e379d0633 Mon Sep 17 00:00:00 2001 From: Robin Ole Heinemann Date: Fri, 10 Jan 2025 01:00:39 +0100 Subject: [PATCH] ci: test nix flake build of packages --- .github/workflows/test_build.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/test_build.yml diff --git a/.github/workflows/test_build.yml b/.github/workflows/test_build.yml new file mode 100644 index 00000000..71e55fdb --- /dev/null +++ b/.github/workflows/test_build.yml @@ -0,0 +1,28 @@ +name: test_build + +on: + pull_request: + push: + branches: [main] + merge_group: + +jobs: + build: + strategy: + matrix: + os: [["ubuntu-latest"], ["self-hosted", "macOS"]] + target: ["backend", "worker"] + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v3 + + - uses: cachix/install-nix-action@v30 + + - name: Wait for nix daemon to start + if: runner.os == 'macOS' + run: wait4path /nix/var/nix/profiles/per-user + + - name: Build the target + run: nix build .#${{ matrix.target }}