address typo in docs, fix #434 #2166
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: build | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
env: | |
RUSTFLAGS: "-D warnings" | |
RUST_BACKTRACE: short | |
NEXTEST_PROFILE: ci | |
CI: 1 | |
SCCACHE_GHA_ENABLED: "true" | |
RUSTC_WRAPPER: "sccache" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: | | |
${{ github.event_name != 'pull_request' || | |
github.event.pull_request.head.repo.full_name != | |
github.event.pull_request.base.repo.full_name }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Remove rust-toolchain.toml | |
shell: bash | |
run: | | |
# so we don't add tooling for all targets | |
rm rust-toolchain.toml | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy, rustfmt | |
- name: Run sccache-cache | |
uses: mozilla-actions/[email protected] | |
- name: Lints | |
shell: bash | |
run: | | |
cargo fmt --all --check | |
cargo clippy -- --no-deps -Dclippy::pedantic -Dwarnings | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: latest | |
- name: Build crux | |
shell: bash | |
run: cargo build --workspace | |
- name: Install nextest | |
shell: bash | |
run: | | |
set -euxo pipefail | |
curl -LsSf https://get.nexte.st/0.9/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin | |
- name: Tests | |
shell: bash | |
run: | | |
cargo nextest run --all-features | |
cargo test --doc --all-features | |
find-examples: | |
runs-on: ubuntu-latest | |
if: | | |
${{ github.event_name != 'pull_request' || | |
github.event.pull_request.head.repo.full_name != | |
github.event.pull_request.base.repo.full_name }} | |
outputs: | |
examples: ${{ steps.find.outputs.examples }} | |
steps: | |
- uses: actions/checkout@v4 | |
- id: find | |
run: | | |
EXAMPLES=$(ls -d examples/*/ | xargs -L 1 basename | jq --raw-input --slurp --compact-output 'split("\n")[:-1]') | |
echo "examples=$EXAMPLES" >> $GITHUB_OUTPUT | |
examples: | |
runs-on: ubuntu-latest | |
container: ivangabriele/tauri:debian-bookworm-22 | |
if: | | |
${{ github.event_name != 'pull_request' || | |
github.event.pull_request.head.repo.full_name != | |
github.event.pull_request.base.repo.full_name }} | |
needs: find-examples | |
strategy: | |
matrix: | |
example: ${{ fromJson(needs.find-examples.outputs.examples) }} | |
defaults: | |
run: | |
working-directory: examples/${{ matrix.example }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Remove rust-toolchain.toml | |
shell: bash | |
run: | | |
# so we don't add tooling for all targets | |
rm ../../rust-toolchain.toml | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy, rustfmt | |
- name: Run sccache-cache | |
uses: mozilla-actions/[email protected] | |
- name: Lints | |
shell: bash | |
run: | | |
cargo fmt --all --check | |
cargo clippy -- --no-deps -Dclippy::pedantic -Dwarnings | |
- name: Build ${{ matrix.example }} | |
shell: bash | |
run: cargo build | |
- name: Install nextest | |
shell: bash | |
run: | | |
set -euxo pipefail | |
curl -LsSf https://get.nexte.st/0.9/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin | |
- name: Tests | |
shell: bash | |
run: | | |
cargo nextest run --all-features | |
cargo test --doc --all-features |