mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-04-23 11:36:13 +02:00
70 lines
1.8 KiB
YAML
70 lines
1.8 KiB
YAML
name: Test Rust
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- v1
|
|
- v2
|
|
paths:
|
|
- ".github/workflows/test-rust.yml"
|
|
- "plugins/*/src/**"
|
|
- "**/Cargo.toml"
|
|
- "**/Cargo.lock"
|
|
pull_request:
|
|
branches:
|
|
- v1
|
|
- v2
|
|
paths:
|
|
- ".github/workflows/test-rust.yml"
|
|
- "plugins/*/src/**"
|
|
- "**/Cargo.toml"
|
|
- "**/Cargo.lock"
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: install webkit2gtk and libudev for [authenticator]
|
|
if: matrix.platform == 'ubuntu-latest'
|
|
run: |
|
|
sudo apt-get update
|
|
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: Swatinem/rust-cache@v2
|
|
|
|
- name: create dummy dist
|
|
working-directory: examples/api
|
|
run: mkdir dist
|
|
|
|
- name: build
|
|
run: cargo build --workspace --exclude 'tauri-plugin-sql' --all-targets --all-features
|
|
|
|
- name: build sql:sqlite
|
|
run: cargo build --package 'tauri-plugin-sql' --all-targets --features sqlite
|
|
|
|
- name: build sql:mysql
|
|
run: cargo build --package 'tauri-plugin-sql' --all-targets --features mysql
|
|
|
|
- name: build sql:postgres
|
|
run: cargo build --package 'tauri-plugin-sql' --all-targets --features postgres
|