-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Win32 Build Server configuration
Joseph Lenox edited this page Mar 2, 2017
·
2 revisions
Textual version of the YAML for AppVeyor (used for Win32 builds), minus the deployment key for Bintray. Important here because of the PowerShell scripts used to build Slic3r and then package it.
version: 1.3.0-{branch}-{build}
image: WMF 5
environment:
LDLOADLIBS: -lstdc++
SLIC3R_STATIC: 1
install:
- ps: "mkdir C:\\projects\\slic3r\\FreeGLUT\nif (!(Test-Path \"C:\\users\\appveyor\\freeglut.7z\")) \n{\nwget \"https://bintray.com/lordofhyphens/Slic3r/download_file?file_path=freeglut-mingw-3.0.0.win64.7z\" -o C:\\users\\appveyor\\freeglut.7z\n}\ncmd /c \"7z x C:\\Users\\appveyor\\freeglut.7z -oC:\\projects\\slic3r\\FreeGLUT\"\n\nif (!(Test-Path \"C:\\users\\appveyor\\strawberry.msi\")) {\nwget \"http://strawberryperl.com/download/5.18.4.1/strawberry-perl-5.18.4.1-64bit.msi\" -o \"C:\\users\\appveyor\\strawberry.msi\" | Write-Output\ncmd /c \"msiexec.exe /quiet /qn /norestart /i C:\\Users\\appveyor\\strawberry.msi\"\n}\nrm -r C:\\min* -Force\nrm -r C:\\msys* -Force\nrm -r C:\\cygwin* -Force\nrm -r C:\\Perl -Force\n$PERLDIR = 'C:\\Strawberry'\n$env:Path = \"C:\\Strawberry\\c\\bin;C:\\Strawberry\\perl\\bin;C:\\Strawberry\\perl\\vendor\\bin;\" + $env:Path\nif(Test-Path -Path 'C:\\Strawberry' ) {\ncopy C:\\Strawberry\\c\\bin\\gcc.exe C:\\Strawberry\\c\\bin\\cc.exe\ncmd /c mklink /D C:\\Perl C:\\Strawberry\\perl\nmkdir C:\\dev\nif (!(Test-Path \"C:\\users\\appveyor\\boost.1.59.0.7z\")) {\nAdd-AppveyorCompilationMessage -Message \"Re-installing Boost\"\ncmd /c mklink /D C:\\dev\\boost_1_59_0 C:\\Libraries\\boost_1_59_0\ncd C:\\dev\\boost_1_59_0\n./bootstrap.bat mingw\n./b2 --clean-all\n./b2 toolset=gcc link=static runtime-link=static variant=release\n} else {\nAdd-AppveyorCompilationMessage -Message \"Extracting cached archive.\"\ncmd /c \"7z x C:\\Users\\appveyor\\boost.1.59.0.7z -oC:\\dev\"\n}\nmkdir C:\\dev\\CitrusPerl\ncmd /C mklink /D C:\\dev\\CitrusPerl\\mingw32 C:\\Strawberry\\c\ncd C:\\projects\\slic3r\ncpanm ExtUtils::Typemaps::Basic\ncpanm ExtUtils::Typemaps::Default\ncpanm local::lib\nAdd-AppveyorCompilationMessage -Message \"Finished install script.\"\nrm -r 'C:\\Program Files\\Git\\usr\\bin' -Force\n} else {\nAdd-AppveyorCompilationMessage -Message \"No strawberry perl!\"\n}"
cache:
- C:\Users\appveyor\boost.1.59.0.7z
- C:\Users\appveyor\local-lib.7z
- C:\Strawberry\perl\site
- C:\Users\appveyor\freeglut.7z
build_script:
- ps: "if (!(Test-Path \"C:\\users\\appveyor\\local-lib.7z\")) {\nwget \"https://bintray.com/lordofhyphens/Slic3r/download_file?file_path=slic3r-perl-dependencies-5.18.0-win-x64.7z\" -o \"C:\\users\\appveyor\\local-lib.7z\" | Write-Output\n}\nif (Test-Path \"C:\\users\\appveyor\\local-lib.7z\") {\ncmd /c \"7z x C:\\Users\\appveyor\\local-lib.7z -oC:\\projects\\slic3r\" -y | Write-Output\n}\n\nif (Test-Path \"C:\\Users\\appveyor\\boost.1.59.0.7z\") {\n$env:Path = \"C:\\Strawberry\\c\\bin;C:\\Strawberry\\perl\\bin;\" + $env:Path\n rm -r 'C:\\Program Files (x86)\\Microsoft Vis*\\bin' -Force\n Add-AppveyorCompilationMessage -Message \"Building Slic3r XS\"\n perl Build.pl | Write-Output\n Add-AppveyorCompilationMessage -Message \"Building GUI\"\n perl Build.pl --gui \n Add-AppveyorCompilationMessage -Message \"Making ZIP package\"\n cd package/win\n ./compile_wrapper.ps1 518 | Write-Output\n ./package_win32.ps1 518| Write-Output\n}\nif (!(Test-Path \"C:\\Users\\appveyor\\boost.1.59.0.7z\")) {\ncmd /c \"7z a C:\\users\\appveyor\\boost.1.59.0.7z C:\\dev\\boost_1_59_0 -xr!*.o -xr!*lib*-msvc-*\"\n}\nif (!(Test-Path C:\\project\\slic3r\\slic3r.par)) {\nAdd-AppveyorCompilationMessage -Message \"Failed to package!\" -Category Error\nreturn 1\n}"
test: off
artifacts:
- path: .\slic3r*zip
name: slic3r-dev
before_deploy:
- ps: >-
[Environment]::SetEnvironmentVariable("packagevar", "Slic3r_Branches", "User")
If ($env:APPVEYOR_REPO_BRANCH -eq "master") { $env:packagevar = 'slic3r_dev' } else { $env:packagevar = 'Slic3r_Branches' }
[Environment]::SetEnvironmentVariable("versionname", "1.3.0-dev-$env:APPVEYOR_REPO_COMMIT", "User")
deploy:
- provider: BinTray
username: lordofhyphens
api_key:
secure: <redacted>
subject: lordofhyphens
repo: Slic3r
package: $(packagevar)
publish: true
override: true
on_success:
- ps:
on_failure:
- ps: