generated from kubewarden/go-policy-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(deps): upgrade to latest version of tinygo
We can stop to rely on a patched version of tinygo Signed-off-by: Flavio Castelli <[email protected]>
- Loading branch information
Showing
3 changed files
with
21 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
name: Tests and linters | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
|
@@ -30,18 +29,26 @@ jobs: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- name: Install dependencies | ||
uses: kubewarden/github-actions/[email protected] | ||
- name: Install patched tinygo | ||
# TinyGo requires the official Go compiler to be installed | ||
# Ensure latest stable release is available, do not rely on what | ||
# is provided out of the box by the GH runner | ||
- name: setup Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: "stable" | ||
- name: Install tinygo | ||
shell: bash | ||
run: | | ||
wget https://github.com/tinygo-org/tinygo/releases/download/v0.28.1/tinygo_0.28.1_amd64.deb | ||
sudo dpkg -i tinygo_0.28.1_amd64.deb | ||
wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-16/libclang_rt.builtins-wasm32-wasi-16.0.tar.gz | ||
tar xvf libclang_rt.builtins-wasm32-wasi-16.0.tar.gz | ||
sudo cp lib/wasi/libclang_rt.builtins-wasm32.a /usr/local/lib/tinygo/lib/wasi-libc/sysroot/lib/wasm32-wasi/ | ||
sudo cp wasi-gh-action.json /usr/local/lib/tinygo/targets/wasi.json | ||
wget https://github.com/tinygo-org/tinygo/releases/download/v0.30.0/tinygo_0.30.0_amd64.deb | ||
sudo dpkg -i tinygo_0.30.0_amd64.deb | ||
- name: Build Wasm module | ||
shell: bash | ||
run: | | ||
# we have to remove the wasm-opt binary bundled with the tinygo package, | ||
# this will lead to our binary being used (the one installed by the `policy-gh-action-dependencies` | ||
# step) | ||
sudo rm /usr/local/lib/tinygo/bin/wasm-opt | ||
wasm-opt --version | ||
tinygo build -o policy.wasm -target=wasi -no-debug . | ||
- name: Annotate Wasm module | ||
shell: bash | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters