Experimental Mobile Support #70
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
name: Check backend | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- '.github/workflows/backend.yml' | |
- 'package.json' | |
- 'src-tauri/**' | |
pull_request: | |
paths: | |
- '.github/workflows/backend.yml' | |
- 'package.json' | |
- 'src-tauri/**' | |
concurrency: | |
group: ${{ github.ref }}-${{ github.workflow }} | |
cancel-in-progress: true | |
env: | |
CARGO_INCREMENTAL: 0 | |
jobs: | |
rustfmt: | |
runs-on: ${{ matrix.platform }} | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [windows-latest, ubuntu-20.04, macos-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1.8 | |
with: | |
components: rustfmt | |
- name: Rustfmt check | |
run: cargo fmt --manifest-path ./src-tauri/Cargo.toml --all -- --check | |
clippy: | |
runs-on: ${{ matrix.platform }} | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [windows-latest, ubuntu-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1.8 | |
with: | |
components: clippy | |
- uses: pnpm/action-setup@v3 | |
with: | |
version: latest | |
- name: Install Linux dependencies | |
if: matrix.platform == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libwebkit2gtk-4.1-dev \ | |
build-essential \ | |
curl \ | |
wget \ | |
libssl-dev \ | |
libgtk-3-dev \ | |
libayatana-appindicator3-dev \ | |
librsvg2-dev | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
src-tauri/target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Build frontend (creates '../dist') | |
run: pnpm install && pnpm build | |
- name: Create fake game.dat | |
run: touch game.dat | |
- name: Create fake ext file | |
run: touch ext/index_min.js | |
- name: Clippy check | |
run: cargo clippy --manifest-path ./src-tauri/Cargo.toml --features offline -- -D warnings |