@@ -24,101 +24,195 @@ jobs:
24
24
matrix :
25
25
config : # Create matrix with combinations
26
26
# compile AREG engine as a shared library with GNU g++ / gcc on Ubuntu Linux, enable AREG extensions and logs
27
- - { name: linux-gnu-shared-ext-log, os: ubuntu-latest, lib: shared, family: gnu, cxx: g++, cc: gcc, extend: ON, logs: ON}
27
+ - { name: linux-gnu-g++-shared,
28
+ os : ubuntu-latest,
29
+ lib : shared,
30
+ family : gnu,
31
+ cxx : g++,
32
+ comp : ON,
33
+ before : ON
34
+ }
35
+
28
36
# compile AREG engine as a shared library with GNU g++ / gcc on Ubuntu Linux, enable AREG extensions and no logs
29
- - { name: linux-gnu-shared-ext-nolog, os: ubuntu-latest, lib: shared, family: gnu, cxx: g++, cc: gcc, extend: ON, logs: OFF}
37
+ - { name: linux-gnu-g++-static,
38
+ os : ubuntu-latest,
39
+ lib : static,
40
+ family : gnu,
41
+ cxx : g++,
42
+ comp : OFF,
43
+ before : OFF
44
+ }
45
+
30
46
# compile AREG engine as a static library with GNU g++ / gcc on Ubuntu Linux, enable AREG extensions and logs
31
- - { name: linux-gnu-static-ext-log, os: ubuntu-latest, lib: static, family: gnu, cxx: g++, cc: gcc, extend: ON, logs: ON}
47
+ - { name: linux-gnu-gcc-shared,
48
+ os : ubuntu-latest,
49
+ lib : shared,
50
+ family : gnu,
51
+ cxx : gcc,
52
+ comp : OFF,
53
+ before : ON
54
+ }
55
+
32
56
# compile AREG engine as a shared library with GNU g++ / gcc on Ubuntu Linux, disable AREG extensions and logs
33
- - { name: linux-gnu-shared-noext-log, os: ubuntu-latest, lib: shared, family: gnu, cxx: g++, cc: gcc, extend: OFF, logs: ON}
34
- # compile AREG engine as a shared library with GNU g++ / gcc on Ubuntu Linux, disable AREG extensions and no logs
35
- - { name: linux-gnu-shared-noext-nolog, os: ubuntu-latest, lib: shared, family: gnu, cxx: g++, cc: gcc, extend: OFF, logs: OFF}
57
+ - { name: linux-gnu-gcc-static,
58
+ os : ubuntu-latest,
59
+ lib : shared,
60
+ family : gnu,
61
+ cxx : gcc,
62
+ comp : ON,
63
+ before : OFF
64
+ }
65
+
66
+ # compile AREG engine as a shared library with clang on Ubuntu Linux, enable AREG extensions and logs
67
+ - { name: linux-llvm-clang++-shared,
68
+ os : ubuntu-latest,
69
+ lib : shared,
70
+ family : llvm,
71
+ cxx : clang++,
72
+ comp : ON,
73
+ before : ON
74
+ }
75
+
76
+ # compile AREG engine as a shared library with clang on Ubuntu Linux, enable AREG extensions and no logs
77
+ - { name: linux-llvm-clang++-static,
78
+ os : ubuntu-latest,
79
+ lib : static,
80
+ family : llvm,
81
+ cxx : clang++,
82
+ comp : OFF,
83
+ before : OFF
84
+ }
85
+
36
86
# compile AREG engine as a shared library with clang on Ubuntu Linux, enable AREG extensions and logs
37
- - { name: linux-clang-shared-ext-log, os: ubuntu-latest, lib: shared, family: llvm, cxx: clang++, cc: clang, extend: ON, logs: ON}
87
+ - { name: linux-llvm-clang-shared,
88
+ os : ubuntu-latest,
89
+ lib : shared,
90
+ family : llvm,
91
+ cxx : clang,
92
+ comp : OFF,
93
+ before : ON
94
+ }
95
+
38
96
# compile AREG engine as a shared library with clang on Ubuntu Linux, enable AREG extensions and no logs
39
- - { name: linux-clang-shared-ext-nolog, os: ubuntu-latest, lib: shared, family: llvm, cxx: clang++, cc: clang, extend: ON, logs: OFF}
40
- # compile AREG engine as a static library with clang on Ubuntu Linux, enable AREG extensions and logs
41
- - { name: linux-clang-static-ext-log, os: ubuntu-latest, lib: static, family: llvm, cxx: clang++, cc: clang, extend: ON, logs: ON}
42
- # compile AREG engine as a shared library with clang on Ubuntu Linux, disable AREG extensions and logs
43
- - { name: linux-clang-shared-noext-log, os: ubuntu-latest, lib: shared, family: llvm, cxx: clang++, cc: clang, extend: OFF, logs: ON}
44
- # compile AREG engine as a shared library with clang on Ubuntu Linux, disable AREG extensions and no logs
45
- - { name: linux-clang-shared-noext-nolog,os: ubuntu-latest, lib: shared, family: llvm, cxx: clang++, cc: clang, extend: OFF, logs: OFF}
97
+ - { name: linux-llvm-clang-static,
98
+ os : ubuntu-latest,
99
+ lib : static,
100
+ family : llvm,
101
+ cxx : clang,
102
+ comp : ON,
103
+ before : OFF
104
+ }
105
+
106
+ # compile AREG engine as a shared with CYGWIN g++ / gcc on Windows, enable AREG extensions and logs
107
+ - { name: win-cygwin-g++-shared,
108
+ os : windows-latest,
109
+ lib : shared,
110
+ family : cygwin,
111
+ cxx : g++,
112
+ comp : ON,
113
+ before : ON
114
+ }
115
+
116
+ # compile AREG engine as a shared with CYGWIN g++ / gcc on Windows, enable AREG extensions and logs
117
+ - { name: win-cygwin-g++-static,
118
+ os : windows-latest,
119
+ lib : static,
120
+ family : cygwin,
121
+ cxx : g++,
122
+ comp : OFF,
123
+ before : OFF
124
+ }
125
+
126
+ # compile AREG engine as a shared with CYGWIN g++ / gcc on Windows, enable AREG extensions and logs
127
+ - { name: win-cygwin-gcc-shared,
128
+ os : windows-latest,
129
+ lib : shared,
130
+ family : cygwin,
131
+ cxx : gcc,
132
+ comp : OFF,
133
+ before : ON
134
+ }
135
+
46
136
# compile AREG engine as a shared with CYGWIN g++ / gcc on Windows, enable AREG extensions and logs
47
- - { name: win-cygwin-shared-ext-log, os: windows-latest, lib: shared, family: cygwin, cxx: g++, cc: gcc, extend: ON, logs: ON}
48
- # compile AREG engine as a shared with CYGWIN g++ / gcc on Windows, enable AREG extensions and no logs
49
- - { name: win-cygwin-shared-ext-nolog, os: windows-latest, lib: shared, family: cygwin, cxx: g++, cc: gcc, extend: ON, logs: OFF}
50
- # compile AREG engine as a static with CYGWIN g++ / gcc on Windows, enable AREG extensions and logs
51
- - { name: win-cygwin-static-ext-log, os: windows-latest, lib: static, family: cygwin, cxx: g++, cc: gcc, extend: ON, logs: ON}
52
- # compile AREG engine as a shared with CYGWIN g++ / gcc on Windows, disable AREG extensions and logs
53
- - { name: win-cygwin-shared-noext-log, os: windows-latest, lib: shared, family: cygwin, cxx: g++, cc: gcc, extend: OFF, logs: ON}
54
- # compile AREG engine as a shared with CYGWIN g++ / gcc on Windows, disable AREG extensions and no logs
55
- - { name: win-cygwin-shared-noext-nolog,os: windows-latest, lib: shared, family: cygwin, cxx: g++, cc: gcc, extend: OFF, logs: OFF}
137
+ - { name: win-cygwin-gcc-static,
138
+ os : windows-latest,
139
+ lib : static,
140
+ family : cygwin,
141
+ cxx : gcc,
142
+ comp : ON,
143
+ before : OFF
144
+ }
145
+
56
146
# compile AREG engine as a shared with MSVC on Windows, enable AREG extensions and logs
57
- - { name: win-msvc-shared-ext-log, os: windows-latest, lib: shared, family: msvc, cxx: cl, cc: cl, extend: ON, logs: ON}
58
- # compile AREG engine as a shared with MSVC on Windows, enable AREG extensions and no logs
59
- - { name: win-msvc-shared-ext-nolog, os: windows-latest, lib: shared, family: msvc, cxx: cl, cc: cl, extend: ON, logs: OFF}
60
- # compile AREG engine as a static with MSVC on Windows, enable AREG extensions and logs
61
- - { name: win-msvc-static-ext-log, os: windows-latest, lib: static, family: msvc, cxx: cl, cc: cl, extend: ON, logs: ON}
147
+ - { name: win-msvc-cl-shared,
148
+ os : windows-latest,
149
+ lib : shared,
150
+ family : msvc,
151
+ cxx : cl,
152
+ comp : ON,
153
+ before : ON
154
+ }
155
+
62
156
# compile AREG engine as a shared with MSVC on Windows, enable AREG extensions and logs
63
- - { name: win-msvc-shared-noext-log, os: windows-latest, lib: shared, family: msvc, cxx: cl, cc: cl, extend: OFF, logs: ON}
64
- # compile AREG engine as a shared with MSVC on Windows, enable AREG extensions and no logs
65
- - { name: win-msvc-shared-noext-nolog, os: windows-latest, lib: shared, family: msvc, cxx: cl, cc: cl, extend: OFF, logs: OFF}
157
+ - { name: win-msvc-cl-static,
158
+ os : windows-latest,
159
+ lib : static,
160
+ family : msvc,
161
+ cxx : cl,
162
+ comp : OFF,
163
+ before : OFF
164
+ }
66
165
67
166
steps :
68
167
69
- - name : Checkout AREG engine (AREG SDK) source codes and dependencies
70
- uses : actions/checkout@v3
168
+ - name : Checkout AREG SDK Demo project sources and dependencies
169
+ uses : actions/checkout@v4
71
170
with :
72
171
submodules : recursive
73
172
173
+ - name : Setup Java JDK to run code generator
174
+
175
+ with :
176
+ java-version : 17
177
+ java-package : jre
178
+ distribution : temurin
179
+
74
180
- name : Update compilers on Linux
75
181
if : matrix.config.os == 'ubuntu-latest'
76
182
# Update compilers, set C/C++ compilers
77
- run : |
78
- sudo apt-get update
79
- export CC=/usr/bin/${{matrix.config.cc}} CXX=/usr/bin/${{matrix.config.cxx}}
183
+ run : sudo apt-get update
80
184
81
- - name : Fetch cygwin installer on Windows
185
+ - name : Set Windows PATH environment variable for cygwin
82
186
if : matrix.config.os == 'windows-latest' && matrix.config.family == 'cygwin'
83
- shell : powershell
84
- run : Invoke-WebRequest https://cygwin.com/setup-x86_64.exe -OutFile C:\setup.exe
187
+ run : echo "PATH=C:\cygwin;C:\cygwin\bin;C:\cygwin\lib;%SYSTEMROOT%\system32;%PATH%" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
85
188
86
189
- name : Install cygwin on Windows
87
190
if : matrix.config.os == 'windows-latest' && matrix.config.family == 'cygwin'
88
- shell : cmd
89
- run : |
90
- c:\setup.exe -qgnO -s http://mirrors.kernel.org/sourceware/cygwin/ -l C:\cygwin-packages\ -P ^
91
- cmake,^
92
- dos2unix,^
93
- extra-cmake-modules,^
94
- flexdll,^
95
- gcc-g++,^
96
- make,^
97
- ncurses,^
98
- libncurses-devel
99
-
100
- - name : set Windows PATH environment variable
101
- if : matrix.config.os == 'windows-latest' && matrix.config.family == 'cygwin'
102
- run : echo "PATH=C:\cygwin64;C:\cygwin64\bin;C:\cygwin64\lib;%SYSTEMROOT%\system32;%PATH%" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
103
-
104
- - name : Configure CMake with enabled extended feature and selected compiler family
105
- if : matrix.config.extend == 'ON'
191
+ uses : cygwin/cygwin-install-action@v4
192
+ with :
193
+ packages : cmake, dos2unix, flexdll, gcc-g++, git, ncurses, libncurses-devel, make
194
+
195
+ - name : Set cmake cache destination for Linux
196
+ if : matrix.config.os == 'ubuntu-latest'
197
+ run : echo "CACHE_DEST=./product/cache/${{matrix.config.name}}" >> "$GITHUB_ENV"
198
+
199
+ - name : Set cmake cache destination for Windows
200
+ if : matrix.config.os == 'windows-latest'
201
+ run : echo "CACHE_DEST=./product/cache/${{matrix.config.name}}" >> $env:GITHUB_ENV
202
+
203
+ - name : Configure CMake and pass compiler option
204
+ if : matrix.config.comp == 'ON'
106
205
working-directory : ${{github.workspace}}
107
206
run : |
108
- cmake -B ./build -DAREG_COMPILER_FAMILY =${{matrix.config.family }} -DAREG_BUILD_TYPE=${{env.BUILD_TYPE}} -DAREG_BINARY=${{matrix.config.lib}} -DAREG_EXTENDED :BOOL=${{matrix.config.extend}} -DAREG_LOGS:BOOL=${{matrix.config.logs }}
207
+ cmake -B ${{env.CACHE_DEST}} -DAREG_COMPILER =${{matrix.config.cxx }} -DAREG_BUILD_TYPE=${{env.BUILD_TYPE}} -DAREG_BINARY=${{matrix.config.lib}} -DINTEGRATE_AREG_BEFORE_PROJECT :BOOL=${{matrix.config.before }}
109
208
110
- - name : Configure CMake for disabled extended feature and selected compiler
111
- if : matrix.config.extend == 'OFF'
209
+ - name : Configure CMake and pass compiler family option
210
+ if : matrix.config.comp == 'OFF'
112
211
working-directory : ${{github.workspace}}
113
212
run : |
114
- cmake -B ./build -DAREG_COMPILER =${{matrix.config.cc }} -DAREG_BUILD_TYPE=${{env.BUILD_TYPE}} -DAREG_BINARY=${{matrix.config.lib}} -DAREG_EXTENDED :BOOL=${{matrix.config.extend}} -DAREG_LOGS:BOOL=${{matrix.config.logs }}
213
+ cmake -B ${{env.CACHE_DEST}} -DAREG_COMPILER_FAMILY =${{matrix.config.family }} -DAREG_BUILD_TYPE=${{env.BUILD_TYPE}} -DAREG_BINARY=${{matrix.config.lib}} -DINTEGRATE_AREG_BEFORE_PROJECT :BOOL=${{matrix.config.before }}
115
214
116
215
- name : Build with CMake
117
216
working-directory : ${{github.workspace}}
118
217
# Build your program with the given configuration
119
- run : cmake --build ./build -j10
120
-
121
- - name : Run Unit Tests
122
- working-directory : ${{github.workspace}}
123
- run : ctest --test-dir ./build --output-on-failure --output-junit test_results.xml
124
-
218
+ run : cmake --build ${{env.CACHE_DEST}} -j 20
0 commit comments