Skip to content

Commit 7e3a465

Browse files
authored
Refine
1 parent a2b7a67 commit 7e3a465

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+2778
-565
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Build and Publish WASM Python Builder Image
2+
3+
on:
4+
push:
5+
branches: [ main, wasm ]
6+
paths:
7+
- 'samples/wasm/python/Dockerfile'
8+
- 'samples/wasm/python/schema/**'
9+
- 'samples/wasm/python/inject_pdb.py'
10+
pull_request:
11+
branches: [ main ]
12+
paths:
13+
- 'samples/wasm/python/Dockerfile'
14+
- 'samples/wasm/python/schema/**'
15+
- 'samples/wasm/python/inject_pdb.py'
16+
17+
jobs:
18+
build-and-push:
19+
runs-on: ubuntu-latest
20+
permissions:
21+
contents: read
22+
packages: write
23+
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v4
27+
28+
- name: Set up Docker Buildx
29+
uses: docker/setup-buildx-action@v3
30+
31+
- name: Log in to GitHub Container Registry
32+
uses: docker/login-action@v3
33+
with:
34+
registry: ghcr.io
35+
username: ${{ github.actor }}
36+
password: ${{ secrets.GITHUB_TOKEN }}
37+
38+
- name: Extract metadata for Docker
39+
id: meta
40+
uses: docker/metadata-action@v5
41+
with:
42+
images: ghcr.io/azure-samples/explore-iot-operations/python-wasm-builder
43+
tags: |
44+
type=ref,event=branch
45+
type=ref,event=pr
46+
type=raw,value=latest,enable={{is_default_branch}}
47+
48+
- name: Build and push Docker image
49+
uses: docker/build-push-action@v5
50+
with:
51+
context: samples/wasm/python
52+
file: samples/wasm/python/Dockerfile
53+
push: true
54+
tags: ${{ steps.meta.outputs.tags }}
55+
labels: ${{ steps.meta.outputs.labels }}
56+
platforms: linux/amd64,linux/arm64

.github/workflows/wasm-rust-build.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
name: Build and Push WASM Rust Base Image
1+
name: Build and Push WASM Rust Builder Image
22

33
on:
44
workflow_dispatch:
55
push:
66
branches: [ main, wasm ]
77
paths:
8-
- 'samples/wasm/base-image/**'
8+
- 'samples/wasm/rust/Dockerfile'
99
pull_request:
1010
branches: [ main ]
1111
paths:
12-
- 'samples/wasm/base-image/**'
12+
- 'samples/wasm/rust/Dockerfile'
1313

1414
jobs:
1515
build-and-push:
@@ -35,18 +35,18 @@ jobs:
3535
id: meta
3636
uses: docker/metadata-action@v5
3737
with:
38-
images: ghcr.io/${{ github.repository }}/wasm-rust-build
38+
images: ghcr.io/${{ github.repository }}/rust-wasm-builder
3939
tags: |
4040
type=ref,event=branch
4141
type=ref,event=pr
4242
type=sha
4343
type=raw,value=latest
4444
45-
- name: "Build and Push Base Image"
45+
- name: "Build and Push Rust Builder Image"
4646
uses: docker/build-push-action@v5
4747
with:
48-
context: samples/wasm/base-image
49-
file: samples/wasm/base-image/Dockerfile
48+
context: samples/wasm/rust
49+
file: samples/wasm/rust/Dockerfile
5050
push: true
5151
tags: ${{ steps.meta.outputs.tags }}
5252
labels: ${{ steps.meta.outputs.labels }}

samples/wasm/ConfigGraph.json

