-
Notifications
You must be signed in to change notification settings - Fork 67
189 lines (161 loc) · 4.96 KB
/
regression_on_demand.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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
name: 'regression_on_demand'
on:
workflow_dispatch:
jobs:
linux-gcc:
name: ubuntu-linux-${{ matrix.mode }}
runs-on: ubuntu-latest
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
mode:
- pygen
- tclgen
steps:
- name: Install dependencies
run: |
sudo apt-get update -qq
sudo apt install -y \
g++-9 \
tclsh \
default-jre \
cmake \
build-essential \
swig \
google-perftools \
libgoogle-perftools-dev \
uuid-dev \
lcov
sudo ln -sf /usr/bin/g++-9 /usr/bin/g++
sudo ln -sf /usr/bin/gcc-9 /usr/bin/gcc
sudo ln -sf /usr/bin/gcov-9 /usr/bin/gcov
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.8
architecture: x64
- name: Setup Python Packages
run: pip3 install psutil
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0
- name: Configure shell
run: |
echo 'CC=gcc-9' >> $GITHUB_ENV
echo 'CXX=g++-9' >> $GITHUB_ENV
echo 'PREFIX=/tmp/surelog-install' >> $GITHUB_ENV
echo 'ADDITIONAL_CMAKE_OPTIONS=-DPython3_ROOT_DIR=$pythonLocation' >> $GITHUB_ENV
echo 'PATH=/usr/lib/ccache:'"$pythonLocation""$PATH" >> $GITHUB_ENV
if [[ "${{ matrix.mode }}" = "pygen" ]] ; then
echo 'WITH_PYTHON_GENERATOR=ON' >> $GITHUB_ENV
else
echo 'WITH_PYTHON_GENERATOR=OFF' >> $GITHUB_ENV
fi
- name: Run Regression
run: |
env
which cmake && cmake --version
which make && make --version
which swig && swig -version
which java && java -version
which python && python --version
which ninja && ninja --version
which tclsh && echo 'puts [info patchlevel];exit 0' | tclsh
which $CC && $CC --version
which $CXX && $CXX --version
make pytest/regression || true
make regression
- name: Archive regression artifacts
if: always()
uses: actions/upload-artifact@v2
with:
name: surelog-linux-gcc-regression-${{ matrix.mode }}
path: |
${{ github.workspace }}/build/test/
${{ github.workspace }}/build/tests/
${{ github.workspace }}/build/regression/**/*.log
windows-msvc:
name: windows-msvc-${{ matrix.mode }}
runs-on: windows-latest
defaults:
run:
shell: cmd
strategy:
fail-fast: false
matrix:
mode:
- pygen
- tclgen
steps:
- name: Install Core Dependencies
run: |
choco install -y make
choco install -y swig --side-by-side --version=3.0.12
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.8
architecture: x64
- name: Setup Python Packages
run: pip3 install psutil
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: 1.8
java-package: jre
architecture: x64
- run: git config --global core.autocrlf input
shell: bash
- name: Move Windows builds to C:\ drive
if: runner.os == 'Windows'
shell: cmd
run: |
mkdir C:\Surelog
cd /D C:\Surelog
rd /S /Q %GITHUB_WORKSPACE%
mklink /D %GITHUB_WORKSPACE% C:\Surelog
- uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0
- name: Run Regression
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
set CMAKE_GENERATOR=Ninja
set CC=cl
set CXX=cl
set PREFIX=%GITHUB_WORKSPACE%\install
set CPU_CORES=%NUMBER_OF_PROCESSORS%
set MAKE_DIR=C:\make\bin
set TCL_DIR=%PROGRAMFILES%\Git\mingw64\bin
set SWIG_DIR=%PROGRMDATA%\chocolatey\lib\swig\tools\install\swigwin-3.0.12
set ADDITIONAL_CMAKE_OPTIONS="-DPython3_ROOT_DIR=%pythonLocation% -DSURELOG_WITH_TCMALLOC=Off"
set PATH=%pythonLocation%;%SWIG_DIR%;%JAVA_HOME%\bin;%MAKE_DIR%;%TCL_DIR%;%PATH%
if "${{ matrix.mode }}" == "pygen" (
set WITH_PYTHON_GENERATOR=ON
) else (
set WITH_PYTHON_GENERATOR=OFF
)
set
where cmake && cmake --version
where make && make --version
where swig && swig -version
where java && java -version
where python && python --version
where ninja && ninja --version
make pytest/regression || true
make regression
- name: Archive regression artifacts
if: always()
uses: actions/upload-artifact@v2
with:
name: surelog-windows-msvc-regression-${{ matrix.mode }}
path: |
${{ github.workspace }}/build/test/
${{ github.workspace }}/build/tests/
${{ github.workspace }}/build/regression/**/*.log