mirror of https://github.com/ospab/ostp.git
CI: restore run-name format, add check-and-test gate before all builds
This commit is contained in:
parent
9ac3a5386a
commit
458602cec6
|
|
@ -1,4 +1,6 @@
|
||||||
name: Universal CI/CD Release Matrix
|
name: CI/CD
|
||||||
|
|
||||||
|
run-name: "CI/CD: release version ${{ github.ref_name }}"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
|
@ -16,8 +18,41 @@ env:
|
||||||
RUST_BACKTRACE: short
|
RUST_BACKTRACE: short
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
check-and-test:
|
||||||
|
name: Check & Test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Rust toolchain
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
|
||||||
|
- name: Restore Cargo cache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cargo/registry/index/
|
||||||
|
~/.cargo/registry/cache/
|
||||||
|
~/.cargo/git/db/
|
||||||
|
target/
|
||||||
|
key: cargo-check-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
restore-keys: cargo-check-
|
||||||
|
|
||||||
|
- name: Install musl-tools
|
||||||
|
run: sudo apt-get update && sudo apt-get install -y musl-tools
|
||||||
|
|
||||||
|
- name: cargo check
|
||||||
|
run: cargo check --workspace
|
||||||
|
|
||||||
|
- name: cargo test
|
||||||
|
run: cargo test --workspace --lib
|
||||||
|
|
||||||
publish-release-matrix:
|
publish-release-matrix:
|
||||||
name: Release for ${{ matrix.target }}
|
name: Release for ${{ matrix.target }}
|
||||||
|
needs: check-and-test
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
|
@ -204,6 +239,7 @@ jobs:
|
||||||
|
|
||||||
build-windows-gui:
|
build-windows-gui:
|
||||||
name: Build Windows GUI (Tauri) - ${{ matrix.arch }}
|
name: Build Windows GUI (Tauri) - ${{ matrix.arch }}
|
||||||
|
needs: check-and-test
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
|
@ -277,6 +313,7 @@ jobs:
|
||||||
|
|
||||||
build-linux-gui:
|
build-linux-gui:
|
||||||
name: Build Linux GUI (Tauri) - ${{ matrix.arch }}
|
name: Build Linux GUI (Tauri) - ${{ matrix.arch }}
|
||||||
|
needs: check-and-test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
|
@ -336,6 +373,7 @@ jobs:
|
||||||
|
|
||||||
build-macos-gui:
|
build-macos-gui:
|
||||||
name: Build macOS GUI (Tauri) - ${{ matrix.arch }}
|
name: Build macOS GUI (Tauri) - ${{ matrix.arch }}
|
||||||
|
needs: check-and-test
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
|
@ -392,6 +430,7 @@ jobs:
|
||||||
|
|
||||||
build-android:
|
build-android:
|
||||||
name: Build Android Client (Flutter) - ${{ matrix.arch }}
|
name: Build Android Client (Flutter) - ${{ matrix.arch }}
|
||||||
|
needs: check-and-test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue