Tag & Ref Management, UX Improvements #334
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: Build | |
| on: | |
| push: | |
| branches: | |
| - '*' | |
| pull_request: | |
| branches: | |
| - master | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| prepare: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| msrv: ${{ steps.get-msrv.outputs.msrv }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Get MSRV | |
| id: get-msrv | |
| run: | | |
| MSRV=$(grep '^rust-version' Cargo.toml | cut -d '"' -f 2) | |
| echo "msrv=$MSRV" >> $GITHUB_OUTPUT | |
| lint: | |
| needs: prepare | |
| strategy: | |
| matrix: | |
| versions: | |
| - stable | |
| - ${{ needs.prepare.outputs.msrv }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ matrix.versions }} | |
| components: rustfmt, clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Version | |
| run: | | |
| rustc --version | |
| cargo --version | |
| cargo fmt -- --version | |
| cargo clippy -- --version | |
| - name: Format | |
| run: cargo fmt --all -- --check | |
| - name: Build | |
| run: cargo build --verbose | |
| - name: Lint | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| - name: Run tests | |
| run: cargo test --verbose | |
| build: | |
| strategy: | |
| matrix: | |
| # x86_64-unknown-linux-gnu build is included in the lint job, so skip it here | |
| targets: | |
| - target: x86_64-unknown-linux-musl | |
| os: ubuntu-latest | |
| - target: aarch64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| - target: aarch64-unknown-linux-musl | |
| os: ubuntu-latest | |
| - target: x86_64-apple-darwin | |
| os: macos-latest | |
| - target: aarch64-apple-darwin | |
| os: macos-latest | |
| runs-on: ${{ matrix.targets.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup | |
| run: rustup target add ${{ matrix.targets.target }} | |
| - name: Build | |
| uses: houseabsolute/[email protected] | |
| with: | |
| command: build | |
| target: ${{ matrix.targets.target }} |