From 295a67ff748544f876a71764ee4be7b7f8d9fd7e Mon Sep 17 00:00:00 2001 From: hazre Date: Sat, 25 Jul 2026 10:30:30 +0200 Subject: [PATCH] fix(ci): revert some mise changes and add workarounds Signed-off-by: hazre --- .github/actions/setup/action.yml | 23 ++++++++++++++------ .github/workflows/prepare-release.yml | 6 +++--- .github/workflows/release.yml | 6 +++--- .github/workflows/tauri-build.yml | 9 ++++---- mise.toml | 30 +++------------------------ pnpm-workspace.yaml | 3 +++ 6 files changed, 33 insertions(+), 44 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 870caa80e..5a222f956 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -23,19 +23,24 @@ runs: using: composite steps: - name: Setup tools (mise) + id: setup-mise uses: jdx/mise-action@dad1bfd3df957f44999b559dd69dc1671cb4e9ea # v4.2.1 with: cache: true + - name: Cache Rust toolchain (workaround jdx/mise-action#215) + if: ${{ inputs.tauri == 'true' }} + id: cache-rust + uses: actions/cache@5ecf6929733c1215af2f1b6cbaf15e157b97a9f7 # v5.0.1 + with: + path: ~/.rustup/toolchains/ + key: rust-${{ runner.os }}-${{ hashFiles('rust-toolchain.toml') }} + restore-keys: rust-${{ runner.os }}- + - name: Trust project mise configuration shell: bash working-directory: ${{ github.workspace }} - run: | - mise trust "$GITHUB_WORKSPACE/mise.toml" - mise trust --all "$GITHUB_WORKSPACE" - mise settings set trusted_config_paths "$GITHUB_WORKSPACE" - mise settings add trusted_config_paths "*" - echo "MISE_TRUSTED_CONFIG_PATHS=$GITHUB_WORKSPACE" >> "$GITHUB_ENV" + run: mise settings set trusted_config_paths "$GITHUB_WORKSPACE" - name: Install dependencies shell: bash @@ -50,6 +55,12 @@ runs: working-directory: ${{ github.workspace }} run: mise run tauri:setup + - name: Force reinstall Rust on cache mismatch + if: ${{ inputs.tauri == 'true' && steps.setup-mise.outputs.cache-hit == 'true' && steps.cache-rust.outputs.cache-hit != 'true' }} + shell: bash + working-directory: ${{ github.workspace }} + run: mise install rust --force + - name: Build app if: ${{ inputs.build == 'true' }} shell: bash diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml index e89ff636b..ca3be0fa3 100644 --- a/.github/workflows/prepare-release.yml +++ b/.github/workflows/prepare-release.yml @@ -29,10 +29,10 @@ jobs: persist-credentials: true token: ${{ steps.generate-token.outputs.token }} - - name: Setup mise - uses: jdx/mise-action@dad1bfd3df957f44999b559dd69dc1671cb4e9ea # v4.2.1 + - name: Setup app + uses: ./.github/actions/setup with: - cache: true + install-command: '' - uses: fregante/setup-git-user@024bc0b8e177d7e77203b48dab6fb45666854b35 # v2.0.2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e05914999..c2ef22784 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,10 +28,10 @@ jobs: persist-credentials: true token: ${{ steps.generate-token.outputs.token }} - - name: Setup mise - uses: jdx/mise-action@dad1bfd3df957f44999b559dd69dc1671cb4e9ea # v4.2.1 + - name: Setup app + uses: ./.github/actions/setup with: - cache: true + install-command: '' - name: Create Release run: mise run knope -- release --verbose diff --git a/.github/workflows/tauri-build.yml b/.github/workflows/tauri-build.yml index fe43e8b86..4d99995a4 100644 --- a/.github/workflows/tauri-build.yml +++ b/.github/workflows/tauri-build.yml @@ -448,6 +448,7 @@ jobs: CARGO_INCREMENTAL: 0 CARGO_TERM_COLOR: always NODE_OPTIONS: --max-old-space-size=8192 + RUST_TARGETS: aarch64-apple-ios steps: - name: Checkout repository uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 @@ -460,11 +461,9 @@ jobs: with: tauri: 'true' - - name: Setup Rust - uses: dtolnay/rust-toolchain@2c7215f132e9ebf062739d9130488b56d53c060c # stable - with: - toolchain: 1.97.1 - targets: aarch64-apple-ios + - name: Add Rust targets + shell: bash + run: rustup target add $RUST_TARGETS - name: Cache Rust build uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 diff --git a/mise.toml b/mise.toml index 76ce73f8e..1dc517087 100644 --- a/mise.toml +++ b/mise.toml @@ -8,6 +8,9 @@ idiomatic_version_file_enable_tools = ["pnpm", "node"] minimum_release_age = "1d" experimental = true +[task_config] +includes = ["scripts"] + [tasks.setup] description = "Install dependencies with pnpm" run = 'pnpm install' @@ -90,33 +93,6 @@ run = [ "winget install --id Microsoft.EdgeWebView2Runtime --source winget", ] -[tasks.tauri] -description = "Run Tauri CLI" -depends = ["tauri:setup"] -run = "node scripts/tauri.js" -raw_args = true - -[tasks."icons:symlink"] -description = "Create Tauri icon symlinks" -run = "node scripts/icons/symlink.js" -raw_args = true - -[tasks."icons:replace"] -description = "Replace icon assets from SVG inputs" -run = "node scripts/icons/replace.js" -raw_args = true -tools = { ffmpeg = "7.1.1" } - -[tasks."cef:copy-libs"] -description = "Copy CEF runtime libs next to the built binary" -run = "bash scripts/cef/copy-libs.sh" -raw_args = true - -[tasks."cef:package"] -description = "Package CEF build into deb/rpm/AppImage" -run = "bash scripts/cef/package.sh" -raw_args = true -tools = { nfpm = "2.47.0", "github:AppImage/appimagetool" = { version = "1.9.1", matching = ".AppImage" } } [tasks."cargo:lint"] description = "Check Rust formatting and Clippy lints" diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 0b5e9b21e..a42810326 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -3,8 +3,11 @@ allowBuilds: '@sentry/cli': true '@swc/core': true cloudflared: true + cpu-features: true esbuild: true + protobufjs: true sharp: true + ssh2: true unrs-resolver: true workerd: true engineStrict: true