Refactor installation of wasmtime/wasm-tools on CI (#387)

* Refactor installation of wasmtime/wasm-tools on CI

We've got official actions for installation Wasmtime and wasm-tools in
the bytecodealliance organization which should help make this
installation step a bit more readable.

* Change the directory of the adapter

* Update descriptions
pull/394/head
Alex Crichton 2 years ago committed by GitHub
parent c2f9c100b0
commit 73dbb2fe89
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -38,21 +38,16 @@ jobs:
restore-keys: | restore-keys: |
0-cache-macos-latest 0-cache-macos-latest
if: matrix.os == 'macos-latest' if: matrix.os == 'macos-latest'
- name: Install wasmtime for tests - name: Setup `wasmtime` for tests
# TODO: switch to Wasmtime 17 once it's released, which will include https://github.com/bytecodealliance/wasmtime/pull/7750 uses: bytecodealliance/actions/wasmtime/setup@v1
run: | with:
curl -f -L --retry 5 https://wasmtime.dev/install.sh | bash -s -- --version dev version: "18.0.2"
~/.wasmtime/bin/wasmtime --version - name: Setup `wasm-tools` for tests
curl -f -L --retry 5 -o ~/.wasmtime/bin/wasi_snapshot_preview1.command.wasm https://github.com/bytecodealliance/wasmtime/releases/download/dev/wasi_snapshot_preview1.command.wasm uses: bytecodealliance/actions/wasm-tools/setup@v1
if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then with:
curl -f -OL --retry 5 https://github.com/bytecodealliance/wasm-tools/releases/download/wasm-tools-1.0.54/wasm-tools-1.0.54-x86_64-linux.tar.gz version: "1.201.0"
tar xf wasm-tools-1.0.54-x86_64-linux.tar.gz - name: Download command adapter for tests
cp wasm-tools-1.0.54-x86_64-linux/wasm-tools ~/.wasmtime/bin/ run: curl -f -L --retry 5 -o ${{ runner.temp }}/wasi_snapshot_preview1.command.wasm https://github.com/bytecodealliance/wasmtime/releases/download/v18.0.2/wasi_snapshot_preview1.command.wasm
else
curl -f -OL --retry 5 https://github.com/bytecodealliance/wasm-tools/releases/download/wasm-tools-1.0.54/wasm-tools-1.0.54-x86_64-macos.tar.gz
tar xf wasm-tools-1.0.54-x86_64-macos.tar.gz
cp wasm-tools-1.0.54-x86_64-macos/wasm-tools ~/.wasmtime/bin/
fi
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
@ -72,7 +67,7 @@ jobs:
run: NINJA_FLAGS=-v make package LLVM_CMAKE_FLAGS=-DLLVM_CCACHE_BUILD=ON run: NINJA_FLAGS=-v make package LLVM_CMAKE_FLAGS=-DLLVM_CCACHE_BUILD=ON
shell: bash shell: bash
- name: Run the testsuite - name: Run the testsuite
run: NINJA_FLAGS=-v make check RUNTIME=~/.wasmtime/bin/wasmtime ADAPTER=~/.wasmtime/bin/wasi_snapshot_preview1.command.wasm WASM_TOOLS=~/.wasmtime/bin/wasm-tools run: NINJA_FLAGS=-v make check RUNTIME=wasmtime ADAPTER=${{ runner.temp }}/wasi_snapshot_preview1.command.wasm WASM_TOOLS=wasm-tools
- name: Upload artifacts - name: Upload artifacts
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:

Loading…
Cancel
Save