-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
57 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Build | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
name: ${{ matrix.job.target }} | ||
runs-on: ${{ matrix.job.os }} | ||
strategy: | ||
matrix: | ||
job: | ||
- target: x86_64-unknown-linux-gnu | ||
os: ubuntu-latest | ||
- target: aarch64-apple-darwin | ||
os: macos-latest | ||
- target: x86_64-pc-windows-msvc | ||
os: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
tauri-v1/target/ | ||
tauri-v2/target/ | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Setup Rust | ||
run: | | ||
rustup update | ||
rustup target add ${{ matrix.job.target }} | ||
- name: Install Linux dependencies | ||
if: runner.os == 'Linux' | ||
run: | | ||
sudo apt update | ||
sudo apt install libwebkit2gtk-4.0-dev build-essential curl wget file libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev -y | ||
sudo apt install libwebkit2gtk-4.1-dev libxdo-dev -y | ||
- name: Cargo fmt | ||
run: | | ||
cd tauri-v1 && cargo fmt --all -- --check && cd .. | ||
cd tauri-v2 && cargo fmt --all -- --check && cd .. | ||
- name: Cargo build v1 | ||
run: | | ||
cd tauri-v1 && cargo build --target ${{ matrix.job.target }} && cd .. | ||
- name: Cargo build v2 | ||
run: | | ||
cd tauri-v2 && cargo build --target ${{ matrix.job.target }} && cd .. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters