From 4e1001c910f463127ba33d5ad178f9fb24d2b799 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Sat, 5 Oct 2024 20:42:07 +0200 Subject: [PATCH] Add build workflow --- .github/workflows/build.yaml | 17 +++++++++++++++++ scripts/build-all.sh | 11 +++++++++++ 2 files changed, 28 insertions(+) create mode 100644 .github/workflows/build.yaml create mode 100755 scripts/build-all.sh diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..5bcca42 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,17 @@ +name: build +on: + push: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + container: + image: ghcr.io/catthehacker/ubuntu:runner-latest + steps: + - uses: actions/checkout@v3 + - uses: cachix/install-nix-action@v27 + - name: run flacke check + run: nix flake check + - name: build packages + run: ./scripts/build-all.sh diff --git a/scripts/build-all.sh b/scripts/build-all.sh new file mode 100755 index 0000000..5a19515 --- /dev/null +++ b/scripts/build-all.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +set -eo pipefail + +packages=$(nix flake show --json --all-systems| \ + jq -r '.packages["x86_64-linux"] | keys[] | ".#packages.x86_64-linux.\(.)"') + +while IFS= read -r line; do + echo "building package $line" + nix build -L "$line" + echo "done building package $line" +done <<< "$packages"