-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (44 loc) · 1.09 KB
/
run_demo.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
name: Check A+B Result
on:
push:
branches:
- '*'
jobs:
A_plus_B:
runs-on:
ubuntu-latest
steps:
- name:
Checkout code
uses:
actions/checkout@v3
- name:
try calculate A+B
run: |
echo "Beep boop! Let's try A plus B!"
echo "All '*.cpp' files:"
find . -name "*.cpp"
chmod +x ./make.sh
(echo "Y"; echo "Y") | ./make.sh ./demo/A_Plus_B.cpp
shell: bash
- name:
Check A+B result
id:
check_result
run: |
if [[ $(cat ./demo/A_Plus_B.ans) != "2034324" ]]; then
echo "Beep boop! We were tricked by CCF!"
cat ./demo/A_Plus_B.log
exit 1
else
echo "Beep boop! A+B result is correct!"
fi
shell: bash
- name:
Collect results
if:
steps.check_result.outcome == 'success'
run:
echo "Beep boop! The check passed successfully!"
echo "Beep boop! We successfully fk-ed CCF!"
shell: bash