mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-10-02 22:06:50 +02:00
ci: run clippy on all platforms (#3650)
This commit is contained in:
5 files changed
+48
-21
No files matched your search
@@ -149,24 +149,48 @@ jobs:
|
||||
clippy:
|
||||
needs: changes
|
||||
if: ${{ needs.changes.outputs.packages != '[]' && needs.changes.outputs.packages != '' }}
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ${{ matrix.platform.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
package: ${{ fromJSON(needs.changes.outputs.packages) }}
|
||||
platform:
|
||||
- target: x86_64-pc-windows-msvc
|
||||
os: windows-latest
|
||||
cargo: 'cargo'
|
||||
- target: x86_64-unknown-linux-gnu
|
||||
os: ubuntu-latest
|
||||
cargo: 'cargo'
|
||||
- target: aarch64-apple-darwin
|
||||
os: macos-latest
|
||||
cargo: 'cargo'
|
||||
- target: aarch64-apple-ios
|
||||
os: macos-latest
|
||||
cargo: 'cargo'
|
||||
- target: aarch64-linux-android
|
||||
os: ubuntu-latest
|
||||
cargo: 'cross'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
|
||||
- name: install webkit2gtk
|
||||
- name: install Linux dependencies
|
||||
if: contains(matrix.platform.target, 'unknown-linux')
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev
|
||||
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.1 libayatana-appindicator3-dev
|
||||
|
||||
- name: Install cross
|
||||
if: ${{ matrix.platform.cargo == 'cross' }}
|
||||
uses: taiki-e/install-action@v2
|
||||
with:
|
||||
tool: cross@0.2.5
|
||||
|
||||
- name: Install clippy with stable toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: clippy
|
||||
targets: ${{ matrix.platform.target }}
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
@@ -176,8 +200,8 @@ jobs:
|
||||
save-if: ${{ (github.ref == 'refs/heads/v2' || github.ref == 'refs/heads/v3') && matrix.package == needs.changes.outputs.saver }}
|
||||
|
||||
- name: clippy ${{ matrix.package }}
|
||||
run: cargo clippy --package ${{ matrix.package }} --all-targets -- -D warnings
|
||||
run: ${{ matrix.platform.cargo }} clippy --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets -- -D warnings
|
||||
|
||||
- name: clippy ${{ matrix.package }} --all-features
|
||||
if: matrix.package != 'tauri-plugin-dialog'
|
||||
run: cargo clippy --package ${{ matrix.package }} --all-targets --all-features -- -D warnings
|
||||
run: ${{ matrix.platform.cargo }} clippy --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets --all-features -- -D warnings
|
||||
Reference in new issue
Block a user