Skip to content

Port remaining StarlingMonkey builtins #132

Port remaining StarlingMonkey builtins

Port remaining StarlingMonkey builtins #132

Workflow file for this run

name: StarlingMonkey
concurrency:
group: ${{ github.head_ref }}-${{ github.workflow}}
cancel-in-progress: true
on:
pull_request:
push:
branches: [main]
defaults:
run:
shell: bash
env:
viceroy_version: 0.9.4
wasm-tools_version: 1.0.28
fastly-cli_version: 10.4.0
jobs:
build:
name: StarlingMonkey Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install Rust 1.77.1
run: |
rustup toolchain install 1.77.1
rustup target add wasm32-wasi --toolchain 1.77.1
- name: Build
run: npm run build:starlingmonkey:debug
- uses: actions/upload-artifact@v3
with:
name: starling-debug
path: starling.wasm
sdktest:
if: github.ref != 'refs/heads/main'
runs-on: ubuntu-latest
strategy:
matrix:
platform: [viceroy, compute]
needs: [build]
steps:
- name: Checkout fastly/js-compute-runtime
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 'lts/*'
cache: 'yarn'
- name: Set up Fastly CLI
uses: fastly/compute-actions/setup@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
cli_version: ${{ env.fastly-cli_version }}
- name: Restore Viceroy from cache
if: ${{ matrix.platform == 'viceroy' }}
uses: actions/cache@v3
id: viceroy
with:
path: "/home/runner/.cargo/bin/viceroy"
key: crate-cache-viceroy-${{ env.viceroy_version }}
- name: Restore wasm-tools from cache
uses: actions/cache@v3
id: wasm-tools
with:
path: "/home/runner/.cargo/bin/wasm-tools"
key: crate-cache-wasm-tools-${{ env.wasm-tools_version }}
- name: "Check caches have been restored"
if: steps.wasm-tools.outputs.cache-hit != 'true' || matrix.platform == 'viceory' && steps.viceroy.outputs.cache-hit != 'true'
run: echo "Unable to restore from the cache, bailing." && exit 1
- name: Download Engine
uses: actions/download-artifact@v3
with:
name: starling-debug
- run: yarn install --frozen-lockfile
- name: Yarn install
run: yarn && cd ./integration-tests/js-compute && yarn
- run: node integration-tests/js-compute/test.js --starlingmonkey ${{ matrix.platform == 'viceroy' && '--local' || '' }}
env:
FASTLY_API_TOKEN: ${{ secrets.FASTLY_API_TOKEN }}