-
Notifications
You must be signed in to change notification settings - Fork 11
146 lines (145 loc) · 4.31 KB
/
ci.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: "actions/[email protected]"
- uses: "coursier/cache-action@v2"
- name: "java ${{matrix.java}} setup"
uses: "olafurpg/setup-scala@v13"
with:
java-version: "${{matrix.java}}"
- name: "run JVM tests"
run: |
sbt "++${{matrix.scala}}; coreJVM/test; cli/test; doc; paradox"
./test_cli.sh
strategy:
matrix:
java:
- '8'
- '11'
scala:
- '2.13.15'
timeout-minutes: 30
testPY:
runs-on: ubuntu-latest
steps:
- uses: "actions/[email protected]"
- uses: "coursier/cache-action@v2"
- name: "java ${{matrix.java}} setup"
uses: "olafurpg/setup-scala@v13"
with:
java-version: "${{matrix.java}}"
- name: "python setup"
uses: "actions/setup-python@v2"
with:
python-version: "${{matrix.python}}"
- name: "build assembly"
run: "sbt \"++${{matrix.scala}}; cli/assembly\""
- name: "generate python code"
run: "./bosatsuj transpile --input_dir test_workspace/ --package_root test_workspace/ --outdir pyout python --externals test_workspace/Prog.bosatsu_externals --evaluators test_workspace/Prog.bosatsu_eval"
- name: "run python tests"
run: "PYTHONPATH=$PYTHONPATH:$(pwd)/test_workspace:$(pwd)/pyout python3 -m unittest discover pyout -v --pattern \"*.py\""
strategy:
matrix:
java:
- '11'
scala:
- '2.13.15'
python:
- '3.9'
timeout-minutes: 30
testJS:
runs-on: ubuntu-latest
steps:
- uses: "actions/[email protected]"
- uses: "coursier/cache-action@v2"
- name: "java ${{matrix.java}} setup"
uses: "olafurpg/setup-scala@v13"
with:
java-version: "${{matrix.java}}"
- name: "run coreJS tests"
run: |
sbt "++${{matrix.scala}}; coreJS/test; jsapiJS/compile"
sbt "++${{matrix.scala}}; jsuiJS/test"
strategy:
matrix:
java:
- '11'
scala:
- '2.13.15'
timeout-minutes: 30
testWithCoverageReport:
runs-on: ubuntu-latest
steps:
- uses: "actions/[email protected]"
- uses: "coursier/cache-action@v2"
- name: "java ${{matrix.java}} setup"
uses: "olafurpg/setup-scala@v13"
with:
java-version: "${{matrix.java}}"
- name: "run tests with coverage"
run: |
sbt "coverage; clean; coreJVM/test; cli/test; coverageReport"
bash <(curl -s https://codecov.io/bash)
strategy:
matrix:
java:
- '8'
timeout-minutes: 30
buildWithGraal:
runs-on: ubuntu-latest
steps:
- uses: "actions/[email protected]"
- uses: "coursier/cache-action@v2"
- name: "graalvm setup"
uses: "olafurpg/setup-scala@v13"
with:
java-version: "${{matrix.java}}"
- name: "build native image"
run: |
sbt "++${{matrix.scala}}; cli/nativeImage"
cp cli/target/native-image/bosatsu-cli bosatsu
- name: "run bosatsu tests"
run: |
./bosatsu test --input_dir test_workspace/ --package_root test_workspace/
strategy:
matrix:
scala:
- '2.13.15'
java:
- '8'
testC:
runs-on: ubuntu-latest
strategy:
matrix:
scala:
- '2.13.15'
java:
- '8'
steps:
- uses: "actions/[email protected]"
- name: "install boehm"
run: "sudo apt-get update && sudo apt install -y libgc1 libgc-dev"
- name: "test runtime code"
run: |
cd c_runtime
rm -f test_exe
make && git diff --quiet || { git diff; false; }
make boehm_example
./test_exe && ./boehm_example && cd ..
- name: "build assembly"
run: "sbt \"++${{matrix.scala}}; cli/assembly\""
- name: "generate c code"
run: "./bosatsuj transpile --input_dir test_workspace/ --package_root test_workspace/ --outdir c_out c --test"
- name: "compile generated c code"
run: |
cp c_runtime/*.h c_out
cp c_runtime/*.c c_out
cp c_runtime/Makefile.test c_out/Makefile
cd c_out
make
cat output.log
timeout-minutes: 30
name: ci
on:
pull_request: {}