|
| 1 | +name: Test upcoming Cranelift release branch |
| 2 | + |
| 3 | +on: |
| 4 | + schedule: |
| 5 | + - cron: "0 3 6 * *" |
| 6 | + workflow_dispatch: {} |
| 7 | + |
| 8 | +permissions: {} |
| 9 | + |
| 10 | +env: |
| 11 | + CARGO_BUILD_INCREMENTAL: false |
| 12 | + RUSTFLAGS: "-Dwarnings" |
| 13 | + |
| 14 | +jobs: |
| 15 | + test_upcoming_cranelift_release: |
| 16 | + runs-on: ubuntu-latest |
| 17 | + timeout-minutes: 90 |
| 18 | + |
| 19 | + steps: |
| 20 | + - uses: actions/checkout@v6 |
| 21 | + |
| 22 | + - name: Determine latest Wasmtime release branch |
| 23 | + id: wasmtime_release_branch |
| 24 | + run: | |
| 25 | + branches="$( |
| 26 | + git ls-remote --heads https://github.com/bytecodealliance/wasmtime.git "refs/heads/release-*" \ |
| 27 | + | awk '{print $2}' \ |
| 28 | + | sed 's#refs/heads/##' \ |
| 29 | + | sort -V |
| 30 | + )" |
| 31 | + if [[ -z "${branches}" ]]; then |
| 32 | + echo "No wasmtime release branches found" |
| 33 | + exit 1 |
| 34 | + fi |
| 35 | + latest="$(echo "${branches}" | tail -n 1)" |
| 36 | + echo "Latest release branch: ${latest}" |
| 37 | + echo "branch=${latest}" >> "$GITHUB_OUTPUT" |
| 38 | +
|
| 39 | + - name: Patch Cargo.toml to use release branch Cranelift |
| 40 | + run: | |
| 41 | + cat >>Cargo.toml <<EOF |
| 42 | + [patch.crates-io] |
| 43 | + cranelift-codegen = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "$(echo $WASMTIME_RELEASE_BRANCH)" } |
| 44 | + cranelift-frontend = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "$(echo $WASMTIME_RELEASE_BRANCH)" } |
| 45 | + cranelift-module = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "$(echo $WASMTIME_RELEASE_BRANCH)" } |
| 46 | + cranelift-native = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "$(echo $WASMTIME_RELEASE_BRANCH)" } |
| 47 | + cranelift-jit = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "$(echo $WASMTIME_RELEASE_BRANCH)" } |
| 48 | + cranelift-object = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "$(echo $WASMTIME_RELEASE_BRANCH)" } |
| 49 | + EOF |
| 50 | + env: |
| 51 | + WASMTIME_RELEASE_BRANCH: ${{ steps.wasmtime_release_branch.outputs.branch }} |
| 52 | + |
| 53 | + - name: Prepare dependencies |
| 54 | + run: ./y.sh prepare |
| 55 | + |
| 56 | + - name: Build (sysroot none) |
| 57 | + run: ./y.sh build --sysroot none |
| 58 | + |
| 59 | + - name: Test |
| 60 | + env: |
| 61 | + TARGET_TRIPLE: x86_64-unknown-linux-gnu |
| 62 | + run: ./y.sh test |
| 63 | + |
0 commit comments