-
-
Notifications
You must be signed in to change notification settings - Fork 11
60 lines (55 loc) · 1.69 KB
/
continuous-integration-v2.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
name: Continuous Integration v2.x
#trigger when these occur
on:
push:
branches:
- v2
pull_request:
types:
- opened
- edited
- reopened
branches:
- v2
workflow_dispatch:
#CI workflows using a matrix
jobs:
run-test-cases:
continue-on-error: true
strategy:
matrix:
platforms:
- { os: ubuntu-latest, preinstall: sudo apt-get install gdb, gdb_skip: false }
- { os: windows-latest, preinstall: , gdb_skip: false }
- { os: macos-latest, preinstall: , gdb_skip: true }
commands:
- { exec: make tests, gdb: false }
- { exec: make tests-gdb, gdb: true }
runs-on: ${{ matrix.platforms.os }}
steps:
- uses: actions/checkout@v4
- name: Preinstall dependencies
run: ${{ matrix.platforms.preinstall }}
- name: run the test cases
if: matrix.commands.gdb == false || matrix.platforms.gdb_skip == false
run: ${{ matrix.commands.exec }}
#TODO: hook this up to real script files, preferably in the test section
run-test-repl-scripts:
continue-on-error: true
needs: run-test-cases
strategy:
matrix:
platforms:
- { os: ubuntu-latest }
- { os: windows-latest }
- { os: macos-latest }
commands:
- { build: make repl, run: out/repl.exe -f '../scripts/example.toy' }
- { build: make repl, run: out/repl.exe -f '../scripts/example-print.toy' }
runs-on: ${{ matrix.platforms.os }}
steps:
- uses: actions/checkout@v4
- name: compile the repl
run: ${{ matrix.commands.build }}
- name: run the repl scripts
run: ${{ matrix.commands.run }}