Run CI jobs on vemlp for github repos
The following diagram illustrates the CI workflow process:
- Elastic Resource Allocation: Computation resources are only provisioned when CI jobs arrive.
- Parallel Job Processing: Multiple CI jobs run concurrently to speed up execution.
- Encapsulated Logic: Authentication, security, and job management are hidden in veFaas/vemlp.
If you need to build a personalized FaaS service, please contact us to deploy according to setup_runner.py
and destroy_runner.py
.
Here's a default workflow template to get started:
name: Your Default Workflow
on:
push:
branches:
- main
- v0.*
pull_request:
branches:
- main
- v0.*
paths:
- "**/*.py"
- ".github/workflows/template.yml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
permissions:
contents: read
env:
IMAGE: "your vemlp image" # e.g. "verl-ci-cn-beijing.cr.volces.com/whatcanyousee/verl:ngc-cu124-vllm0.8.5-sglang0.4.6.post5-mcore0.12.0-te2.3"
DYNAMIC_RUNNER_URL: "https://sd10g3clalm04ug7alq90.apigateway-cn-beijing.volceapi.com/runner" # public veFaas api
jobs:
setup:
runs-on: ubuntu-latest
outputs:
runner-label: ${{ steps.create-runner.outputs.runner-label }}
task-id: ${{ steps.create-runner.outputs.task-id }}
steps:
- uses: actions/checkout@v4
- id: create-runner
uses: volcengine/vemlp-github-runner@v1
with:
mode: "create"
faas-url: "${{ env.DYNAMIC_RUNNER_URL }}"
image: "${{ env.DEFAULT_IMAGE }}"
your_job:
needs: setup
runs-on: ["${{ needs.setup.outputs.runner-label || 'default-runner' }}"]
steps:
xxxx # your jobs
cleanup:
runs-on: ubuntu-latest
needs: [setup, your_job]
if: always()
steps:
- id: destroy-runner
uses: volcengine/vemlp-github-runner@v1
with:
mode: "destroy"
faas-url: "${{ env.DYNAMIC_RUNNER_URL }}"
task-id: "${{ needs.setup.outputs.task-id }}"