From 45ea1c5634e4fcdb56069c2f4f63931d46446ae6 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] 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 | 45 ++++++++++++++++++++++++++++++++++++ 2 files changed, 45 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..21744ea --- /dev/null +++ b/.github/workflows/checks.yml @@ -0,0 +1,45 @@ +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, 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