Skip to content

Commit

Permalink
Switch plugin to build on Linux (#830)
Browse files Browse the repository at this point in the history
* Switch plugin to build on Linux

* Need to build the default plugin before trying to build Javy CLI
  • Loading branch information
jeffcharles authored Nov 19, 2024
1 parent a2f15b6 commit 2dfea13
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 28 deletions.
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
6 changes: 3 additions & 3 deletions .github/workflows/cli-features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ jobs:
- uses: actions/checkout@v4

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

- name: Build test-plugin
# Need to build Javy default plugin and Javy CLI to run `javy init-plugin` on the test plugin.
run: |
cargo build --package=javy-test-plugin --release --target=wasm32-wasip1
cargo build --package=javy-plugin --release --target=wasm32-wasip1
CARGO_PROFILE_RELEASE_LTO=off cargo build --package=javy-cli --release
cargo build --package=javy-test-plugin --release --target=wasm32-wasip1
target/release/javy init-plugin target/wasm32-wasip1/release/test_plugin.wasm -o crates/runner/test_plugin.wasm
- name: Test `experimental_event_loop`
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

0 comments on commit 2dfea13

Please sign in to comment.