-
Notifications
You must be signed in to change notification settings - Fork 2
127 lines (102 loc) · 3.25 KB
/
demos.yaml
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
name: Demos
on:
pull_request: {}
push:
branches:
- main
workflow_dispatch: {}
env:
INSTALL_RUST_VERSION: "1.75"
jobs:
rust:
name: Rust
runs-on: ubuntu-20.04
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
default: true
profile: minimal
toolchain: ${{ env.INSTALL_RUST_VERSION }}
- name: Use Rust Cache
uses: Swatinem/rust-cache@v2
- name: Build Rust Demo
uses: actions-rs/cargo@v1
with:
args: -p juicebox_demo_cli
command: build
- name: Software Realm
id: software-realm
uses: ./.github/actions/software-realm
with:
start-realm-count: 25
- name: Run Rust Demo
run: target/debug/demo --configuration ${{ steps.software-realm.outputs.configuration }} --auth-tokens ${{ steps.software-realm.outputs.auth-tokens }}
swift:
name: Swift
runs-on: ubuntu-20.04
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
default: true
profile: minimal
toolchain: ${{ env.INSTALL_RUST_VERSION }}
- name: Use Rust Cache
uses: Swatinem/rust-cache@v2
- name: Build FFI
run: swift/ffi.sh
- name: Use Swift Cache
uses: actions/cache@v3
with:
path: swift/demo/.build
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-
- name: Build Swift Demo
run: cd swift/demo && swift build --verbose
- name: Software Realm
id: software-realm
uses: ./.github/actions/software-realm
with:
start-realm-count: 25
- name: Run Swift Demo
run: swift/demo/.build/debug/demo -c ${{ steps.software-realm.outputs.configuration }} -a ${{ steps.software-realm.outputs.auth-tokens }}
wasm:
name: WASM
runs-on: ubuntu-20.04
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
default: true
profile: minimal
toolchain: ${{ env.INSTALL_RUST_VERSION }}
- name: Use Rust Cache
uses: Swatinem/rust-cache@v2
- uses: actions/setup-node@v3
with:
# it's not possible to pin certs yet with the experimental fetch in node 18,
# and our polyfill doesn't work well in 18. stick with 16 for now.
node-version: 16
- uses: jetli/wasm-pack-action@v0.4.0
- name: Build WASM
run: wasm-pack build rust/sdk/bridge/wasm --out-dir ../../../../javascript/juicebox-sdk --out-name juicebox-sdk --target nodejs
- name: NPM Install
run: |
cd javascript/demo
npm install
npm install -g ts-node
- name: Software Realm
id: software-realm
uses: ./.github/actions/software-realm
with:
start-realm-count: 25
- name: Run WASM Demo
run: javascript/demo/demo.ts -c ${{ steps.software-realm.outputs.configuration }} -a ${{ steps.software-realm.outputs.auth-tokens }}