diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..67ff240 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,34 @@ +name: "build" +on: + push: + workflow_dispatch: + +jobs: + nix-setup: + uses: ./.github/workflows/nix-setup.yml + + clawsiecats-minimal: + runs-on: ubuntu-latest + needs: nix-setup + steps: + - uses: actions/checkout@v4 + - name: Install Nix + uses: cachix/install-nix-action@v26 + with: + nix_path: nixpkgs=channel:nixos-unstable + - name: clawsiecats-minimal + run: | + nix build .#nixosConfigurations.clawsiecats-minimal.config.system.build.toplevel + + nixin: + runs-on: ubuntu-latest + needs: nix-setup + steps: + - uses: actions/checkout@v4 + - name: Install Nix + uses: cachix/install-nix-action@v26 + with: + nix_path: nixpkgs=channel:nixos-unstable + - name: nixin + run: | + nix build .#nixosConfigurations.nixin.config.system.build.toplevel diff --git a/.github/workflows/clawsiecats.yml b/.github/workflows/clawsiecats.yml deleted file mode 100644 index 200a35c..0000000 --- a/.github/workflows/clawsiecats.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: "clawsiecats-minimal" -on: - push: - workflow_dispatch: -jobs: - clawsiecats-minimal: - runs-on: ubuntu-latest - steps: - - name: Maximize build space - uses: AdityaGarg8/remove-unwanted-software@v2 - with: - remove-dotnet: 'true' - remove-android: 'true' - remove-haskell: 'true' - remove-codeql: 'true' - remove-docker-images: 'true' - - uses: pierotofy/set-swap-space@master - with: - swap-size-gb: 10 - - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v26 - with: - nix_path: nixpkgs=channel:nixos-unstable - # - uses: cachix/cachix-action@v14 - # with: - # name: rvfg - # authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - # extraPullNames: nix-community - - name: Build - run: | - nix build .#nixosConfigurations.clawsiecats-minimal.config.system.build.toplevel - # run: | - # for host in nixos/*; do - # host=${host#nixos/} - # if [[ "$(nix eval .#nixosConfigurations."$host".pkgs.system)" = '"x86_64-linux"' ]]; then - # echo "$host" - # nix build .#nixosConfigurations."$host".config.system.build.toplevel - # fi - # done - # - name: Deploy - # if: ${{ github.ref == 'refs/heads/main' }} - # env: - # SSH_KEY: ${{secrets.DEPLOY_SSH_KEY}} - # run: | - # mkdir -p ~/.ssh - # printenv SSH_KEY > ~/.ssh/id_ed25519 - # chmod 600 ~/.ssh/id_ed25519 - # nix run .#ci-deploy diff --git a/.github/workflows/setup-nix.yml b/.github/workflows/setup-nix.yml new file mode 100644 index 0000000..8b0b139 --- /dev/null +++ b/.github/workflows/setup-nix.yml @@ -0,0 +1,24 @@ +name: Nix Setup + +on: + workflow_call: {} + +jobs: + setup: + runs-on: ubuntu-latest + steps: + - name: Maximize build space + uses: AdityaGarg8/remove-unwanted-software@v2 + with: + remove-dotnet: 'true' + remove-android: 'true' + remove-haskell: 'true' + remove-codeql: 'true' + remove-docker-images: 'true' + - uses: pierotofy/set-swap-space@master + with: + swap-size-gb: 10 + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@v26 + with: + nix_path: nixpkgs=channel:nixos-unstable