Skip to content

Commit

Permalink
Fixed zome and sweettest compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemcordoba committed Jun 3, 2024
1 parent 284d574 commit 219c2f1
Show file tree
Hide file tree
Showing 10 changed files with 350 additions and 379 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/test-nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches: [ main, develop ]
branches: [ main ]
pull_request:
branches: [ main, develop ]
branches: [ main ]

jobs:
linux-build-and-cache:
Expand All @@ -31,6 +31,13 @@ jobs:
cachix watch-exec holochain-open-dev -- nix build -L .#my_zome
sha256sum result
- name: Test zomes
env:
CACHIX_AUTH_TOKEN: "${{ secrets.CACHIX_TOKEN_HOLOCHAIN_OPEN_DEV }}"
run: |
cd ./nix/fixtures/module-repo
cachix watch-exec holochain-open-dev -- nix flake check -L
macos-just-get-from-cache:
needs: linux-build-and-cache
runs-on: macos-latest
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/update-flake-inputs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ jobs:
nix flake update
nix develop
- name: Update example repository
run: |
cd nix/fixture/module-repo
nix flake update
nix develop --command bash -c "cargo update"
- uses: dorny/paths-filter@v3
id: changes
with:
Expand All @@ -39,6 +45,8 @@ jobs:
- 'flake.lock'
package_json:
- '**/*/package.json'
cargo_lock:
- '**/*/Cargo.lock'
- name: Create Pull Request
id: cpr
Expand Down
16 changes: 9 additions & 7 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@
CARGO_PROFILE = if debug then "debug" else "release";
cargoExtraArgs = "";
cargoCheckCommand = "";
cargoBuildCommand = ''
RUSTFLAGS="--remap-path-prefix $(pwd)=/build/source/ --remap-path-prefix ${cargoVendorDir}=/build/source/" cargo build --profile release --offline --workspace'';
# RUSTFLAGS="--remap-path-prefix $(pwd)=/build/source/ --remap-path-prefix ${cargoVendorDir}=/build/source/"
cargoBuildCommand =
"cargo build --profile release --offline --workspace";
};
cargoArtifacts = craneLib.buildDepsOnly (commonArgs // {
pname = "zome";
Expand All @@ -119,14 +120,15 @@
cargoArtifacts = craneLib.buildDepsOnly {
inherit src buildInputs nativeBuildInputs cargoVendorDir;
doCheck = false;
cargoBuildCommand = ''
RUSTFLAGS="--remap-path-prefix $(pwd)=/build/source/" cargo build --profile release'';
cargoCheckCommand = ''
RUSTFLAGS="--remap-path-prefix $(pwd)=/build/source/" cargo check --profile release'';
# RUSTFLAGS =
# "--remap-path-prefix ${cargoVendorDir}=/build/source/";
cargoBuildCommand =
"cargo build --profile release --tests --offline --workspace";
cargoCheckCommand = "";
cargoExtraArgs = "";
# CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS =
# " -Clink-arg=-fuse-ld=mold";
CARGO_PROFILE = if debug then "debug" else "release";
cargoExtraArgs = " --tests --offline";
pname = "sweettest";
version = "for-holochain-0.3.1-rc";
};
Expand Down
Loading

0 comments on commit 219c2f1

Please sign in to comment.