From 6aa64ac73b3abd91f6444c3ef7ca278899195441 Mon Sep 17 00:00:00 2001 From: Youwen Wu <38934577+youwen5@users.noreply.github.com> Date: Fri, 16 Aug 2024 14:44:21 -0700 Subject: [PATCH 1/4] ci: add cachix tests --- .github/workflows/main.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..caba877 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,18 @@ +name: "Test" +on: + pull_request: + push: +jobs: + tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@v25 + with: + nix_path: nixpkgs=channel:nixos-unstable + - uses: cachix/cachix-action@v14 + with: + name: suntheme + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + - run: nix build + - run: nix develop From 4647657666119bd17de070bec5bbf9158bdf43f6 Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Fri, 16 Aug 2024 14:50:41 -0700 Subject: [PATCH 2/4] fix: allow flake binary cache and substituters --- .github/workflows/main.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index caba877..3f6b038 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,13 +6,13 @@ jobs: tests: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v25 - with: - nix_path: nixpkgs=channel:nixos-unstable - - uses: cachix/cachix-action@v14 - with: - name: suntheme - authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - - run: nix build - - run: nix develop + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@v25 + with: + nix_path: nixpkgs=channel:nixos-unstable + - uses: cachix/cachix-action@v14 + with: + name: suntheme + authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" + - run: nix build --accept-flake-config + - run: nix develop From da93405e5f6a10d87a0e78a84e8ca679f3af3aa0 Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Fri, 16 Aug 2024 14:52:44 -0700 Subject: [PATCH 3/4] deps: add suntheme cachix to flake --- flake.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index e0bd1d9..c985748 100644 --- a/flake.nix +++ b/flake.nix @@ -49,8 +49,8 @@ }); nixConfig = { - extra-substituters = ["https://cache.iog.io"]; - extra-trusted-public-keys = ["hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="]; + extra-substituters = ["https://cache.iog.io" "https://suntheme.cachix.org"]; + extra-trusted-public-keys = ["hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" "suntheme.cachix.org-1:fHjlz7YAmMUcLp3tsZis8g9wIsDS6HvECGR3uZETGRo="]; allow-import-from-derivation = "true"; }; } From dde48b1109646c6d6fc6dfcb8b388de95500bb8d Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Fri, 16 Aug 2024 14:55:44 -0700 Subject: [PATCH 4/4] fix: accept flake config for nix develop --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3f6b038..592fc95 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,4 +15,4 @@ jobs: name: suntheme authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" - run: nix build --accept-flake-config - - run: nix develop + - run: nix develop --accept-flake-config