Skip to content

Commit 73c162b

Browse files
committed
ci(wip): build plugins
Signed-off-by: Yi Huang <yi@secondstate.io>
1 parent 4216eb7 commit 73c162b

File tree

5 files changed

+91
-0
lines changed

5 files changed

+91
-0
lines changed

.github/plugins.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"plugins": [
3+
{
4+
"plugin": "wasi_crypto"
5+
}
6+
]
7+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: Build on Linux
3+
4+
on:
5+
workflow_call:
6+
inputs:
7+
plugin:
8+
type: string
9+
required: true
10+
11+
permissions: {}
12+
13+
jobs:
14+
echo:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- run: |
18+
echo "${{ inputs.plugin }}"

.github/workflows/build.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: Build
3+
4+
on:
5+
pull_request:
6+
branches: [main]
7+
8+
permissions: {}
9+
10+
jobs:
11+
parse:
12+
uses: ./.github/workflows/parse-plugins.yml
13+
14+
manylinux_2_28:
15+
needs: parse
16+
uses: ./.github/workflows/manylinux_2_28.yml
17+
with:
18+
plugins: ${{ needs.parse.outputs.plugins }}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: manylinux_2_28
3+
4+
on:
5+
workflow_call:
6+
inputs:
7+
plugins:
8+
type: string
9+
required: true
10+
release:
11+
type: boolean
12+
default: false
13+
14+
permissions: {}
15+
16+
jobs:
17+
manylinux_2_28_x86_64:
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
include: ${{ fromJSON(inputs.plugins).manylinux_2_28_x86_64 }}
22+
uses: ./.github/workflows/build-on-linux.yml
23+
with:
24+
plugin: ${{ matrix.plugin }}
25+
secrets: inherit
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Parse plugins
3+
4+
on:
5+
workflow_call:
6+
outputs:
7+
plugins:
8+
value: ${{ jobs.parse.outputs.plugins }}
9+
10+
jobs:
11+
parse:
12+
runs-on: ubuntu-latest
13+
outputs:
14+
plugins: ${{ steps.readfile.outputs.plugins }}
15+
steps:
16+
- id: readfile
17+
uses: actions/github-script@v7
18+
with:
19+
result-encoding: string
20+
script: |
21+
const fs = require("fs")
22+
const s = fs.readFileSync(".github/plugins.json")
23+
core.setOutput("plugins", JSON.parse(s).plugins);

0 commit comments

Comments
 (0)