@@ -164,58 +164,67 @@ jobs:
164164
165165 brlcad_linux :
166166 name : BRL-CAD Linux step-g Test
167- runs-on : ubuntu-20.04
167+ runs-on : ubuntu-latest
168168 strategy :
169169 fail-fast : true
170170 steps :
171171 - name : Setup - CMake
172172 uses : lukka/get-cmake@latest
173173
174- - name : Setup - Ninja
175- uses : seanmiddleditch/gha-setup-ninja@master
176-
177174 - name : Setup - System
178175 env :
179176 DEBIAN_FRONTEND : noninteractive
180177 run : |
181178 sudo apt-get update
182179 # Install dev tools
183180 sudo apt-get install re2c lemon
181+ sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
182+ # Install tools
183+ sudo apt-get install astyle re2c xsltproc libxml2-utils
184+ # Install dependency dev pkgs
185+ sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev
184186 sudo apt-get clean
185187
186- - name : Checkout
188+ - name : Clone bext
187189 run : |
188- git clone --depth 1 https://github.com/BRL-CAD/brlcad.git -b main
189- cd brlcad/src/other/ext && rm -rf stepcode
190+ git clone https://github.com/BRL-CAD/bext.git
191+ cd bext/stepcode
192+ cmake -E rm -r stepcode
190193 git clone --depth 1 https://github.com/stepcode/stepcode.git -b develop
191- # Ordinarily BRL-CAD keeps track of what files are supposed to be
192- # present in the repository. In this case we're not interested in
193- # updating the list to the working stepcode filelist, so use an empty
194- # list instead
195- echo "set(stepcode_ignore_files)" > stepcode.dist
196- cd ../../../../
194+ cd ../..
195+
196+ - name : Build bext
197+ shell : powershell
198+ run : |
199+ cmake -E make_directory bext_build
200+ cmake -S bext -B bext_build -DCMAKE_BUILD_TYPE=Release -DUSE_GDAL=OFF -DUSE_TCL=OFF -DUSE_QT=OFF -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}\bext_output
201+ cmake --build bext_build --config Release -j2
202+ # We only need the build ouputs (bext_output) after this point, so
203+ # clean up to save space for the main BRL-CAD build.
204+ cmake -E rm -rf bext
205+ cmake -E rm -rf bext_build
197206
198207
208+ - name : Checkout
209+ run : |
210+ git clone --depth 1 https://github.com/BRL-CAD/brlcad.git -b main
211+
199212 - name : Configure
200213 run : |
201- export PATH=$ENV{GITHUB_WORKSPACE}:$PATH
202- cd brlcad
203- cmake -S . -G Ninja -B build -DENABLE_ALL=ON -DCMAKE_BUILD_TYPE=Release -DEXT_BUILD_VERBOSE=ON
204- cd ..
214+ cmake -E make_directory brlcad_build
215+ cmake -S brlcad -B brlcad_build -DBRLAD_ENABLE_GDAL=OFF -DBRLCAD_ENABLE_TCL=OFF -DBRLCAD_ENABLE_QT=OFF -B build -G Ninja -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_COMPILER="cl.exe"
205216
206217 - name : Build
207218 run : |
208- export PATH=$ENV{GITHUB_WORKSPACE}:$PATH
209- cd brlcad
210- cmake --build build --config Release --target step-g
219+ cd brlcad_build
220+ cmake --build . --target step-g
211221 cd ..
212222
213223 - name : Test
214224 run : |
215- export PATH=$ENV{GITHUB_WORKSPACE}:$PATH
216- cd brlcad/build
217- ./bin/step-g ../db/nist/NIST_MBE_PMI_3.stp -o nist3.g
218- cd ../..
225+ cd brlcad_build
226+ ./bin/step-g ../brlcad/db/nist/NIST_MBE_PMI_3.stp -o nist3.g
227+ cd ..
219228
220229
221230 brlcad_windows :
@@ -227,51 +236,48 @@ jobs:
227236 - name : Setup - CMake
228237 uses : lukka/get-cmake@latest
229238
230- - name : Setup - Ninja
231- uses : seanmiddleditch/gha-setup-ninja@master
232-
233239 - name : Add github workspace to path
234240 # https://github.community/t/deprecated-add-path/136621
235241 run : echo "$ENV{GITHUB_WORKSPACE}" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
236242
237- - name : Add msbuild to PATH
238- uses : microsoft/setup-msbuild@v1.0.2
243+ - name : Clone bext
244+ run : |
245+ git clone https://github.com/BRL-CAD/bext.git
246+ cd bext/stepcode
247+ cmake -E rm -r stepcode
248+ git clone --depth 1 https://github.com/stepcode/stepcode.git -b develop
249+ cd ../..
250+
251+ - name : Build bext
252+ shell : powershell
253+ run : |
254+ cmake -E make_directory bext_build
255+ cmake -S bext -B bext_build -DCMAKE_BUILD_TYPE=Release -DUSE_GDAL=OFF -DUSE_TCL=OFF -DUSE_QT=OFF -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}\bext_output
256+ cmake --build bext_build --config Release -j2
257+ # We only need the build ouputs (bext_output) after this point, so
258+ # clean up to save space for the main BRL-CAD build.
259+ cmake -E rm -rf bext
260+ cmake -E rm -rf bext_build
239261
240- - name : Add cl.exe to PATH
241- uses : ilammy/msvc-dev-cmd@v1
242262
243263 - name : Checkout
244264 run : |
245265 git clone --depth 1 https://github.com/BRL-CAD/brlcad.git -b main
246- cd brlcad/src/other/ext
247- cmake -E rm -r stepcode
248- git clone --depth 1 https://github.com/stepcode/stepcode.git -b develop
249- # Ordinarily BRL-CAD keeps track of what files are supposed to be
250- # present in the repository. In this case we're not interested in
251- # updating the list to the working stepcode filelist, so use an empty
252- # list instead
253- echo "set(stepcode_ignore_files)" > stepcode.dist
254- cd ../../../../
255266
256267 - name : Configure
257268 run : |
258- cd brlcad && cmake -S . -B build -G Ninja -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_COMPILER="cl.exe" -DSC_ENABLE_TESTING=ON
259- cd ..
260- # We do the following in order to help ensure files are "flushed"
261- # to disk before compilation is attempted
262- # https://superuser.com/a/1553374/1286142
263- powershell Write-VolumeCache C
264- powershell Write-VolumeCache D
269+ cmake -E make_directory brlcad_build
270+ cmake -S brlcad -B brlcad_build -DBRLAD_ENABLE_GDAL=OFF -DBRLCAD_ENABLE_TCL=OFF -DBRLCAD_ENABLE_QT=OFF -B build -G Ninja -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_COMPILER="cl.exe"
265271
266272 - name : Build
267273 run : |
268- cd brlcad/build
269- ninja -j1 -v step-g
270- cd ../..
274+ cd brlcad_build
275+ cmake --build . --target step-g
276+ cd ..
271277
272278 - name : Test
273279 run : |
274- cd brlcad/build
275- ./bin/step-g.exe ../db/nist/NIST_MBE_PMI_3.stp -o nist3.g
276- cd ../..
280+ cd brlcad_build
281+ ./bin/step-g.exe ../brlcad/ db/nist/NIST_MBE_PMI_3.stp -o nist3.g
282+ cd ..
277283
0 commit comments