1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-09 12:32:40 +01:00
ScreenPlay/.gitlab-ci.yml
2020-09-27 20:29:57 +02:00

65 lines
3.1 KiB
YAML

stages:
- build
build:windows:
stage: build
tags:
- vs2017
- windows
before_script:
- git clean -xdf
- git submodule sync --recursive
- git submodule update --init --recursive
# Needs MSVC 2019 installed!
# 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()
- cmd /c " `"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat`" && set > `"$tempFile`" "
- Get-Content $tempFile | Foreach-Object {if($_ -match "^(.*?)=(.*)$"){Set-Content "env:\$($matches[1])" $matches[2]}}
- Remove-Item $tempFile
- $Env:Path += ';C:\Qt\5.15.1\msvc2019_64\bin'
- $Env:Path += ';C:\Qt\Tools\QtCreator\bin'
- $env:path -split ";"
cache:
key: ${CI_RUNNER_DESCRIPTION}
paths:
- Common\vcpkg\
script:
- git submodule update --init
- git submodule update --recursive
- cd Common
- if (!(Test-Path "vcpkg")){git clone https://github.com/microsoft/vcpkg.git}
- cd vcpkg
- git remote set-url origin https://github.com/microsoft/vcpkg.git
- git pull origin master
- git checkout 18ab4b72a26284f0df28295ce7bf9b21c96f20f4
- cmd /c bootstrap-vcpkg.bat
- ls
- cmd /c vcpkg.exe install openssl --triplet x64-windows --recurse
- cd ..
- cd ..
- curl.exe -L https://www.gyan.dev/ffmpeg/builds/packages/ffmpeg-4.3.1-2020-09-16-full_build.zip --output ffmpeg.zip
- tar -xvf ffmpeg.zip --strip-components 2 ffmpeg-4.3.1-full_build/bin
- if (!(Test-Path "Common/ffmpeg")){ mkdir Common/ffmpeg }
- cmd /c DEL ffplay.exe
- cmd /c move /Y ffmpeg.exe Common/ffmpeg
- cmd /c move /Y ffprobe.exe Common/ffmpeg
- mkdir BUILD_WINDOWS
- cd BUILD_WINDOWS
- 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.
- cmake.exe --build . --target all
- cd bin
- windeployqt.exe --release --qmldir ../../ScreenPlay/qml ScreenPlay.exe
- windeployqt.exe --release --qmldir ../../ScreenPlayWidget ScreenPlayWidget.exe
- windeployqt.exe --release --qmldir ../../ScreenPlayWallpaper ScreenPlayWallpaper.exe
- del *.cpp,*.moc,*.h,*.obj,*.res,*.exp,*.lib,*.lik,*.pch, *.ninja, *.exe.manifest, *.cbp, *.cmake, *.ninja_log, *.ninja_deps, *.manifest
artifacts:
expire_in: '12 weeks'
paths:
- BUILD_WINDOWS/bin/
build_docs:
stage: .post
script:
- curl --request POST --form "token=$CI_JOB_TOKEN" --form ref=master https://gitlab.com/api/v4/projects/15800262/trigger/pipeline