Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/npm-package-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,19 @@ jobs:

- run: ./prep-all.sh
env:
PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID }}
PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID || 'test' }}

- name: Remove Unused Artifacts
run: rm -rf ./target/debug

- name: Test JS/TS Binding 1/2
run: nix develop -c rainix-wasm-test

- name: Remove Test Artifacts
run: |
rm -rf ./target/debug
rm -rf ./target/wasm32-unknown-unknown/debug

Comment thread
coderabbitai[bot] marked this conversation as resolved.
- name: Test JS/TS Binding 2/2
run: nix develop -c test-js-bindings

Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/tauri-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,27 @@ jobs:

- run: nix develop .#tauri-shell -c ob-tauri-unit-test

- run: nix develop .#tauri-shell --command ob-tauri-before-build-ci
working-directory: ./tauri-app
env:
WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID || 'test' }}
- run: nix develop .#tauri-shell --command npm run svelte-lint-format-check
working-directory: ./tauri-app

- name: Reset workspace target before Rust tests
run: |
rm -rf target
rm -rf tauri-app/src-tauri/target

- name: Run Rust tests with reduced debug artifacts
run: nix develop .#tauri-shell --command tauri-rs-test
env:
CARGO_INCREMENTAL: 0

- run: |
rm -rf target
rm -rf tauri-app/src-tauri/target

- run: nix develop .#tauri-shell --command ob-tauri-before-release
working-directory: ./tauri-app
env:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/tauri.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: Tauri builds
on:
push:
branches:
branches-ignore:
- main
pull_request:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the reason we have this is because otherwise the workflows aren't able to run on PRs from downstream forks


concurrency:
group: ${{ github.ref }}-tauri-build
Expand Down Expand Up @@ -108,7 +107,6 @@ jobs:
- name: Run Rust tests with reduced debug artifacts
run: nix develop .#tauri-shell --command tauri-rs-test
env:
RUSTFLAGS: "-Cdebuginfo=0"
CARGO_INCREMENTAL: 0

- run: |
Expand Down
19 changes: 16 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@
name = "tauri-rs-test";
body = ''
set -euxo pipefail
cd tauri-app/src-tauri
cd tauri-app
ob-tauri-before-build
cd src-tauri
cargo test
'';
};
Expand All @@ -59,6 +61,7 @@

# Fix linting of generated types
cd tauri-app && npm i && npm run lint
ob-tauri-dylibs
'';
additionalBuildInputs = [
pkgs.wasm-bindgen-cli
Expand Down Expand Up @@ -180,6 +183,15 @@


npm i && npm run build
ob-tauri-dylibs
'';
};

ob-tauri-dylibs = rainix.mkTask.${system} {
name = "ob-tauri-dylibs";
body = ''
set -euxo pipefail

rm -rf lib
mkdir -p lib

Expand All @@ -206,7 +218,7 @@
install_name_tool -id @executable_path/../Frameworks/libusb-1.0.0.dylib lib/libusb-1.0.0.dylib
otool -L lib/libusb-1.0.0.dylib

cp ${pkgs.bzip2.out}/lib/libbz2.1.dylib lib/libbz2.1.dylib
cp ${old-pkgs.bzip2.out}/lib/libbz2.1.dylib lib/libbz2.1.dylib
chmod +w lib/libbz2.1.dylib
install_name_tool -id @executable_path/../Frameworks/libbz2.1.dylib lib/libbz2.1.dylib
otool -L lib/libbz2.1.dylib
Expand All @@ -225,7 +237,7 @@
install_name_tool -change ${pkgs.libiconv}/lib/libiconv.2.dylib @executable_path/../Frameworks/libiconv.2.dylib src-tauri/target/release/Raindex
install_name_tool -change ${pkgs.gettext}/lib/libintl.8.dylib @executable_path/../Frameworks/libintl.8.dylib src-tauri/target/release/Raindex
install_name_tool -change ${pkgs.libusb1}/lib/libusb-1.0.0.dylib @executable_path/../Frameworks/libusb-1.0.0.dylib src-tauri/target/release/Raindex
install_name_tool -change ${pkgs.bzip2.out}/lib/libbz2.1.dylib @executable_path/../Frameworks/libbz2.1.dylib src-tauri/target/release/Raindex
install_name_tool -change ${old-pkgs.bzip2.out}/lib/libbz2.1.dylib @executable_path/../Frameworks/libbz2.1.dylib src-tauri/target/release/Raindex

otool -L src-tauri/target/release/Raindex
grep_exit_code=0
Expand Down Expand Up @@ -316,6 +328,7 @@
packages.ob-tauri-before-bundle
packages.ob-tauri-before-release
packages.tauri-rs-test
packages.ob-tauri-dylibs
];
shellHook = rainix.devShells.${system}.tauri-shell.shellHook;
buildInputs = rainix.devShells.${system}.tauri-shell.buildInputs
Expand Down