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
25 changes: 22 additions & 3 deletions .github/workflows/fast-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,13 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install Rust toolchain
# No toolchain name here on purpose: `rustup toolchain install` with no
# argument reads `rust-toolchain.toml`, so the channel this job builds
# with is the one the file pins -- the same one `perry-runtime` needs.
- name: Install the pinned Rust toolchain
run: |
rustup toolchain install stable --profile minimal --component rustfmt,clippy
rustup default stable
rustup toolchain install --profile minimal
rustup show active-toolchain

# Cargo resolves the WHOLE workspace before building any member, so
# `perry-stdlib-shared`'s path dependency on `perry-ffi` must exist even
Expand All @@ -67,6 +70,22 @@ jobs:
git -C .perry-main checkout --detach FETCH_HEAD
test "$(git -C .perry-main rev-parse HEAD)" = "$commit"

# `.perry-main` is excluded from the workspace, so Perry's own
# `rust-toolchain.toml` never governs a cargo run made from this
# directory; ours has to name the same channel. Fail the bump that
# forgets one of the two rather than the first nightly-only build.
- name: Assert the toolchain pin matches Perry's
shell: bash
run: |
set -euo pipefail
ours="$(sed -n 's/^channel = "\([^"]*\)"/\1/p' rust-toolchain.toml)"
theirs="$(sed -n 's/^channel = "\([^"]*\)"/\1/p' .perry-main/rust-toolchain.toml)"
test -n "$ours" && test -n "$theirs"
if [ "$ours" != "$theirs" ]; then
echo "::error::rust-toolchain.toml pins $ours but Perry at perry-main.lock pins $theirs"
exit 1
fi

- uses: Swatinem/rust-cache@v2
with:
key: fast-check
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/linux-shared-runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,24 @@ jobs:
git -C .perry-main checkout --detach FETCH_HEAD
test "$(git -C .perry-main rev-parse HEAD)" = "$commit"

# `rustup toolchain install` with no argument reads `rust-toolchain.toml`.
# This job builds perry-runtime itself (through the providers and through
# coop-daemon/coop-worker), so it fails outright on a channel other than
# the one Perry pins -- assert the two files agree before spending an hour.
- name: Install the pinned Rust toolchain
shell: bash
run: |
set -euo pipefail
ours="$(sed -n 's/^channel = "\([^"]*\)"/\1/p' rust-toolchain.toml)"
theirs="$(sed -n 's/^channel = "\([^"]*\)"/\1/p' .perry-main/rust-toolchain.toml)"
test -n "$ours" && test -n "$theirs"
if [ "$ours" != "$theirs" ]; then
echo "::error::rust-toolchain.toml pins $ours but Perry at perry-main.lock pins $theirs"
exit 1
fi
rustup toolchain install --profile minimal
rustup show active-toolchain

- name: Build separate providers and server
shell: bash
run: |
Expand Down
135 changes: 91 additions & 44 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading