Workspace Cargo.toml support + overhaul examples #228
Workflow file for this run
This file contains 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 and test | |
on: | |
push: | |
pull_request: | |
jobs: | |
build-and-test: | |
name: ${{ matrix.os }} | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu, macos, windows] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- run: |- | |
echo CARGO_HOME=$GITHUB_WORKSPACE/.cargo >> $GITHUB_ENV | |
echo $GITHUB_WORKSPACE/target/debug >> $GITHUB_PATH | |
shell: bash | |
- run: cargo build --locked | |
- run: cargo test | |
- uses: dtolnay/install-buck2@latest | |
- name: Build example projects (Ubuntu, macOS) | |
if: matrix.os == 'ubuntu' || matrix.os == 'macos' | |
run: |- | |
pushd examples/01-intro | |
reindeer buckify | |
buck2 run "//project:test" | |
popd | |
pushd examples/02-hybrid | |
reindeer buckify | |
buck2 run "//project:test" | |
cargo run -p project | |
popd | |
pushd examples/03-complex-fixups | |
reindeer buckify | |
buck2 run "//project:test" | |
popd | |
- name: Build example projects (Windows) | |
if: matrix.os == 'windows' | |
run: |- | |
cd examples/01-intro | |
& reindeer buckify | |
& buck2 run "//project:test" | |
cd ../.. | |
cd examples/02-hybrid | |
& reindeer buckify | |
& buck2 run "//project:test" | |
& cargo run -p project | |
cd ../.. | |
cd examples/03-complex-fixups | |
& reindeer buckify | |
& buck2 run "//project:test" | |
cd ../.. |