-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (45 loc) · 1.47 KB
/
CI-testing-C-method.yml
File metadata and controls
54 lines (45 loc) · 1.47 KB
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
name: Run Tests on Implementation in C
on:
push:
branches: main
paths: ["C-method/**", "tests/**", ".github/workflows/**"]
pull_request:
branches: main
paths: ["C-method/**", "tests/**", ".github/workflows/**"]
schedule:
# Overnight: run tests every Thursday at 20:00 UTC
# cron <minute> <hour> <day-of-month> <day-of-week (sunday=0)>
- cron: "0 20 * * 4"
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install dependencies (G++, Valgrind, Python3, cpplint)
run: |
sudo apt update
sudo apt install -y build-essential valgrind python3
pip3 install --user cpplint
- name: Setup
working-directory: ./C-method
run: |
chmod +x setup.sh
sudo ./setup.sh
- name: Compile
working-directory: ./C-method
run: make 2>&1 | tee compile_info.txt
- name: Run tests (implementation & coding style)
working-directory: ./C-method
run: python3 checker.py 2>&1 | tee test_results.txt
- name: Upload test logs as artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: checker-logs
path: |
./C-method/compile_info.txt
./C-method/test_results.txt
# Without `*` globbing, folders files will not be uploaded
tests/output-C-method/*
retention-days: 7