Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
elonehoo committed Sep 13, 2024
1 parent 7c42932 commit 2bdb266
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions .github/workflows/test-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,21 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-20.04, windows-latest]
config:
- os: ubuntu-latest
arch: x86_64
rust_target: x86_64-unknown-linux-gnu
- os: macos-13
arch: x86_64
rust_target: x86_64-apple-darwin
- os: macos-latest
arch: aarch64
rust_target: aarch64-apple-darwin
- os: windows-latest
arch: x86_64
rust_target: x86_64-pc-windows-msvc

runs-on: ${{ matrix.platform }}
runs-on: ${{ matrix.config.os }}
steps:
- uses: actions/checkout@v4

Expand All @@ -28,25 +40,24 @@ jobs:
- name: install Rust nightly
uses: dtolnay/rust-toolchain@nightly

- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
- name: Install dependencies (ubuntu only)
if: matrix.config.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libx11-dev libxdo-dev libxcb-shape0-dev libxcb-xfixes0-dev
sudo apt-get install -y libunwind-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio
- name: install dependencies (mac only)
if: matrix.platform == 'macos-latest'
- name: Install dependencies (mac only)
if: matrix.config.os == 'macos-latest'
run: |
rustup target add aarch64-apple-darwin
rustup target add x86_64-apple-darwin
- name: install frontend dependencies
run: pnpm install --no-frozen-lockfile # change this to npm or pnpm depending on which one you use

- name: Build Tauri App (MacOS Universal)
uses: tauri-apps/tauri-action@dev
if: matrix.platform == 'macos-latest'
if: matrix.config.os == 'macos-latest'
id: tauri-action-mac
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -56,7 +67,7 @@ jobs:

- name: Build Tauri App
uses: tauri-apps/tauri-action@dev
if: matrix.platform != 'macos-latest'
if: matrix.config.os != 'macos-latest'
id: tauri-action
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 2bdb266

Please sign in to comment.