diff --git a/.github/actions/setup-tauri/action.yml b/.github/actions/setup-tauri/action.yml index dfb639b53..2684e04c5 100644 --- a/.github/actions/setup-tauri/action.yml +++ b/.github/actions/setup-tauri/action.yml @@ -1,6 +1,11 @@ # From https://tauri.app/v1/guides/getting-started/prerequisites name: "Setup Tauri" description: "Sets up the dependencies for building and testing Tauri apps" +inputs: + runtime: + description: "Whether to also set up runtime dependencies" + required: false + default: false runs: using: "composite" steps: @@ -20,17 +25,17 @@ runs: # This is what the Tauri CI tests use # - name: Install Tauri runtime deps - if: ${{ runner.os == 'Linux' }} + if: ${{ runner.os == 'Linux' && inputs.runtime == 'true' }} run: sudo apt-get install at-spi2-core xvfb shell: bash - uses: actions/cache@v4 - if: ${{ runner.os == 'Windows' }} + if: ${{ runner.os == 'Windows' && inputs.runtime == 'true' }} id: cache-webview2-installer with: path: WebView2Installer.exe key: ${{ runner.os }}-${{ runner.arch }}-webview2-offline-installer - name: Download WebView2 bootstrapper - if: ${{ runner.os == 'Windows' && steps.cache-webview2-installer.outputs.cache-hit != 'true' }} + if: ${{ runner.os == 'Windows' && steps.cache-webview2-installer.outputs.cache-hit != 'true' && inputs.runtime == 'true' }} # This is the "Evergreen" bootstrapper from Microsoft # # Unfortunately, this makes the test non-deterministic. @@ -38,7 +43,7 @@ runs: run: Invoke-WebRequest -Uri https://go.microsoft.com/fwlink/?linkid=2124701 -OutFile WebView2Installer.exe shell: pwsh - name: Install WebView2 - if: ${{ runner.os == 'Windows' }} + if: ${{ runner.os == 'Windows' && inputs.runtime == 'true' }} # This downloads about 200 MB and takes about 5 minutes on my VM # So we could fault in WebView2 from the client exe without the MSI if we needed. # Currently the MSI does this and it's a little janky. diff --git a/.github/workflows/_rust.yml b/.github/workflows/_rust.yml index 6eb9e4e9c..4f9d6de4b 100644 --- a/.github/workflows/_rust.yml +++ b/.github/workflows/_rust.yml @@ -64,7 +64,6 @@ jobs: - uses: ./.github/actions/setup-rust id: setup-rust - uses: ./.github/actions/setup-tauri - timeout-minutes: 5 - run: cargo test --all-features ${{ steps.setup-rust.outputs.packages }} -- --include-ignored env: # @@ -100,6 +99,8 @@ jobs: - uses: ./.github/actions/setup-rust - uses: ./.github/actions/setup-tauri timeout-minutes: 5 + with: + runtime: true - name: pnpm install run: | pnpm install