From aa67697d63b56884e6b98ef4fc21811d81f8b726 Mon Sep 17 00:00:00 2001 From: Ritiek Malhotra Date: Sat, 12 Oct 2024 14:23:13 +0530 Subject: [PATCH] Add CI target for .#nixin --- .github/workflows/clawsiecats.yml | 76 ++++++++++++++----------------- 1 file changed, 35 insertions(+), 41 deletions(-) diff --git a/.github/workflows/clawsiecats.yml b/.github/workflows/clawsiecats.yml index 200a35c..78d2a2e 100644 --- a/.github/workflows/clawsiecats.yml +++ b/.github/workflows/clawsiecats.yml @@ -1,48 +1,42 @@ -name: "clawsiecats-minimal" +name: "build" on: push: workflow_dispatch: + jobs: + nix-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 + clawsiecats-minimal: runs-on: ubuntu-latest + needs: nix-setup + steps: + - uses: actions/checkout@v4 + - name: clawsiecats-minimal + run: | + nix build .#nixosConfigurations.clawsiecats-minimal.config.system.build.toplevel + + nixin: + runs-on: ubuntu-latest + needs: nix-setup 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 + - uses: actions/checkout@v4 + - name: nixin + run: | + nix build .#nixosConfigurations.nixin.config.system.build.toplevel