Skip to content

Commit 274867c

Browse files
committed
add CI
1 parent d515d16 commit 274867c

File tree

3 files changed

+58
-3
lines changed

3 files changed

+58
-3
lines changed

.github/workflows/ci.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: PL0 Test
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- .github/workflows/ci.yml
8+
- *.h
9+
- *.cpp
10+
- makefile
11+
- example/**
12+
pull_request:
13+
branches: [ main ]
14+
paths:
15+
- .github/workflows/ci.yml
16+
- *.h
17+
- *.cpp
18+
- makefile
19+
- example/**
20+
workflow_dispatch:
21+
22+
jobs:
23+
mac-aarch64:
24+
runs-on: macos-latest
25+
steps:
26+
- name: checkout
27+
uses: actions/checkout@v4
28+
- name: build
29+
run: |
30+
make
31+
- name: check
32+
run: |
33+
./pl0
34+
- name: test
35+
run: |
36+
./pl0 -ast example/fibonacci.pl0
37+
./pl0 -code example/fibonacci.pl0
38+
./pl0 -exec example/fibonacci.pl0
39+
40+
linux-x86_64:
41+
runs-on: ubuntu-latest
42+
steps:
43+
- name: checkout
44+
uses: actions/checkout@v4
45+
- name: build
46+
run: |
47+
make
48+
- name: check
49+
run: |
50+
./pl0
51+
- name: test
52+
run: |
53+
./pl0 -ast example/fibonacci.pl0
54+
./pl0 -code example/fibonacci.pl0
55+
./pl0 -exec example/fibonacci.pl0

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# PL/0 @ NUAA CCST 2020 Compiler Principles
22

3-
## PL/0 bytecode compiler and virtual machine
3+
## PL/0 compiler and virtual machine
44

55
This is a course design for `Compiler Principles` of `NUAA CCST 2020`.
6-
It includes a PL/0 compiler and virtual machine.
6+
It includes a PL/0 bytecode compiler and virtual machine.
77

88
## Build
99

makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
pl0: main.cpp pl_ast.h pl_code.h pl_lex.h pl_parse.h pl_vm.h pl.h
3-
c++ -std=c++11 -O3 main.cpp -o pl0
3+
c++ -std=c++14 -O3 main.cpp -o pl0
44

55
.PHONY=clean
66
clean:

0 commit comments

Comments
 (0)