forked from chanbengz/SUSTech_CS323_Project_Incredibuild
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (35 loc) · 909 Bytes
/
test.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
name: Test
on:
push:
branches: [ "main" ]
paths:
- 'src/**'
pull_request:
branches: [ "main" ]
paths:
- 'src/**'
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v2
with:
version: "17.0"
- name: Test Lexer
run: cargo test --verbose
working-directory: src/lexer
- name: Test Parser
run: cargo test --verbose
working-directory: src/parser
- name: Test Analyzer
run: cargo test --verbose
working-directory: src/analyser
- name: Test IRGen
run: cargo test --verbose
working-directory: src/irgen
- name: Test CodeGen
run: for file in test/phase4/*.spl; do cargo run -- $file; cc `echo $file | sed 's/\.spl/\.S/'` -no-pie -o $file.out; done