Skip to content

Commit

Permalink
WIP wasmedge-tag
Browse files Browse the repository at this point in the history
Signed-off-by: Yi Huang <[email protected]>
  • Loading branch information
0yi0 committed Jul 11, 2023
1 parent 4229826 commit 99ccaea
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build-and-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ jobs:
run: |
docker load --input /tmp/${{ needs.build-docker-image.outputs.artifact }}.tar
docker run --rm ${{ needs.prepare.outputs.imgname }} | tee ${{ steps.vars.outputs.filepath }}
env:
REPEAT: ${{ inputs.run-repeat }}
- uses: actions/upload-artifact@v3
with:
name: ${{ steps.vars.outputs.artifact }}
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/ci-dispatch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "CI for Dispatch Workflows"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

on:
push:
tags: [ "v[0-9]+.[0-9]+.[0-9]+*" ]
branches:
- "dev/workflow*"

jobs:
wasmedge-latest:
uses: ./.github/workflows/wasmedge-latest.yml

wasmedge-tags:
uses: ./.github/workflows/wasmedge-tags.yml
with:
version: "0.12.1"
repeat: 1
8 changes: 3 additions & 5 deletions .github/workflows/wasmedge-latest.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
name: "WasmEdge Latest"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
group: WasmEdge-Latest-${{ github.head_ref || github.ref }}-${{ github.event_name }}
cancel-in-progress: true

on:
schedule:
- cron: "7 21 * * *"
push:
tags: [ "v[0-9]+.[0-9]+.[0-9]+*" ]
branches:
- "dev/workflow*"
workflow_call:
workflow_dispatch:

jobs:
prepare:
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/wasmedge-tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: "WasmEdge Tags"

concurrency:
group: WasmEdge-Tags-${{ github.head_ref || github.ref }}-${{ github.event_name }}
cancel-in-progress: true

on:
workflow_dispatch:
inputs:
version:
type: string
required: true
repeat:
type: number
default: 7
workflow_call:
inputs:
version:
type: string
required: true
repeat:
type: number
default: 7

jobs:
precheck:
runs-on: ubuntu-latest
steps:
- run: |
echo 'TODO: check if version is valid'
echo 'TODO: check the event that triggered this workflow,'
echo 'TODO: and assign names for different events'
wasmedge-release:
needs: [ precheck ]
uses: ./.github/workflows/build-and-run.yml
with:
name: WasmEdge
version: ${{ inputs.version }}
dockerfile: ./docker/wasmedge.Dockerfile
build-args: version=${{ inputs.version }}
run-repeat: ${{ inputs.repeat }}

upload:
needs: [ wasmedge-release ]
uses: ./.github/workflows/upload.yml
with:
name: WasmEdge
version: ${{ inputs.version }}
artifact: ${{ needs.wasmedge-release.outputs.artifact }}

summarize:
needs: [ wasmedge-release ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
name: ${{ needs.wasmedge-release.outputs.artifact }}
path: ./result
- run: |
echo 'TODO: print a summary'
jq '."libsodium-tests".repeat' < ./result/${{ needs.wasmedge-latest.outputs.filename }}

0 comments on commit 99ccaea

Please sign in to comment.