WIP ci: build plugins #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Parse plugins | |
on: | |
pull_request: | |
branches: [main] | |
paths: | |
- '.github/workflows/parse-plugins.yml' | |
workflow_call: | |
outputs: | |
plugins: | |
value: ${{ jobs.parse.outputs.plugins }} | |
jobs: | |
parse: | |
name: Parse plugins | |
runs-on: ubuntu-latest | |
outputs: | |
plugins: ${{ steps.readfile.outputs.plugins }} | |
steps: | |
- uses: actions/checkout@v4 | |
- id: readfile | |
uses: actions/github-script@v7 | |
with: | |
result-encoding: string | |
script: | | |
const { parse } = require(".github/scripts/parse-plugins.js"); | |
const fs = require("fs"); | |
const s = fs.readFileSync(".github/plugins.json"); | |
const config = parse(JSON.parse(s)); | |
core.setOutput("plugins", config); | |
test: | |
if: ${{ github.event_name == 'pull_request' }} | |
needs: parse | |
name: Self-testing | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check wasi_crypto target | |
run: | | |
target=$(echo '${{ needs.parse.outputs.plugins }}' | jq '.manylinux_2_28_x86_64[] | select(.plugin == "wasi_crypto") | .target') | |
test "${target}" = '"wasmedgePluginWasiCrypto"' |