Files
threeSD/appveyor.yml
T
2019-10-02 18:36:19 +08:00

74 lines
2.3 KiB
YAML

# shallow clone
clone_depth: 5
os: Visual Studio 2017
environment:
# Tell msys2 to add mingw64 to the path
MSYSTEM: MINGW64
# Tell msys2 to inherit the current directory when starting the shell
CHERE_INVOKING: 1
matrix:
- BUILD_TYPE: mingw
platform:
- x64
configuration:
- Release
install:
- git submodule update --init --recursive
- ps: |
if ($env:BUILD_TYPE -eq 'mingw') {
$dependencies = "mingw64/mingw-w64-x86_64-cmake mingw64/mingw-w64-x86_64-qt5-static"
C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S $dependencies"
# (HACK) ignore errors
0
}
before_build:
- mkdir %BUILD_TYPE%_build
- cd %BUILD_TYPE%_build
- ps: |
if ($env:BUILD_TYPE -eq 'msvc') {
# redirect stderr and change the exit code to prevent powershell from cancelling the build if cmake prints a warning
cmd /C 'cmake -G "Visual Studio 15 2017 Win64" -DUSE_BUNDLED_QT=OFF -DQt5_DIR=C:\Qt\5.13.0\msvc2017_64\lib\cmake\qt5 -DWARNINGS_AS_ERRORS=OFF - .. 2>&1 && exit 0'
} else {
C:\msys64\usr\bin\bash.exe -lc "cmake -G 'MSYS Makefiles' -DCMAKE_BUILD_TYPE=Release -DMINGW_STATIC_BUILD=ON -DCOMPILE_WITH_DWARF=OFF .. 2>&1"
}
- cd ..
build_script:
- ps: |
if ($env:BUILD_TYPE -eq 'msvc') {
# https://www.appveyor.com/docs/build-phase
msbuild msvc_build/threeSD.sln /maxcpucount /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
} else {
C:\msys64\usr\bin\bash.exe -lc 'mingw32-make -j4 -C mingw_build/ 2>&1'
}
after_build:
- ps: |
mkdir release
mkdir release\dist
if ($env:BUILD_TYPE -eq 'msvc') {
Remove-Item -Force .\msvc_build\bin\release\*.pdb
Remove-Item -Force .\msvc_build\bin\release\platforms\*.pdb
Remove-Item -Force .\msvc_build\bin\release\styles\*.pdb
Copy-Item .\msvc_build\bin\release\* -Destination release -Recurse
} else {
Copy-Item .\mingw_build\bin\threeSD.exe -Destination release
}
Copy-Item .\license.txt -Destination release
Copy-Item .\README.md -Destination release
Copy-Item .\dist\threeSDumper.gm9 -Destination release\dist
7z a release.7z release
artifacts:
- path: release.7z
name: build