feat(ci): also test on Windows and macOS (#366)

pull/369/head
Lucas Fernandes Nogueira 2 years ago committed by GitHub
parent 22991af9f4
commit b064718f32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,4 +1,4 @@
name: Check MSRV name: Test Rust
on: on:
push: push:
@ -6,7 +6,7 @@ on:
- v1 - v1
- v2 - v2
paths: paths:
- ".github/workflows/msrv-check.yml" - ".github/workflows/test-rust.yml"
- "plugins/*/src/**" - "plugins/*/src/**"
- "**/Cargo.toml" - "**/Cargo.toml"
- "**/Cargo.lock" - "**/Cargo.lock"
@ -15,7 +15,7 @@ on:
- v1 - v1
- v2 - v2
paths: paths:
- ".github/workflows/msrv-check.yml" - ".github/workflows/test-rust.yml"
- "plugins/*/src/**" - "plugins/*/src/**"
- "**/Cargo.toml" - "**/Cargo.toml"
- "**/Cargo.lock" - "**/Cargo.lock"
@ -25,19 +25,29 @@ concurrency:
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
msrv: test:
runs-on: ubuntu-latest runs-on: ${{ matrix.platform }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: install webkit2gtk and libudev for [authenticator] - name: install webkit2gtk and libudev for [authenticator]
if: matrix.platform == 'ubuntu-latest'
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libudev-dev sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libudev-dev
- name: install openssl
if: matrix.platform == 'windows-latest'
run: |
echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
vcpkg install openssl:x64-windows-static-md
- uses: dtolnay/rust-toolchain@1.65.0 - uses: dtolnay/rust-toolchain@1.65.0
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2

14
Cargo.lock generated

@ -4960,7 +4960,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri" name = "tauri"
version = "2.0.0-alpha.8" version = "2.0.0-alpha.8"
source = "git+https://github.com/tauri-apps/tauri?branch=next#994e4fd6d9e649e0d76124cd6fcd18443ac585b0" source = "git+https://github.com/tauri-apps/tauri?branch=next#8ce32e74b5573931c3bc81e8e893a6d3b9686b0e"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bytes 1.4.0", "bytes 1.4.0",
@ -5010,7 +5010,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-build" name = "tauri-build"
version = "2.0.0-alpha.4" version = "2.0.0-alpha.4"
source = "git+https://github.com/tauri-apps/tauri?branch=next#994e4fd6d9e649e0d76124cd6fcd18443ac585b0" source = "git+https://github.com/tauri-apps/tauri?branch=next#8ce32e74b5573931c3bc81e8e893a6d3b9686b0e"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"cargo_toml", "cargo_toml",
@ -5030,7 +5030,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-codegen" name = "tauri-codegen"
version = "2.0.0-alpha.4" version = "2.0.0-alpha.4"
source = "git+https://github.com/tauri-apps/tauri?branch=next#994e4fd6d9e649e0d76124cd6fcd18443ac585b0" source = "git+https://github.com/tauri-apps/tauri?branch=next#8ce32e74b5573931c3bc81e8e893a6d3b9686b0e"
dependencies = [ dependencies = [
"base64 0.21.0", "base64 0.21.0",
"brotli", "brotli",
@ -5055,7 +5055,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-macros" name = "tauri-macros"
version = "2.0.0-alpha.4" version = "2.0.0-alpha.4"
source = "git+https://github.com/tauri-apps/tauri?branch=next#994e4fd6d9e649e0d76124cd6fcd18443ac585b0" source = "git+https://github.com/tauri-apps/tauri?branch=next#8ce32e74b5573931c3bc81e8e893a6d3b9686b0e"
dependencies = [ dependencies = [
"heck 0.4.1", "heck 0.4.1",
"proc-macro2", "proc-macro2",
@ -5449,7 +5449,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-runtime" name = "tauri-runtime"
version = "0.13.0-alpha.4" version = "0.13.0-alpha.4"
source = "git+https://github.com/tauri-apps/tauri?branch=next#994e4fd6d9e649e0d76124cd6fcd18443ac585b0" source = "git+https://github.com/tauri-apps/tauri?branch=next#8ce32e74b5573931c3bc81e8e893a6d3b9686b0e"
dependencies = [ dependencies = [
"gtk", "gtk",
"http", "http",
@ -5469,7 +5469,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-runtime-wry" name = "tauri-runtime-wry"
version = "0.13.0-alpha.4" version = "0.13.0-alpha.4"
source = "git+https://github.com/tauri-apps/tauri?branch=next#994e4fd6d9e649e0d76124cd6fcd18443ac585b0" source = "git+https://github.com/tauri-apps/tauri?branch=next#8ce32e74b5573931c3bc81e8e893a6d3b9686b0e"
dependencies = [ dependencies = [
"cocoa", "cocoa",
"gtk", "gtk",
@ -5489,7 +5489,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-utils" name = "tauri-utils"
version = "2.0.0-alpha.4" version = "2.0.0-alpha.4"
source = "git+https://github.com/tauri-apps/tauri?branch=next#994e4fd6d9e649e0d76124cd6fcd18443ac585b0" source = "git+https://github.com/tauri-apps/tauri?branch=next#8ce32e74b5573931c3bc81e8e893a6d3b9686b0e"
dependencies = [ dependencies = [
"aes-gcm 0.10.1", "aes-gcm 0.10.1",
"brotli", "brotli",

@ -243,7 +243,7 @@ mod imp {
#[cfg(all(windows, feature = "windows7-compat"))] #[cfg(all(windows, feature = "windows7-compat"))]
fn notify_win7<R: tauri::Runtime>(self, app: &tauri::AppHandle<R>) -> crate::Result<()> { fn notify_win7<R: tauri::Runtime>(self, app: &tauri::AppHandle<R>) -> crate::Result<()> {
let app = app.clone(); let app = app.clone();
let default_window_icon = app.manager.inner.default_window_icon.clone(); let default_window_icon = app.default_window_icon().cloned();
let _ = app.run_on_main_thread(move || { let _ = app.run_on_main_thread(move || {
let mut notification = win7_notifications::Notification::new(); let mut notification = win7_notifications::Notification::new();
if let Some(body) = self.body { if let Some(body) = self.body {

@ -610,7 +610,7 @@ impl<R: Runtime> Update<R> {
&self.extract_path, &self.extract_path,
self.with_elevated_task, self.with_elevated_task,
&self.app.config(), &self.app.config(),
&self.app.state::<UpdaterState>().config, &self.app.state::<crate::UpdaterState>().config,
)?; )?;
#[cfg(not(target_os = "windows"))] #[cfg(not(target_os = "windows"))]
copy_files_and_run(archive_buffer, &self.extract_path)?; copy_files_and_run(archive_buffer, &self.extract_path)?;
@ -738,7 +738,7 @@ fn copy_files_and_run<R: Read + Seek>(
// Run the EXE // Run the EXE
let mut installer = Command::new(found_path); let mut installer = Command::new(found_path);
if tauri::utils::config::WindowsUpdateInstallMode::Quiet if tauri::utils::config::WindowsUpdateInstallMode::Quiet
== config.tauri.bundle.updater.install_mode == config.tauri.bundle.updater.windows.install_mode
{ {
installer.arg("/S"); installer.arg("/S");
} }
@ -798,10 +798,11 @@ fn copy_files_and_run<R: Read + Seek>(
msi_path_arg.push(&found_path); msi_path_arg.push(&found_path);
msi_path_arg.push("\"\"\""); msi_path_arg.push("\"\"\"");
let mut msiexec_args = updater_config let mut msiexec_args = config
.tauri .tauri
.bundle .bundle
.updater .updater
.windows
.install_mode .install_mode
.clone() .clone()
.msiexec_args() .msiexec_args()

Loading…
Cancel
Save