Skip to content
Merged
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
63 changes: 63 additions & 0 deletions .github/workflows/cranelift-release-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Test upcoming Cranelift release branch

on:
schedule:
- cron: "0 3 6 * *"
workflow_dispatch: {}

permissions: {}

env:
CARGO_BUILD_INCREMENTAL: false
RUSTFLAGS: "-Dwarnings"

jobs:
test_upcoming_cranelift_release:
runs-on: ubuntu-latest
timeout-minutes: 90

steps:
- uses: actions/checkout@v6

- name: Determine latest Wasmtime release branch
id: wasmtime_release_branch
run: |
branches="$(
git ls-remote --heads https://github.com/bytecodealliance/wasmtime.git "refs/heads/release-*" \
| awk '{print $2}' \
| sed 's#refs/heads/##' \
| sort -V
)"
if [[ -z "${branches}" ]]; then
echo "No wasmtime release branches found"
exit 1
fi
latest="$(echo "${branches}" | tail -n 1)"
echo "Latest release branch: ${latest}"
echo "branch=${latest}" >> "$GITHUB_OUTPUT"

- name: Patch Cargo.toml to use release branch Cranelift
run: |
cat >>Cargo.toml <<EOF
[patch.crates-io]
cranelift-codegen = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "$(echo $WASMTIME_RELEASE_BRANCH)" }
cranelift-frontend = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "$(echo $WASMTIME_RELEASE_BRANCH)" }
cranelift-module = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "$(echo $WASMTIME_RELEASE_BRANCH)" }
cranelift-native = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "$(echo $WASMTIME_RELEASE_BRANCH)" }
cranelift-jit = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "$(echo $WASMTIME_RELEASE_BRANCH)" }
cranelift-object = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "$(echo $WASMTIME_RELEASE_BRANCH)" }
EOF
env:
WASMTIME_RELEASE_BRANCH: ${{ steps.wasmtime_release_branch.outputs.branch }}

- name: Prepare dependencies
run: ./y.sh prepare

- name: Build (sysroot none)
run: ./y.sh build --sysroot none

- name: Test
env:
TARGET_TRIPLE: x86_64-unknown-linux-gnu
run: ./y.sh test

Loading