-
Notifications
You must be signed in to change notification settings - Fork 2
178 lines (172 loc) · 4.74 KB
/
ci_cd.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
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
name: CI/CD
on: push
jobs:
core:
name: Core
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build_core
with:
CARGO_PROFILE: 'debug'
CORE_WASM: 'upload'
TEST_CORE_WASM: 'upload'
COMLINK_WASM: 'upload'
- name: Install Wasmtime
run: |
curl https://wasmtime.dev/install.sh -sSf | bash
echo $HOME/.wasmtime/bin >> $GITHUB_PATH
# test
- name: Run tests
working-directory: core
run: cargo test
core_js:
name: Core JS (Map STD)
runs-on: ubuntu-latest
steps:
# checkout
- uses: actions/checkout@v4
# setup
- uses: actions/setup-node@v4
with:
registry-url: https://registry.npmjs.org/
node-version: "18"
cache: yarn
cache-dependency-path: core_js/yarn.lock
# test and build
- name: Install Yarn dependencies
working-directory: core_js
run: yarn install --frozen-lockfile
## first we need map-std which is used in profile-validator
- name: Build Map STD
working-directory: core_js/map-std
run: yarn build
- name: Test Map STD
working-directory: core_js/map-std
run: yarn test
- name: Build Profile validator
working-directory: core_js/profile-validator
run: yarn build
- name: Test Profile validator
working-directory: core_js/profile-validator
run: yarn test
host-nodejs:
name: Node.js Host
needs: [core]
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/nodejs_host
steps:
# checkout
- uses: actions/checkout@v4
# setup
- uses: actions/setup-node@v4
with:
registry-url: https://registry.npmjs.org/
node-version: "18"
cache: yarn
cache-dependency-path: packages/nodejs_host/yarn.lock
- uses: actions/download-artifact@v4
with:
name: core-async-wasm
path: packages/nodejs_host/assets
- uses: actions/download-artifact@v4
with:
name: test-core-async-wasm
path: packages/nodejs_host/assets
# test and build
- name: Install Yarn dependencies
run: yarn install --frozen-lockfile
- name: Build
run: yarn build
- name: Run tests
run: yarn test
host-cfw:
name: Cloudflare worker Host
needs: [core]
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/cloudflare_worker_host
steps:
# checkout
- uses: actions/checkout@v4
# setup
- uses: actions/setup-node@v4
with:
registry-url: https://registry.npmjs.org/
node-version: "18"
cache: yarn
cache-dependency-path: packages/cloudflare_worker_host/yarn.lock
- uses: actions/download-artifact@v4
with:
name: core-async-wasm
path: packages/cloudflare_worker_host/assets
- uses: actions/download-artifact@v4
with:
name: test-core-async-wasm
path: packages/cloudflare_worker_host/assets
# test and build
- name: Install Yarn dependencies
run: yarn install --frozen-lockfile
- name: Build
run: yarn build
- name: Run tests
run: yarn test
host-python:
name: Python Host
needs: [core]
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/python_host
steps:
# checkout
- uses: actions/checkout@v4
# setup
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
- uses: actions/download-artifact@v4
with:
name: core-wasm
path: packages/python_host/src/one_sdk/assets
- uses: actions/download-artifact@v4
with:
name: test-core-wasm
path: packages/python_host/src/one_sdk/assets
# test and build
- name: Install dependencies and package locally
run: python -m pip install .
- name: Run tests
run: python -m unittest discover tests/
comlink-nodejs:
name: Node.js Comlink
needs: [core]
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/nodejs_comlink
steps:
# checkout
- uses: actions/checkout@v4
# setup
- uses: actions/setup-node@v4
with:
registry-url: https://registry.npmjs.org/
node-version: "18"
cache: yarn
cache-dependency-path: packages/nodejs_comlink/yarn.lock
- uses: actions/download-artifact@v4
with:
name: comlink-wasm
path: packages/nodejs_comlink/assets
# test and build
- name: Install Yarn dependencies
run: yarn install --frozen-lockfile
- name: Build
run: yarn build
- name: Run tests
run: yarn test