diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4f6d7ef..925a47c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -17,7 +17,6 @@ jobs: steps: - uses: actions/checkout@v4 - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - id: set-matrix name: Generate Nix Matrix run: | @@ -36,7 +35,10 @@ jobs: lfs: true submodules: 'recursive' - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main + - uses: cachix/cachix-action@v14 + with: + name: mnn-rs + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - run: nix build -L '.#${{ matrix.attr }}' codecov: diff --git a/flake.lock b/flake.lock index 82b38ae..eec96e3 100644 --- a/flake.lock +++ b/flake.lock @@ -145,11 +145,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1731139594, - "narHash": "sha256-IigrKK3vYRpUu+HEjPL/phrfh7Ox881er1UEsZvw9Q4=", + "lastModified": 1731676054, + "narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "76612b17c0ce71689921ca12d9ffdc9c23ce40b2", + "rev": "5e4fbfb6b3de1aa2872b76d49fafc942626e2add", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 6643388..07b5971 100644 --- a/flake.nix +++ b/flake.nix @@ -65,10 +65,6 @@ lockFile = "${src}/Cargo.lock"; }; }; - cargo-llvm-cov = prev.cargo-llvm-cov.overrideAttrs (_: { - LLVM_COV = "${final.llvmPackages_19.llvm}/bin/llvm-cov"; - LLVM_PROFDATA = "${final.llvmPackages_19.llvm}/bin/llvm-profdata"; - }); }) ]; }; @@ -222,6 +218,7 @@ git git-lfs llvm + mnn nushell rust-bindgen rustToolchainWithRustAnalyzer diff --git a/mnn-sync/src/lib.rs b/mnn-sync/src/lib.rs index 65b0ff9..1957da2 100644 --- a/mnn-sync/src/lib.rs +++ b/mnn-sync/src/lib.rs @@ -127,7 +127,7 @@ impl SessionRunnerState { tracing::info!("Unloading session"); match core::mem::take(self) { Self::Loaded(sr) => { - let net = sr.unload()?; + let net = sr.unload(); *self = Self::Unloaded(net); Ok(()) } @@ -221,11 +221,11 @@ impl SessionRunner { }) } - pub fn unload(self) -> Result { + pub fn unload(self) -> mnn::Interpreter { let session = self.session; let net = self.interpreter; drop(session); - Ok(net) + net } pub fn run_session(&mut self) -> Result<()> {