Skip to content

Commit f046501

Browse files
authored
Merge pull request #179 from alexcrichton/update-install-wasmtime
Simplify installation of Wasmtime in CI
2 parents 0df2144 + c54c6ce commit f046501

File tree

1 file changed

+4
-23
lines changed

1 file changed

+4
-23
lines changed

.github/workflows/compile-tests.yml

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -164,29 +164,10 @@ jobs:
164164
run: pip install -r requirements.txt
165165

166166
- name: Install wasmtime
167-
if: matrix.runtime == 'wasmtime' && matrix.os == 'windows-latest'
168-
run: |
169-
$url = "https://github.com/bytecodealliance/wasmtime/releases/download/$env:WASMTIME_VERSION/wasmtime-$env:WASMTIME_VERSION-x86_64-windows.zip"
170-
Write-Host "URL: $url"
171-
Invoke-WebRequest -Uri $url -OutFile "wasmtime.zip"
172-
Expand-Archive -Path "wasmtime.zip" -DestinationPath "."
173-
echo "$env:GITHUB_WORKSPACE\wasmtime-$env:WASMTIME_VERSION-x86_64-windows" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
174-
175-
- name: Install wasmtime
176-
if: matrix.runtime == 'wasmtime' && matrix.os == 'windows-11-arm'
177-
run: |
178-
$url = "https://github.com/bytecodealliance/wasmtime/releases/download/$env:WASMTIME_VERSION/wasmtime-$env:WASMTIME_VERSION-aarch64-windows.zip"
179-
Write-Host "URL: $url"
180-
Invoke-WebRequest -Uri $url -OutFile "wasmtime.zip"
181-
Expand-Archive -Path "wasmtime.zip" -DestinationPath "."
182-
echo "$env:GITHUB_WORKSPACE\wasmtime-$env:WASMTIME_VERSION-aarch64-windows" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
183-
184-
- name: Install wasmtime
185-
if: matrix.runtime == 'wasmtime' && (matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest')
186-
run: |
187-
set -e
188-
curl https://wasmtime.dev/install.sh -sSf | bash -s -- --version $WASMTIME_VERSION
189-
echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH
167+
if: matrix.runtime == 'wasmtime'
168+
uses: bytecodealliance/actions/wasmtime/setup@v1
169+
with:
170+
version: ${{ env.WASMTIME_VERSION }}
190171

191172
- name: Download Rust test binaries
192173
uses: actions/download-artifact@v4

0 commit comments

Comments
 (0)