diff --git a/.github/actions/ci-shared-setup/action.yml b/.github/actions/ci-shared-setup/action.yml index 90ab7cc2..ea19f1be 100644 --- a/.github/actions/ci-shared-setup/action.yml +++ b/.github/actions/ci-shared-setup/action.yml @@ -1,9 +1,5 @@ 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: @@ -11,19 +7,19 @@ runs: 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 @@ -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 diff --git a/.github/workflows/build-assets.yml b/.github/workflows/build-assets.yml index 5ccdc4a5..3b145c21 100644 --- a/.github/workflows/build-assets.yml +++ b/.github/workflows/build-assets.yml @@ -20,7 +20,7 @@ on: jobs: compile_plugin: name: compile_plugin - runs-on: macos-latest + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 10c2c015..15e7c11d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -65,8 +58,6 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/ci-shared-setup - with: - os: linux - uses: actions/download-artifact@v4 with: diff --git a/.github/workflows/cli-features.yml b/.github/workflows/cli-features.yml index 98d41e8d..b2f25d6a 100644 --- a/.github/workflows/cli-features.yml +++ b/.github/workflows/cli-features.yml @@ -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` diff --git a/.github/workflows/wpt.yml b/.github/workflows/wpt.yml index 46b8e6ab..b126bcc2 100644 --- a/.github/workflows/wpt.yml +++ b/.github/workflows/wpt.yml @@ -16,8 +16,6 @@ jobs: submodules: true - uses: ./.github/actions/ci-shared-setup - with: - os: linux - name: WPT run: |