Resolve binary path when binaries are included #8
Workflow file for this run
This file contains hidden or 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: CI Rust | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - '.github/workflows/rust-ci.yml' | |
| - '.github/actions/install-tauri-deps/**' | |
| - 'src-tauri/**' | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - '.github/workflows/rust-ci.yml' | |
| - '.github/actions/install-tauri-deps/**' | |
| - 'src-tauri/**' | |
| jobs: | |
| lint: | |
| name: 'Lint' | |
| runs-on: ubuntu-latest | |
| env: | |
| CARGO_TERM_COLOR: always | |
| TAURI_SKIP_UPDATE_CHECK: 1 | |
| CARGO_TARGET_DIR: src-tauri/target | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js for isolation build | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - name: Build isolation frontend | |
| run: | | |
| npm ci | |
| npm run build:isolation | |
| - name: Install system dependencies for Tauri | |
| uses: ./.github/actions/install-tauri-deps | |
| - name: Cache Rust registry | |
| if: ${{ github.event_name == 'push' }} | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/registry | |
| key: ${{ runner.os }}-cargo-registry-${{ hashFiles('src-tauri/Cargo.toml') }} | |
| - name: Cache Rust build artifacts | |
| if: ${{ github.event_name == 'push' }} | |
| uses: actions/cache@v4 | |
| with: | |
| path: src-tauri/target | |
| key: ${{ runner.os }}-cargo-target-${{ hashFiles('src-tauri/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-target- | |
| - name: Set up Rust toolchain (nightly + Clippy) | |
| uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| components: clippy,rustfmt | |
| - name: Run clippy | |
| run: cargo clippy --manifest-path=src-tauri/Cargo.toml --all-features --all-targets -- -D warnings | |
| - name: Run cargo fmt | |
| run: cargo fmt --manifest-path=src-tauri/Cargo.toml --all -- --check | |
| unit-tests: | |
| name: 'Unit Tests' | |
| runs-on: ubuntu-latest | |
| env: | |
| CARGO_TERM_COLOR: always | |
| TAURI_SKIP_UPDATE_CHECK: 1 | |
| CARGO_TARGET_DIR: src-tauri/target | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js for isolation build | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - name: Build isolation frontend | |
| run: | | |
| npm ci | |
| npm run build:isolation | |
| - name: Install system dependencies for Tauri | |
| uses: ./.github/actions/install-tauri-deps | |
| - name: Cache Rust registry | |
| if: ${{ github.event_name == 'push' }} | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/registry | |
| key: ${{ runner.os }}-cargo-registry-${{ hashFiles('src-tauri/Cargo.toml') }} | |
| - name: Cache Rust build artifacts | |
| if: ${{ github.event_name == 'push' }} | |
| uses: actions/cache@v4 | |
| with: | |
| path: src-tauri/target | |
| key: ${{ runner.os }}-cargo-target-${{ hashFiles('src-tauri/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-target- | |
| - name: Set up Rust toolchain (nightly + LLVM tools) | |
| uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| components: llvm-tools-preview | |
| - name: Install cargo-llvm-cov | |
| run: cargo install cargo-llvm-cov --locked | |
| - name: Generate Rust coverage | |
| run: | | |
| mkdir -p coverage/rust | |
| cargo llvm-cov --manifest-path=src-tauri/Cargo.toml --lcov --output-path=coverage/rust/lcov.info --remap-path-prefix --all-features --all-targets | |
| - name: Upload Rust coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: coverage/rust/lcov.info | |
| flags: rust-units | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: true |