Lines changed: 243 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,243 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "ConfigGraph",
4+
"type": "object",
5+
"required": [
6+
"connections",
7+
"moduleRequirements",
8+
"operations"
9+
],
10+
"properties": {
11+
"connections": {
12+
"type": "array",
13+
"items": {
14+
"$ref": "#/definitions/ConfigGraphConnection"
15+
}
16+
},
17+
"moduleConfigurations": {
18+
"default": [],
19+
"type": "array",
20+
"items": {
21+
"$ref": "#/definitions/ModuleConfiguration"
22+
}
23+
},
24+
"moduleRequirements": {
25+
"$ref": "#/definitions/ModuleVersions"
26+
},
27+
"operations": {
28+
"type": "array",
29+
"items": {
30+
"$ref": "#/definitions/ConfigGraphModule"
31+
}
32+
},
33+
"schemas": {
34+
"default": [],
35+
"type": "array",
36+
"items": {
37+
"$ref": "#/definitions/SchemaConfiguration"
38+
}
39+
}
40+
},
41+
"additionalProperties": false,
42+
"definitions": {
43+
"BranchOutputArm": {
44+
"type": "string",
45+
"enum": [
46+
"False",
47+
"True"
48+
]
49+
},
50+
"ConfigGraphConnection": {
51+
"type": "object",
52+
"required": [
53+
"from",
54+
"to"
55+
],
56+
"properties": {
57+
"from": {
58+
"$ref": "#/definitions/ConfigGraphConnectionFromPoint"
59+
},
60+
"to": {
61+
"$ref": "#/definitions/ConfigGraphConnectionToPoint"
62+
}
63+
},
64+
"additionalProperties": false
65+
},
66+
"ConfigGraphConnectionFromPoint": {
67+
"type": "object",
68+
"required": [
69+
"name"
70+
],
71+
"properties": {
72+
"arm": {
73+
"anyOf": [
74+
{
75+
"$ref": "#/definitions/BranchOutputArm"
76+
},
77+
{
78+
"type": "null"
79+
}
80+
]
81+
},
82+
"name": {
83+
"type": "string"
84+
},
85+
"schemaName": {
86+
"type": [
87+
"string",
88+
"null"
89+
]
90+
}
91+
},
92+
"additionalProperties": false
93+
},
94+
"ConfigGraphConnectionOperator": {
95+
"type": "string",
96+
"enum": [
97+
"source",
98+
"map",
99+
"filter",
100+
"branch",
101+
"concatenate",
102+
"accumulate",
103+
"delay",
104+
"sink"
105+
]
106+
},
107+
"ConfigGraphConnectionToPoint": {
108+
"type": "object",
109+
"required": [
110+
"name"
111+
],
112+
"properties": {
113+
"name": {
114+
"type": "string"
115+
}
116+
},
117+
"additionalProperties": false
118+
},
119+
"ConfigGraphModule": {
120+
"type": "object",
121+
"required": [
122+
"name",
123+
"operationType"
124+
],
125+
"properties": {
126+
"module": {
127+
"type": [
128+
"string",
129+
"null"
130+
]
131+
},
132+
"name": {
133+
"type": "string"
134+
},
135+
"operationType": {
136+
"$ref": "#/definitions/ConfigGraphConnectionOperator"
137+
}
138+
},
139+
"additionalProperties": false
140+
},
141+
"ConfigParameters": {
142+
"type": "object",
143+
"required": [
144+
"name"
145+
],
146+
"properties": {
147+
"description": {
148+
"type": [
149+
"string",
150+
"null"
151+
]
152+
},
153+
"name": {
154+
"type": "string"
155+
},
156+
"required": {
157+
"default": false,
158+
"type": "boolean"
159+
}
160+
}
161+
},
162+
"ModuleConfiguration": {
163+
"type": "object",
164+
"required": [
165+
"name",
166+
"parameters"
167+
],
168+
"properties": {
169+
"name": {
170+
"type": "string"
171+
},
172+
"parameters": {
173+
"type": "object",
174+
"additionalProperties": {
175+
"$ref": "#/definitions/ConfigParameters"
176+
}
177+
}
178+
}
179+
},
180+
"ModuleVersionFeature": {
181+
"type": "object",
182+
"required": [
183+
"name"
184+
],
185+
"properties": {
186+
"name": {
187+
"type": "string"
188+
},
189+
"value": {
190+
"type": [
191+
"string",
192+
"null"
193+
]
194+
}
195+
},
196+
"additionalProperties": false
197+
},
198+
"ModuleVersions": {
199+
"type": "object",
200+
"required": [
201+
"apiVersion",
202+
"hostlibVersion"
203+
],
204+
"properties": {
205+
"apiVersion": {
206+
"type": "string"
207+
},
208+
"features": {
209+
"type": [
210+
"array",
211+
"null"
212+
],
213+
"items": {
214+
"$ref": "#/definitions/ModuleVersionFeature"
215+
}
216+
},
217+
"hostlibVersion": {
218+
"type": "string"
219+
}
220+
},
221+
"additionalProperties": false
222+
},
223+
"SchemaConfiguration": {
224+
"type": "object",
225+
"required": [
226+
"format",
227+
"name",
228+
"schema"
229+
],
230+
"properties": {
231+
"format": {
232+
"type": "string"
233+
},
234+
"name": {
235+
"type": "string"
236+
},
237+
"schema": {
238+
"type": "string"
239+
}
240+
}
241+
}
242+
}
243+
}

0 commit comments

Comments
 (0)