diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e5cd347be430b51e5d7c9838530b9a6553d94b9c..502e101a1e05518abd37b1e3e38d4ae633e2e086 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,25 +18,20 @@ mac: - build/*dmg expire_in: 10 days + +# To test the GitLab process _locally_ on MS-Windows with powershell (pwsh), +# go to the root Git directory, and run: +# C:\GitLab-Runner\gitlab-runner.exe exec shell --shell pwsh --builds-dir <gitlab build-dir> <job-name> + windows: tags: - - Windows + - Windows stage: build + variables: + GIT_DEPTH: 1 # shallow cloning script: - - set OPTLIBS=C:\opt\x64 - - set CCACHE_DIR=C:\opt\ccache - - New-Item -ItemType "directory" -Confirm:$false -Force:$true -Name "build" - - $Env:Path - - cd build - - cmd.exe "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" - - cmake --version - - cmake -G "Visual Studio 16 2019" -A x64 -T host=x64 -DLIB_MAN=OFF -DQTDIR=C:/Qt/5.14.1/msvc2017_64 -DCPACK_IFW_ROOT=C:\Qt\Tools\QtInstallerFramework\3.2 -DCMAKE_INCLUDE_PATH=%OPTLIBS%/include -DCMAKE_LIBRARY_PATH=%OPTLIBS%/lib -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_COMPILER="cl.exe" -B. .. - - ccache -z - - ccache -p - - cmake --build . --config Release - - Get-Location - - ctest -C Release --output-on-failure - - cpack -C Release --verbose + # run local Powershell script + - ./winbuild.ps1 artifacts: paths: - build/*.exe