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