[WIP] Install nightly toolchain #5
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
on: | |
- push | |
jobs: | |
test: | |
name: Run tests | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install SQLx CLI | |
run: | | |
mkdir -p ~/.local/bin | |
curl -L https://development-content.brioche.dev/tools/sqlx-cli_v0.7.1/sqlx -o ~/.local/bin/sqlx | |
curl -L https://development-content.brioche.dev/tools/sqlx-cli_v0.7.1/cargo-sqlx -o ~/.local/bin/cargo-sqlx | |
chmod +x ~/.local/bin/sqlx ~/.local/bin/cargo-sqlx | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- name: Check formatting | |
run: cargo fmt -- --check | |
- name: Check database schema | |
run: make check-db-schema | |
- name: Check Clippy | |
run: cargo clippy --all -- -Dwarnings | |
- name: Build runtime distribution | |
run: | | |
cd crates/brioche/runtime | |
npm install | |
npm run build | |
- name: Run tests | |
run: cargo test --all | |
push: | |
if: github.ref == 'refs/heads/cicd' && github.repository == 'brioche-dev/brioche' | |
needs: test | |
name: Push artifacts | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Rust nightly toolchain | |
run: rustup toolchain install nightly | |
- name: Build Brioche | |
run: cargo build --release | |
- name: Build brioche-pack | |
run: | | |
cargo +nightly build \ | |
-p brioche-pack \ | |
--profile=release-tiny \ | |
--target=x86_64-unknown-linux-musl \ | |
-Z 'build-std=std,panic_abort' \ | |
-Z 'build-std-features=panic_immediate_abort' |