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 }} 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