diff --git a/.github/workflows/test-core.yml b/.github/workflows/test-core.yml index 5735c3bb9..855de09ee 100644 --- a/.github/workflows/test-core.yml +++ b/.github/workflows/test-core.yml @@ -18,6 +18,9 @@ env: RUST_BACKTRACE: 1 CARGO_INCREMENTAL: 0 # This is set to 0 by the https://github.com/Swatinem/rust-cache CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency. + WRY_ANDROID_REVERSED_DOMAIN: 'app.tauri' + WRY_ANDROID_APP_NAME_SNAKE_CASE: 'dev' + WRY_ANDROID_KOTLIN_FILES_OUT_DIR: 'out' concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -34,17 +37,37 @@ jobs: - { target: x86_64-pc-windows-msvc, os: windows-latest, - toolchain: '1.61.0' + toolchain: '1.61.0', + cross: false, + command: 'test' } - { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, - toolchain: '1.57.0' + toolchain: '1.57.0', + cross: false, + command: 'test' } - { target: x86_64-apple-darwin, os: macos-latest, - toolchain: '1.57.0' + toolchain: '1.57.0', + cross: false, + command: 'test' + } + - { + target: aarch64-apple-ios, + os: macos-latest, + toolchain: '1.57.0', + cross: false, + acommand: 'build' + } + - { + target: aarch64-linux-android, + os: ubuntu-latest, + toolchain: '1.57.0', + cross: true, + command: 'build' } steps: @@ -54,6 +77,7 @@ jobs: with: toolchain: ${{ matrix.platform.toolchain }} target: ${{ matrix.platform.target }} + override: true - name: install Linux dependencies if: contains(matrix.platform.target, 'unknown-linux') run: | @@ -99,8 +123,31 @@ jobs: ${{ matrix.platform.os }}-${{ matrix.platform.toolchain }}- ${{ matrix.platform.os }}- - - name: test + - name: create kotlin out dir + if: contains(matrix.platform.target, 'android') + run: mkdir out + + - name: pin time run: | - cargo test --target ${{ matrix.platform.target }} - cargo test --target ${{ matrix.platform.target }} --features api-all - cargo test --target ${{ matrix.platform.target }} --features compression,wry,isolation,custom-protocol,api-all,cli,updater,system-tray,windows7-compat,http-multipart + cargo update -p time --precise 0.3.13 + + - name: test + uses: actions-rs/cargo@v1 + with: + use-cross: ${{ matrix.platform.cross }} + command: ${{ matrix.platform.command }} + args: --target ${{ matrix.platform.target }} --features native-tls-vendored + + - name: test api-all + uses: actions-rs/cargo@v1 + with: + use-cross: ${{ matrix.platform.cross }} + command: ${{ matrix.platform.command }} + args: --target ${{ matrix.platform.target }} --features native-tls-vendored,api-all + + - name: test all features + uses: actions-rs/cargo@v1 + with: + use-cross: ${{ matrix.platform.cross }} + command: ${{ matrix.platform.command }} + args: --target ${{ matrix.platform.target }} --features native-tls-vendored,compression,wry,isolation,custom-protocol,api-all,cli,updater,system-tray,windows7-compat,http-multipart diff --git a/Cargo.toml b/Cargo.toml index 4d739f148..53de27cd0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,6 @@ exclude = [ # default to small, optimized workspace release binaries [profile.release] -strip = true panic = "abort" codegen-units = 1 lto = true diff --git a/core/tauri-codegen/Cargo.toml b/core/tauri-codegen/Cargo.toml index 0c90dff3e..f8c17181d 100644 --- a/core/tauri-codegen/Cargo.toml +++ b/core/tauri-codegen/Cargo.toml @@ -29,9 +29,11 @@ semver = "1" ico = "0.1" png = "0.17" json-patch = "0.2" -local-ip-address = "0.4" url = "2" +[target."cfg(any(windows, target_os = \"linux\", target_os = \"macos\"))".dependencies] +local-ip-address = "0.4" + [target."cfg(target_os = \"macos\")".dependencies] plist = "1" time = { version = "0.3", features = [ "parsing", "formatting" ] } diff --git a/core/tauri-codegen/src/context.rs b/core/tauri-codegen/src/context.rs index 977c41513..b454b4e39 100644 --- a/core/tauri-codegen/src/context.rs +++ b/core/tauri-codegen/src/context.rs @@ -155,6 +155,7 @@ pub fn context_codegen(data: ContextData) -> Result PathBuf { #[cfg(target_os = "ios")] fn bundle_path(root_dir: &Path, _version: &str) -> PathBuf { - root_dir.join(format!("target/debug/bundle/ios/app-updater.app")) + root_dir.join(format!("target/debug/bundle/ios/app-updater.ipa")) +} + +#[cfg(target_os = "android")] +fn bundle_path(root_dir: &Path, _version: &str) -> PathBuf { + root_dir.join(format!("target/debug/bundle/android/app-updater.apk")) } #[cfg(windows)]