From 2d53144c7cb20229b6aff269735ff381889a6891 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20DOUIN?= Date: Tue, 17 Sep 2024 08:55:54 +0200 Subject: [PATCH] remove cargo cache Looks like cargo cache is inside the Nix store. --- .github/workflows/test.yml | 23 ++--------------------- flake.nix | 6 +++--- 2 files changed, 5 insertions(+), 24 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fe232bb..2903edc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,20 +37,11 @@ jobs: name: soywod authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' extraPullNames: nix-community - - name: Restore Cargo home - uses: actions/cache/restore@v4 - id: cache-cargo-restore - with: - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - name: Build release run: | + nix build -L .#${{ matrix.target }} nix run -L .#${{ matrix.target }} -- --version - cp result/himalaya* . + cp result/himalaya.tgz result/himalaya.zip . - name: Upload release artifact uses: actions/upload-artifact@v4 with: @@ -58,13 +49,3 @@ jobs: path: | himalaya.tgz himalaya.zip - - name: Save Cargo home - uses: actions/cache/save@v4 - id: cache-cargo-save - with: - key: ${{ steps.cache-cargo-restore.outputs.cache-primary-key }} - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ diff --git a/flake.nix b/flake.nix index 53e8864..9d75a96 100644 --- a/flake.nix +++ b/flake.nix @@ -37,7 +37,7 @@ aarch64-linux = rec { rustTarget = "aarch64-unknown-linux-musl"; runner = { pkgs, himalaya }: "${pkgs.qemu}/bin/qemu-aarch64 ${himalaya}"; - mkPackage = { system, pkgs }: package: + mkPackage = { system }: package: let inherit (mkPkgsCross system rustTarget) stdenv; cc = "${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc"; @@ -53,7 +53,7 @@ runner = { pkgs, himalaya }: let wine = pkgs.wine.override { wineBuild = "wine64"; }; in "${wine}/bin/wine64 ${himalaya}.exe"; - mkPackage = { system, pkgs }: package: + mkPackage = { pkgs }: package: let inherit (pkgs.pkgsCross.mingwW64) stdenv windows; cc = "${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc"; @@ -87,7 +87,7 @@ aarch64-darwin = { rustTarget = "aarch64-apple-darwin"; runner = { pkgs, himalaya }: "${pkgs.qemu}/bin/qemu-aarch64 ${himalaya}"; - mkPackage = { system, pkgs }: package: + mkPackage = { system }: package: let inherit ((mkPkgsCross system "aarch64-darwin").pkgsStatic) stdenv darwin; inherit (darwin.apple_sdk.frameworks) AppKit Cocoa;