Skip to content

Commit

Permalink
Update wasmtime version in CI (#682)
Browse files Browse the repository at this point in the history
* Update `wasmtime` version in CI

This commit updates the wasmtime version used in CI, which is currently
a very outdated version. The new version matches the version used in the
CLI.

Additionally, this commit introduces a mechanism to retrieve the CLI
from `cargo metadata` through `jq`

* Use `--format-version=1` and `--locked`
  • Loading branch information
saulecabrera authored Jul 2, 2024
1 parent 05fce92 commit 52b6b52
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/actions/ci-shared-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,17 @@ runs:
${{ runner.os }}-cargo-target-${{ hashFiles('Cargo.toml') }}
${{ runner.os }}-cargo-target
- name: Read wasmtime version
id: wasmtime_version
shell: bash
run: |
VERSION=$(cargo metadata --format-version=1 --locked | jq '.packages[] | select(.name == "wasmtime") | .version' -r)
echo "::set-output name=wasmtime_version::$VERSION"
- name: Install wasmtime-cli
env:
WASMTIME_VERSION: 8.0.0
shell: bash
run: |
wget -nv 'https://github.com/bytecodealliance/wasmtime/releases/download/v${{ env.WASMTIME_VERSION }}/wasmtime-v${{ env.WASMTIME_VERSION }}-x86_64-${{ inputs.os }}.tar.xz' -O /tmp/wasmtime.tar.xz
wget -nv 'https://github.com/bytecodealliance/wasmtime/releases/download/v${{ steps.wasmtime_version.outputs.wasmtime_version }}/wasmtime-v${{ steps.wasmtime_version.outputs.wasmtime_version }}-x86_64-${{ inputs.os }}.tar.xz' -O /tmp/wasmtime.tar.xz
mkdir /tmp/wasmtime
tar xvf /tmp/wasmtime.tar.xz --strip-components=1 -C /tmp/wasmtime
echo "/tmp/wasmtime" >> $GITHUB_PATH

0 comments on commit 52b6b52

Please sign in to comment.