Skip to content

Commit

Permalink
fix: Fix bundler&cli MSRV (#10499)
Browse files Browse the repository at this point in the history
* chore(deps) Update Tauri Bundler

* ci: Also check bundler and cli in msrv check

* fix

* 1

* 2

* 3

* msrv

* downgrade handlebars again

* x

* x

* x

* x

* x

* x

* this makes no sense

* srsly wtf

* me dumb dumb

* bufreader

* x

* x

* changefile

* fix permissions

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Lucas Nogueira <[email protected]>
  • Loading branch information
3 people authored Aug 8, 2024
1 parent 1aba109 commit 297cd55
Show file tree
Hide file tree
Showing 14 changed files with 5,027 additions and 821 deletions.
6 changes: 6 additions & 0 deletions .changes/bundler-cli-msrv.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
tauri-bundler: patch:bug
tauri-cli: patch:bug
---

Changed the MSRV in Cargo.toml for `tauri-bundler` and `tauri-cli` to 1.71. The crates effectively required 1.70/1.71 to build for a while already.
75 changes: 56 additions & 19 deletions .github/workflows/covector-version-or-publish-v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ jobs:
strategy:
fail-fast: false
matrix:
project:
- name: core
flags: '--manifest-path=./Cargo.toml --features tracing,compression,wry,linux-protocol-headers,isolation,custom-protocol,api-all,cli,updater,system-tray,windows7-compat,http-multipart,test'
- name: bundler
flags: '--manifest-path=./tooling/bundler/Cargo.toml'
toolchain: '1.71.0'
- name: cli
flags: '--manifest-path=./tooling/cli/Cargo.toml'
toolchain: '1.71.0'

platform:
- {
target: x86_64-pc-windows-msvc,
Expand All @@ -35,13 +45,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: install rust ${{ matrix.platform.toolchain }}
uses: actions-rs/toolchain@v1
- name: install rust ${{ matrix.project.toolchain || matrix.platform.toolchain }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.platform.toolchain }}
toolchain: ${{ matrix.project.toolchain || matrix.platform.toolchain }}
target: ${{ matrix.platform.target }}
override: true
default: true

- name: install Linux dependencies
if: contains(matrix.platform.target, 'unknown-linux')
Expand All @@ -51,10 +59,19 @@ jobs:
- uses: Swatinem/rust-cache@v2

- name: delete lockfile
run: rm Cargo.lock
- name: regen lockfile
run: |
rm Cargo.lock
rm tooling/bundler/Cargo.lock
rm tooling/cli/Cargo.lock
cargo generate-lockfile
cd tooling/bundler
cargo generate-lockfile
cd ../cli
cargo generate-lockfile
- name: Downgrade crates with MSRV conflict
- name: Downgrade crates with MSRV conflict (core)
if: ${{ matrix.project.name == 'core' }}
# The --precise flag can only be used once per invocation.
run: |
cargo update -p system-deps:6.2.2 --precise 6.1.1
Expand Down Expand Up @@ -113,9 +130,30 @@ jobs:
cargo update -p derive_more --precise 0.99.17
cargo update -p native-tls --precise 0.2.11
cargo update -p ppv-lite86 --precise 0.2.17
cargo update -p xml-rs --precise 0.8.20
- name: Downgrade crates with MSRV conflict (bundler)
# This is for the bundler but since cli depends on the bundler we enable it for the cli too
if: ${{ matrix.project.name != 'core' }}
# The --precise flag can only be used once per invocation.
run: |
cd tooling/bundler
cargo update -p ravif --precise 0.11.5
cargo update -p bitstream-io --precise 2.3.0
# Not really required since it's a binary
- name: Downgrade crates with MSRV conflict (cli)
if: ${{ matrix.project.name == 'cli' }}
# The --precise flag can only be used once per invocation.
run: |
cd tooling/cli
cargo update -p clap_complete --precise 4.4.10
cargo update -p clap --precise 4.4.18
cargo update -p ravif --precise 0.11.5
cargo update -p bitstream-io --precise 2.3.0
- name: test build
run: cargo check --target ${{ matrix.platform.target }} --features tracing,compression,wry,linux-protocol-headers,isolation,custom-protocol,api-all,cli,updater,system-tray,windows7-compat,http-multipart,test
run: cargo check --target ${{ matrix.platform.target }} ${{ matrix.project.flags }}

run-integration-tests:
runs-on: ${{ matrix.platform }}
Expand All @@ -132,9 +170,7 @@ jobs:
with:
fetch-depth: 0
- name: install stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
uses: dtolnay/rust-toolchain@stable
- name: install Linux dependencies
if: matrix.platform == 'ubuntu-latest'
run: |
Expand All @@ -148,10 +184,7 @@ jobs:
tooling/cli
- name: build CLI
uses: actions-rs/cargo@v1
with:
command: build
args: --manifest-path ./tooling/cli/Cargo.toml
run: cargo build --manifest-path ./tooling/cli/Cargo.toml

- name: run integration tests
run: cargo test --test '*' -- --ignored
Expand All @@ -167,6 +200,10 @@ jobs:
version-or-publish:
runs-on: ubuntu-latest
timeout-minutes: 65
permissions:
actions: write # required for workflow_dispatch
contents: write # required to create new releases
pull-requests: write # required to open version update pr
outputs:
change: ${{ steps.covector.outputs.change }}
commandRan: ${{ steps.covector.outputs.commandRan }}
Expand All @@ -178,7 +215,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
Expand Down Expand Up @@ -229,12 +266,12 @@ jobs:
contains(steps.covector.outputs.packagesPublished, '@tauri-apps/cli')
run: gh workflow run 31554138 -r 1.x -f releaseId=${{ steps.covector.outputs['-tauri-apps-cli-releaseId'] }}
env:
GH_TOKEN: ${{ secrets.ORG_TAURI_BOT_PAT }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Trigger `tauri-cli` publishing workflow
if: |
steps.covector.outputs.successfulPublish == 'true' &&
contains(steps.covector.outputs.packagesPublished, 'tauri-cli')
run: gh workflow run 31554139 -r 1.x
env:
GH_TOKEN: ${{ secrets.ORG_TAURI_BOT_PAT }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 0 additions & 1 deletion tooling/bundler/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
target
Cargo.lock
.DS_Store
*.rs.bk
*~
Loading

0 comments on commit 297cd55

Please sign in to comment.