From cd22913057126830441852fe283c548d4a2c5aba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Tue, 17 Sep 2024 08:28:03 +0200 Subject: [PATCH 1/2] ci: run all flake checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds *fake* hydra-like CI tests for the flake checks. Signed-off-by: Christina Sørensen --- .github/workflows/build.yaml | 17 ------------- .github/workflows/checks.yml | 47 ++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 17 deletions(-) delete mode 100644 .github/workflows/build.yaml create mode 100644 .github/workflows/checks.yml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml deleted file mode 100644 index 4e01e3a..0000000 --- a/.github/workflows/build.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: "Build" -on: - push: - branches: - - "*" - pull_request: - branches: - - "master" -jobs: - tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v19 - with: - nix_path: nixpkgs=channel:nixos-unstable - - run: nix-build diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml new file mode 100644 index 0000000..1338b60 --- /dev/null +++ b/.github/workflows/checks.yml @@ -0,0 +1,47 @@ +name: "Flake Checks" +on: + push: + branches: + - "master" + pull_request: + branches: + - "master" +jobs: + linux: + name: Linux ${{ matrix.systems }} ${{ matrix.checks }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + checks: [build, formatting, pre-commit-check, vm_integration_tests] + os: [ubuntu-latest] + systems: ["x86_64-linux"] + # In a better world ; _ ; + # systems: ["x86_64-linux", "aarch64-linux","x86_64-darwin", "aarch64-darwin"] + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@main + - name: Setup Nix cache + uses: DeterminateSystems/magic-nix-cache-action@main + - name: Nix Flake Check + run: nix build ./#checks.${{ matrix.systems }}.${{ matrix.checks }} -L + macos: + name: MacOS ${{ matrix.systems }} ${{ matrix.checks }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + checks: [build, formatting, pre-commit-check] + # TODO: this *should* work, but it doesn't (surely it's Sequoia's fault) + # checks: [build, formatting, pre-commit-check, vm_integration_tests] + os: [macos-latest] + systems: ["aarch64-darwin"] + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@main + - name: Setup Nix cache + uses: DeterminateSystems/magic-nix-cache-action@main + - name: Nix Flake Check + run: nix build ./#checks.${{ matrix.systems }}.${{ matrix.checks }} -L From 6acba0f46d07fdcc2e5c4a81ec8aa9800fd55ea0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Tue, 24 Sep 2024 08:26:15 +0200 Subject: [PATCH 2/2] ci: build example configs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christina Sørensen --- .github/workflows/build-test.yaml | 43 +++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/build-test.yaml diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml new file mode 100644 index 0000000..2759cfc --- /dev/null +++ b/.github/workflows/build-test.yaml @@ -0,0 +1,43 @@ +name: "Build Example Configs" +on: + push: + branches: + - "master" + pull_request: + branches: + - "master" +jobs: + linux: + name: Linux ${{ matrix.systems }} ${{ matrix.targets }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + targets: [healthchecks.nix, secrets.nix, simple.nix] + os: [ubuntu-latest] + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@main + - name: Setup Nix cache + uses: DeterminateSystems/magic-nix-cache-action@main + - name: Morph Build ${{ Matrix.targets }} + run: nix run . -- build examples/${{ matrix.targets }} + +# Doesn't work :( +# macos: +# name: MacOS ${{ matrix.systems }} ${{ matrix.targets }} +# runs-on: ${{ matrix.os }} +# strategy: +# matrix: +# targets: [healthchecks.nix, secrets.nix, simple.nix] +# os: [macos-latest] +# steps: +# - name: Checkout repository +# uses: actions/checkout@v4 +# - name: Install Nix +# uses: DeterminateSystems/nix-installer-action@main +# - name: Setup Nix cache +# uses: DeterminateSystems/magic-nix-cache-action@main +# - name: Morph Build ${{ Matrix.targets }} +# run: nix run . -- build examples/${{ matrix.targets }}