Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch plugin to build on Linux #830

Merged
merged 2 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions .github/actions/ci-shared-setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,25 @@
name: "Shared CI setup"
description: "Common setup for CI pipeline workflow jobs"
inputs:
os:
description: "The operating system for downloading binaries"
required: true
runs:
using: "composite"
steps:
- name: Cargo Cache
uses: actions/cache@v3
with:
path: ~/.cargo
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.toml') }}
key: cargo-${{ hashFiles('Cargo.toml') }}
restore-keys: |
${{ runner.os }}-cargo-${{ hashFiles('Cargo.toml') }}
${{ runner.os }}-cargo
cargo-${{ hashFiles('Cargo.toml') }}
cargo

- name: Cargo Target Cache
uses: actions/cache@v3
with:
path: target
key: ${{ runner.os }}-cargo-target-${{ hashFiles('Cargo.toml') }}
key: cargo-target-${{ hashFiles('Cargo.toml') }}
restore-keys: |
${{ runner.os }}-cargo-target-${{ hashFiles('Cargo.toml') }}
${{ runner.os }}-cargo-target
cargo-target-${{ hashFiles('Cargo.toml') }}
cargo-target

- name: Read wasmtime version
id: wasmtime_version
Expand All @@ -35,7 +31,7 @@ runs:
- name: Install wasmtime-cli
shell: bash
run: |
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
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-linux.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
4 changes: 2 additions & 2 deletions .github/workflows/build-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:
jobs:
compile_plugin:
name: compile_plugin
runs-on: macos-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

Expand All @@ -34,7 +34,7 @@ jobs:
- name: Install wizer
shell: bash
run: |
wget -nv https://github.com/bytecodealliance/wizer/releases/download/v${{ steps.wizer_version.outputs.WIZER_VERSION }}/wizer-v${{ steps.wizer_version.outputs.WIZER_VERSION }}-x86_64-macos.tar.xz -O /tmp/wizer.tar.xz
wget -nv https://github.com/bytecodealliance/wizer/releases/download/v${{ steps.wizer_version.outputs.WIZER_VERSION }}/wizer-v${{ steps.wizer_version.outputs.WIZER_VERSION }}-x86_64-linux.tar.xz -O /tmp/wizer.tar.xz
mkdir /tmp/wizer
tar xvf /tmp/wizer.tar.xz --strip-components=1 -C /tmp/wizer
echo "/tmp/wizer" >> $GITHUB_PATH
Expand Down
11 changes: 1 addition & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,13 @@ on:
jobs:
plugin:
name: test_plugin
# We test on `macos-latest` to accurately reflect
# the plugin Wasm binary that we attach to the releases,
# which is built on the latest macOS too.
# This is also helpful for testing fuel
# consumption in tests.
runs-on: macos-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true

- uses: ./.github/actions/ci-shared-setup
with:
os: macos

- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
Expand Down Expand Up @@ -65,8 +58,6 @@ jobs:
- uses: actions/checkout@v4

- uses: ./.github/actions/ci-shared-setup
with:
os: linux

- uses: actions/download-artifact@v4
with:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/cli-features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ jobs:
- uses: actions/checkout@v4

- uses: ./.github/actions/ci-shared-setup
with:
os: linux

- name: Build test-plugin
run: |
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/wpt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ jobs:
submodules: true

- uses: ./.github/actions/ci-shared-setup
with:
os: linux

- name: WPT
run: |
Expand Down
Loading