chore(deps): update rust crate ctor to v1.0.12 #306
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: Code Quality | |
| # spell-checker:ignore Swatinem sccache | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| env: | |
| STYLE_FAIL_ON_FAULT: true | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| jobs: | |
| fmt: | |
| name: cargo fmt --all -- --check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - run: cargo fmt --all -- --check | |
| clippy: | |
| name: cargo clippy | |
| runs-on: ${{ matrix.job.os }} | |
| env: | |
| SCCACHE_GHA_ENABLED: "true" | |
| RUSTC_WRAPPER: "sccache" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| job: | |
| - { os: ubuntu-latest } | |
| - { os: macos-latest } | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Run sccache-cache | |
| uses: mozilla-actions/sccache-action@v0.0.11 | |
| - name: Initialize workflow variables | |
| id: vars | |
| shell: bash | |
| run: | | |
| ## VARs setup | |
| outputs() { step_id="${{ github.action }}"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; } | |
| # failure mode | |
| unset FAIL_ON_FAULT ; case '${{ env.STYLE_FAIL_ON_FAULT }}' in | |
| ''|0|f|false|n|no|off) FAULT_TYPE=warning ;; | |
| *) FAIL_ON_FAULT=true ; FAULT_TYPE=error ;; | |
| esac; | |
| outputs FAIL_ON_FAULT FAULT_TYPE | |
| - name: "`cargo clippy` lint testing" | |
| shell: bash | |
| run: | | |
| ## `cargo clippy` lint testing | |
| unset fault | |
| fault_type="${{ steps.vars.outputs.FAULT_TYPE }}" | |
| fault_prefix=$(echo "$fault_type" | tr '[:lower:]' '[:upper:]') | |
| S=$(cargo clippy --workspace -- -D warnings 2>&1) && printf "%s\n" "$S" || { printf "%s\n" "$S" ; printf "%s" "$S" | sed -E -n -e '/^error:/{' -e "N; s/^error:[[:space:]]+(.*)\\n[[:space:]]+-->[[:space:]]+(.*):([0-9]+):([0-9]+).*$/::${fault_type} file=\2,line=\3,col=\4::${fault_prefix}: \`cargo clippy\`: \1 (file:'\2', line:\3)/p;" -e '}' ; fault=true ; } | |
| if [ -n "${{ steps.vars.outputs.FAIL_ON_FAULT }}" ] && [ -n "$fault" ]; then exit 1 ; fi |