diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d44d88f..f1f19d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,3 +54,17 @@ jobs: - name: Run C FFI smoketest under valgrind run: make valgrind working-directory: crates/client-ffi/examples/message-exchange + + nix-build: + name: Nix Build + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@v31 + with: + extra_nix_config: | + experimental-features = nix-command flakes + - run: nix build --print-build-logs diff --git a/flake.nix b/flake.nix index a405586..9f5de6c 100644 --- a/flake.nix +++ b/flake.nix @@ -31,7 +31,7 @@ { default = rustPlatform.buildRustPackage { pname = "libchat"; - version = "0.1.0"; + version = (builtins.fromTOML (builtins.readFile ./crates/client-ffi/Cargo.toml)).package.version; src = pkgs.lib.cleanSourceWith { src = ./.; filter = path: type: @@ -48,9 +48,6 @@ nativeBuildInputs = [ pkgs.perl pkgs.pkg-config pkgs.cmake ]; buildType = "release"; - # Override panic=abort from workspace Cargo.toml — incompatible with buildRustPackage - CARGO_PROFILE_RELEASE_PANIC = "unwind"; - # Tests run in CI; some require network access unavailable in the Nix sandbox doCheck = false; postBuild = ''