2018-11-08 21:08:33 +01:00
|
|
|
stages:
|
|
|
|
- build
|
|
|
|
|
|
|
|
build:windows:
|
|
|
|
stage: build
|
|
|
|
tags:
|
|
|
|
- vs2017
|
|
|
|
- windows
|
|
|
|
before_script:
|
|
|
|
- git clean -xdf
|
|
|
|
- git submodule sync --recursive
|
|
|
|
- git submodule update --init --recursive
|
2020-08-10 16:53:12 +02:00
|
|
|
# Needs MSVC 2019 installed!
|
2019-12-05 15:53:47 +01:00
|
|
|
# Setup vcvars32.bat manually because this is powershell and MS does not have something simmilar for PS. Wtf?
|
|
|
|
# https://gist.github.com/justinian/81a2e55c89e8301a8a96
|
|
|
|
# https://stackoverflow.com/questions/2124753/how-can-i-use-powershell-with-the-visual-studio-command-prompt
|
|
|
|
- $tempFile = [IO.Path]::GetTempFileName()
|
2019-12-13 14:00:43 +01:00
|
|
|
- cmd /c " `"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat`" && set > `"$tempFile`" "
|
2019-12-05 15:53:47 +01:00
|
|
|
- Get-Content $tempFile | Foreach-Object {if($_ -match "^(.*?)=(.*)$"){Set-Content "env:\$($matches[1])" $matches[2]}}
|
|
|
|
- Remove-Item $tempFile
|
2020-09-03 19:23:17 +02:00
|
|
|
- $Env:Path += ';C:\Qt\5.15.1\msvc2019_64\bin'
|
2019-12-05 15:53:47 +01:00
|
|
|
- $Env:Path += ';C:\Qt\Tools\QtCreator\bin'
|
|
|
|
- $env:path -split ";"
|
2020-08-10 17:42:49 +02:00
|
|
|
cache:
|
|
|
|
key: ${CI_RUNNER_DESCRIPTION}
|
|
|
|
paths:
|
|
|
|
- Common\vcpkg\
|
2018-11-08 21:08:33 +01:00
|
|
|
script:
|
2020-09-18 14:51:46 +02:00
|
|
|
- git submodule update --init
|
|
|
|
- git submodule update --recursive
|
|
|
|
- cd Common
|
2020-09-18 14:55:53 +02:00
|
|
|
# git directory can already exist. In powershell this is an hard error, but not in CMD.
|
|
|
|
- cmd /C git clone https://github.com/microsoft/vcpkg.git
|
2020-09-18 14:51:46 +02:00
|
|
|
- cd vcpkg
|
|
|
|
- git pull
|
|
|
|
- git checkout 18ab4b72a26284f0df28295ce7bf9b21c96f20f4
|
|
|
|
- call bootstrap-vcpkg.bat
|
|
|
|
- vcpkg.exe install openssl --triplet x64-windows --recurse
|
|
|
|
- cd ..
|
|
|
|
- cd ..
|
2020-08-10 16:53:12 +02:00
|
|
|
- mkdir BUILD_WINDOWS
|
|
|
|
- cd BUILD_WINDOWS
|
2020-09-03 19:23:17 +02:00
|
|
|
- cmake.exe ../ -DCMAKE_PREFIX_PATH=c:/Qt/5.15.1/msvc2019 -DCMAKE_IGNORE_PATH=C:/Strawberry/c/bin -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE="$(Get-Location)/../Common/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows "-GCodeBlocks - Ninja" -B.
|
2020-08-10 16:53:12 +02:00
|
|
|
- cmake.exe --build . --target all
|
|
|
|
- cd bin
|
2020-08-10 21:49:46 +02:00
|
|
|
- windeployqt.exe --release --qmldir ../../ScreenPlay/qml ScreenPlay.exe
|
|
|
|
- windeployqt.exe --release --qmldir ../../ScreenPlayWidget ScreenPlayWidget.exe
|
|
|
|
- windeployqt.exe --release --qmldir ../../ScreenPlayWallpaper ScreenPlayWallpaper.exe
|
2020-08-11 19:38:58 +02:00
|
|
|
- del *.cpp,*.moc,*.h,*.obj,*.res,*.exp,*.lib,*.lik,*.pch, *.ninja, *.exe.manifest, *.cbp, *.cmake, *.ninja_log, *.ninja_deps, *.manifest
|
2018-11-08 21:08:33 +01:00
|
|
|
artifacts:
|
2019-12-05 15:53:47 +01:00
|
|
|
expire_in: '12 weeks'
|
2018-11-08 21:08:33 +01:00
|
|
|
paths:
|
2020-08-11 19:33:35 +02:00
|
|
|
- BUILD_WINDOWS/bin/
|
2019-12-13 13:28:26 +01:00
|
|
|
|
|
|
|
build_docs:
|
2019-12-13 13:29:56 +01:00
|
|
|
stage: .post
|
2019-12-13 13:28:26 +01:00
|
|
|
script:
|
|
|
|
- curl --request POST --form "token=$CI_JOB_TOKEN" --form ref=master https://gitlab.com/api/v4/projects/15800262/trigger/pipeline
|