Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,23 @@ jobs:
with:
ref: refs/tags/${{ needs.resolve.outputs.tag }}
fetch-depth: 0
- uses: jdx/mise-action@v4
# Set up the Rust toolchain directly instead of via mise: the self-hosted
# `build` runner (used for x86_64-linux) doesn't ship rustup, so mise's
# `rust = "stable"` silently no-ops and `cargo` goes missing. Install rustup
# when absent, pin stable, and add the cross target this matrix leg builds.
- name: Set up Rust toolchain
shell: bash
run: |
set -euo pipefail
if ! command -v rustup >/dev/null 2>&1; then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
| sh -s -- -y --profile minimal --default-toolchain stable
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
export PATH="$HOME/.cargo/bin:$PATH"
fi
rustup toolchain install stable --profile minimal
rustup default stable
rustup target add "${{ matrix.target }}"
- name: Build & upload binaries
uses: taiki-e/upload-rust-binary-action@v1
with:
Expand Down
20 changes: 19 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,27 @@ jobs:
needs: [check-runners]
runs-on: ${{ fromJson(needs.check-runners.outputs.runner) }}
if: github.event.pull_request.draft == false
env:
RUST_BACKTRACE: "1"
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v4
# Set up the Rust toolchain directly instead of via mise. The self-hosted
# `build` runners don't ship rustup, so mise's `rust = "stable"` silently
# no-ops there and `cargo` ends up missing (`cargo: command not found`).
# Install rustup when absent, then pin stable with the components fmt/clippy need.
- name: Set up Rust toolchain
shell: bash
run: |
set -euo pipefail
if ! command -v rustup >/dev/null 2>&1; then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
| sh -s -- -y --profile minimal --default-toolchain stable
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
export PATH="$HOME/.cargo/bin:$PATH"
fi
rustup toolchain install stable --profile minimal
rustup default stable
rustup component add rustfmt clippy
- uses: Swatinem/rust-cache@v2
- name: fmt
run: cargo fmt --all -- --check
Expand Down
Loading