Skip to content

Commit 6b6b451

Browse files
committed
Tweak workflow: updated kmir image, timeout, use user, tolerate failing proofs, clean up artefacts
1 parent 345b35a commit 6b6b451

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

.github/workflows/rv-run-proofs.yaml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,17 @@ on:
1212
description: KMIR to work with (must exist as a docker image tag, optional)
1313
required: false
1414
type: string
15-
default: p-token-024f2d3 # hard-wired now, retrieve from submodule later
15+
default: p-token-3bd9b7c # empty = retrieve from submodule (later)
1616
smir:
1717
description: Stable MIR JSON to work with (commit hash, optional)
1818
required: false
1919
type: string
2020
default: # empty = master
21+
timeout:
22+
description: Timeout for running the proofs
23+
required: false
24+
type: string
25+
default: 7200 # 2h
2126
concurrency:
2227
group: ${{ github.workflow }}-${{ github.ref }}
2328
cancel-in-progress: true
@@ -94,10 +99,11 @@ jobs:
9499
ls -l $PWD/artefacts && rm -rf $PWD/artefacts/*
95100
chmod a+rwx $PWD/artefacts $PWD
96101
docker run --rm --detach \
102+
-u $(id -u):$(id -g) \
97103
-v $PWD:/workdir --workdir /workdir \
98104
--name "${KMIR_CONTAINER_NAME}" \
99105
runtimeverificationinc/kmir:${{ inputs.kmir }} \
100-
sleep 10000
106+
bash -c 'while true; do sleep 600; done'
101107
sleep 10
102108
103109
- name: "Get SMIR Files"
@@ -115,15 +121,17 @@ jobs:
115121
run: |
116122
docker exec --workdir /workdir "${KMIR_CONTAINER_NAME}" \
117123
bash -c "ls -la artefacts; mkdir -p artefacts/proof; ls -la artefacts"
118-
timeout 7200 \
124+
timeout ${{ inputs.timeout }} \
119125
docker exec \
120126
--workdir /workdir "${KMIR_CONTAINER_NAME}" \
121127
kmir prove-rs --smir artefacts/p-token.smir.json \
122128
--start-symbol 'pinocchio_token_program::entrypoint::${{ matrix.proof }}' \
123129
--verbose \
124130
--max-depth 500 \
125131
--max-iterations 100 \
126-
--proof-dir artefacts/proof
132+
--proof-dir artefacts/proof \
133+
|| echo "Runner signals proof failure"
134+
127135
docker exec --workdir /workdir "${KMIR_CONTAINER_NAME}" \
128136
kmir show --statistics --leaves --proof-dir artefacts/proof \
129137
'p-token.smir.pinocchio_token_program::entrypoint::${{ matrix.proof }}' \
@@ -144,3 +152,8 @@ jobs:
144152
docker stop ${KMIR_CONTAINER_NAME}
145153
sleep 5
146154
docker rm -f ${KMIR_CONTAINER_NAME}
155+
156+
- name: "Clean up artefacts directory"
157+
if: always()
158+
run: |
159+
rm -rf $PWD/artefacts

0 commit comments

Comments
 (0)