forked from privacy-scaling-explorations/zkevm-chain
-
Notifications
You must be signed in to change notification settings - Fork 21
55 lines (47 loc) · 1.9 KB
/
circuit-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
on:
workflow_call:
inputs:
circuit:
required: true
type: string
test-name:
required: true
type: string
instance-type:
required: true
type: string
concurrency-group:
required: true
type: string
jobs:
test:
name: ${{ inputs.circuit }} circuit aggregation ${{ inputs.test-name}}
timeout-minutes: 7200
concurrency:
group: ${{ inputs.concurrency-group }}
cancel-in-progress: true
runs-on: ["${{github.run_id}}", self-hosted, "${{inputs.instance-type}}"]
steps:
- uses: actions/checkout@v3
- name: Setup
run: cp .env.example .env
- name: Build docker images
run: |
docker compose down -v --remove-orphans || true
docker buildx create --name mybuilder --use || echo 'skip'
docker compose build --progress plain bootnode dev
- name: Run test
if: always()
run: |
docker compose -f docker-compose.yml -f docker-compose-perf.yml run --use-aliases --no-TTY --rm --entrypoint bash dev -c 'COORDINATOR_AGGREGATE_PROOF=true COORDINATOR_CIRCUIT_NAME=${{ inputs.circuit }} ./scripts/heavy_ci.sh ${{ inputs.test-name }}'
./scripts/ci_commit_errors.sh ag-${{ inputs.circuit }}-${{ inputs.test-name }}
- name: Upload statistics
if: always()
env:
GH_OPS_PAT: ${{ secrets.PAT_OPS_TRIGGER }}
TEST_ID: ag-${{ inputs.circuit }}-${{ inputs.test-name }}
TEST_NAME: ${{ inputs.test-name }}
run: |
./scripts/ci_grafana.sh > grafana.sql
payload=$(printf '%s' '{"ref":"master","inputs":{"dbname":"benchmarks"}}' | jq -c --arg sql "$(cat grafana.sql)" '.inputs.sql=$sql')
curl --fail -H "authorization: token $GH_OPS_PAT" 'https://api.github.com/repos/privacy-scaling-explorations/github-ops/actions/workflows/pse-sql.yml/dispatches' -d "${payload}"