Merge pull request #171 from influxdata/crepererum/more-evil #575
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 | |
| # yamllint disable-line rule:truthy | |
| on: | |
| merge_group: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - v* | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Free disk space | |
| run: | | |
| df -h | |
| to_delete=( | |
| "/lib/firefox" | |
| "/lib/google-cloud-sdk" | |
| "/lib/jvm" | |
| "/lib/llvm-16" | |
| "/lib/llvm-17" | |
| "/opt/az" | |
| "/opt/google" | |
| "/opt/hostedtoolcache/CodeQL" | |
| "/opt/hostedtoolcache/PyPy" | |
| "/opt/hostedtoolcache/Ruby" | |
| "/opt/hostedtoolcache/go" | |
| "/opt/hostedtoolcache/node" | |
| "/opt/microsoft" | |
| "/opt/pipx" | |
| "/usr/share/swift" | |
| ) | |
| for d in "${to_delete[@]}"; do | |
| echo "delete $d" | |
| sudo rm -rf "$d" | |
| done | |
| df -h | |
| - name: Checkout | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| fetch-depth: 1 | |
| - name: Install `yamllint` | |
| run: pip install --requirement=.github/workflows/requirements.txt | |
| - name: Install `cargo-deny` & `just` | |
| uses: taiki-e/install-action@44c6d64aa62cd779e873306675c7a58e86d6d532 # v2 | |
| with: | |
| tool: cargo-deny,just | |
| - name: Install `tombi` | |
| uses: tombi-toml/setup-tombi@a9378ac9fe5c29df7d26263deacea4ac642af9c2 # v1 | |
| - name: Install stable toolchain | |
| uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master | |
| with: | |
| components: clippy, rustfmt | |
| toolchain: stable | |
| targets: wasm32-wasip2 | |
| - name: Rust Cache | |
| uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # v2.8.1 | |
| # Swatinem/rust-cache does NOT cache docs, see | |
| # https://github.com/Swatinem/rust-cache/issues/208 | |
| - name: Rustdoc Cache | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: target/doc | |
| key: v0-${{ runner.os }}-rustdoc-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| v0-${{ runner.os }}-rustdoc-${{ hashFiles('**/Cargo.lock') }} | |
| v0-${{ runner.os }}-rustdoc- | |
| - name: just check | |
| run: just check | |
| env: | |
| # Disable incremental compilation to avoid overhead. | |
| CARGO_INCREMENTAL: "0" | |
| # Disable full debug symbol generation to speed up CI build | |
| # "1" means line tables only, which is useful for panic tracebacks. | |
| CARGO_PROFILE_DEV_DEBUG: "1" | |
| - name: upload docs | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: docs | |
| path: target/doc | |
| if-no-files-found: error |