-
Notifications
You must be signed in to change notification settings - Fork 25
87 lines (78 loc) · 2.39 KB
/
starlingmonkey.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
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 }}