tweak: Reduce non-required pub visibility. #202
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 | |
| on: | |
| push: | |
| branches: [master, main] | |
| pull_request: | |
| branches: [master, main, ts/*] | |
| workflow_dispatch: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| CARGO_INCREMENTAL: 0 | |
| RUSTFLAGS: "-D warnings" | |
| jobs: | |
| ci: | |
| name: CI | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache LLVM 21 | |
| id: cache-llvm | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ runner.temp }}/llvm-21-install.tar.gz | |
| key: v8-llvm-21-${{ runner.os }}-${{ runner.arch }}-${{ env.ImageOS }}-${{ hashFiles('Cargo.lock', 'scripts/install-llvm.sh', 'scripts/llvm.sh') }} | |
| - name: Restore LLVM from cache | |
| if: steps.cache-llvm.outputs.cache-hit == 'true' | |
| run: | | |
| sudo tar -xzf ${{ runner.temp }}/llvm-21-install.tar.gz -C / | |
| - name: Install LLVM 21 | |
| if: steps.cache-llvm.outputs.cache-hit != 'true' | |
| run: | | |
| bash scripts/install-llvm.sh | |
| sudo tar -czf ${{ runner.temp }}/llvm-21-install.tar.gz -C / \ | |
| usr/lib/llvm-21 \ | |
| usr/include/llvm-21 \ | |
| usr/include/llvm-c-21 \ | |
| usr/bin/llvm-config-21 \ | |
| usr/lib/x86_64-linux-gnu/libLLVM.so.21.1 | |
| - name: Log LLVM shared libraries | |
| run: ls /usr/lib/x86_64-linux-gnu/libLLVM* || true | |
| - name: Set LLVM environment variables | |
| run: | | |
| echo "LLVM_SYS_211_PREFIX=$(bash scripts/detect-llvm.sh)" >> $GITHUB_ENV | |
| # Debian/Ubuntu installs LLVM headers at /usr/include/llvm-21 | |
| # Set C_INCLUDE_PATH and CPLUS_INCLUDE_PATH so cc-rs can find them | |
| echo "C_INCLUDE_PATH=/usr/include/llvm-21" >> $GITHUB_ENV | |
| echo "CPLUS_INCLUDE_PATH=/usr/include/llvm-21" >> $GITHUB_ENV | |
| - name: Cache Rust build artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| prefix-key: "v1-rust-${{ hashFiles('Cargo.lock') }}" | |
| cache-on-failure: true | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Apply formatting fixes | |
| run: cargo fmt --all | |
| - name: Commit formatting fixes | |
| if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository | |
| uses: tcrypt25519/ci/.github/actions/commit-changes@main | |
| - name: Run clippy | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| - name: Install cargo-nextest | |
| uses: taiki-e/install-action@nextest | |
| - name: Check all targets | |
| run: cargo check --all-targets --all-features | |
| - name: Build | |
| run: cargo build --verbose --all-features | |
| - name: Run tests with nextest | |
| run: cargo nextest run --all-features --no-fail-fast | |
| - name: Run doctests | |
| run: cargo test --doc --all-features |