forked from o1-labs/o1js
-
Notifications
You must be signed in to change notification settings - Fork 2
69 lines (60 loc) · 2.54 KB
/
run-docker-tests.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
56
57
58
59
60
61
62
63
64
65
66
67
68
name: run Perf Test and collect data
env:
default_image: "ghcr.io/meta-introspector/o1js/o1js-perf-recording:latest"
container_name: "mixed-source"
on:
workflow_dispatch:
inputs:
image_url:
description: 'Docker url to execute'
#default: "ghcr.io/meta-introspector/o1js/o1js-perf-recording:5ce0221662cecbca9a3de05601af94a15b154a3bcf8bafcb0cfa1f5b9f407bdc"
default: "ghcr.io/meta-introspector/o1js/o1js-perf-recording:latest"
push:
branches: [ "feature/just_test" ]
pull_request:
branches: [ "collect-perf" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: meta-introspector/checkout@v4
#with:
# submodules: recursive
- name: Login to GHCR
uses: meta-introspector/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: pull the image
run: docker pull ${{ inputs.image_url || env.default_image }}
- name: run the Docker tests
run: docker compose up ${{ env.container_name }}-test1 -e TESTS="/app/src/lib/provable/test/merkle-list.test.ts"
# /app/src/lib/provable/test/merkle-tree.test.ts /app/src/lib/provable/test/scalar.test.ts /app/src/lib/provable/test/merkle-map.test.ts /app/src/lib/provable/test/provable.test.ts /app/src/lib/provable/test/primitives.test.ts /app/src/lib/provable/test/group.test.ts /app/src/lib/provable/test/int.test.ts /app/src/lib/mina/precondition.test.ts"
env:
DOCKER_IMAGE_URL: ${{ inputs.image_url || env.default_image}}
- name: docker cp results
run: docker compose cp ${{ env.container_name }}:/tmp/perf.data.tar.gz perf.data.tar.gz
- name: Archive results
uses: meta-introspector/upload-artifact@v4
with:
name: perf.data.tar.gz
path: perf.data.tar.gz
- name: delete the results
run: rm -rf /tmp/perf*
- name: delete the container
run: |
docker-compose down
docker rm -f $(docker ps -a -q)
docker volume rm $(docker volume ls -q)
- name: run the Docker tests part 2
run: docker compose up ${{ env.container_name }}-test2
env:
DOCKER_IMAGE_URL: ${{ inputs.image_url || env.default_image}}
- name: docker cp results
run: docker compose cp ${{ env.container_name }}:/tmp/perf.data.tar.gz perf.data2.tar.gz
- name: Archive results
uses: meta-introspector/upload-artifact@v4
with:
name: perf.data2.tar.gz
path: perf.data2.tar.gz