From cfe22f13bb653248fc417eae150ddfb4053d8cc7 Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Mon, 22 Jun 2020 16:50:41 +0200 Subject: [PATCH] Add deploy of Windows binaries to www2.graphviz.org Final commit that resolves https://gitlab.com/graphviz/graphviz/-/issues/1713. --- .gitlab-ci.yml | 28 ++++++++++++++++++++++++---- CHANGELOG.md | 1 + 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c0bb80617..d966e6599 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -73,6 +73,7 @@ portable-source: cd build; cmake -G "$env:generator" -A $Env:platform ..; cmake --build . --config $env:configuration; + cd ..; } elseif($env:build_system -eq "msbuild") { msbuild /p:Configuration=$env:configuration @@ -81,7 +82,9 @@ portable-source: - >- if($env:configuration -eq "Release") { if($env:build_system -eq "cmake") { + cd build; C:\"Program Files"\CMake\bin\cpack + cd ..; } elseif($env:build_system -eq "msbuild") { rm Release\Graphviz\bin\*.lastcodeanalysissucceeded; @@ -93,6 +96,7 @@ portable-source: # Test - >- if($env:build_system -eq "cmake" -and $env:configuration -eq "Release") { + cd build; mv Graphviz-*.exe Graphviz-install.exe; # Install using installer and add bin directory to path. # Piping the output of the installer to Out-Null, makes the script wait @@ -102,6 +106,7 @@ portable-source: $env:Path += ";" + $env:graphviz_install_dir + "\bin" dot -c; ctest -C $env:configuration; + cd ..; } elseif($env:build_system -eq "msbuild") { # Append build destination to the PATH, configure dot and execute regression tests @@ -110,14 +115,26 @@ portable-source: dot -c; cd tests\regression_tests; ./regression_tests.ps1; + cd ..\..; + } + # Create artifacts to archive + - $ID = "windows" + - $VERSION_ID = "10" + - $COLLECTION = $( cat COLLECTION ) + - $DIR = "Packages\${COLLECTION}\${ID}\${VERSION_ID}\$env:build_system\$env:configuration\$Env:platform" + - mkdir -p $DIR + - >- + if($env:build_system -eq "cmake") { + mv "build\*.exe" $DIR; + } else { + Compress-Archive -Path "$env:configuration\*" -DestinationPath "$DIR\graphviz.zip"; } artifacts: when: on_success expire_in: 1 week paths: - - Release - - Debug - - build/Graphviz-install.exe + - Packages/*/*/*/*/*/*/*.exe + - Packages/*/*/*/*/*/*/*.zip tags: - windows @@ -240,12 +257,14 @@ windows-cmake-x64-debug-build: windows-msbuild-Win32-release-build: <<: *windows_build_definition before_script: + - $Env:platform = "Win32" - $Env:configuration = "Release" - $Env:build_system = "msbuild" windows-msbuild-Win32-debug-build: <<: *windows_build_definition before_script: + - $Env:platform = "Win32" - $Env:configuration = "Debug" - $Env:build_system = "msbuild" @@ -260,6 +279,7 @@ meta-data: artifacts: paths: - configuration-*.html + ubuntu18-04-test: <<: *test_definition needs: @@ -395,7 +415,7 @@ deployment: - chmod -R o-rwx Packages - chmod -R g-wx Packages - chmod -R g+X Packages - - ssh "$DEPLOY_USER"@"$DEPLOY_HOST" 'rm -rf Packages/'"$COLLECTION"'/{fedora,centos,ubuntu}' + - ssh "$DEPLOY_USER"@"$DEPLOY_HOST" 'rm -rf Packages/'"$COLLECTION"'/{fedora,centos,ubuntu,windows}' - scp -r Packages/* "$DEPLOY_USER"@"$DEPLOY_HOST"':'Packages/ - ssh "$DEPLOY_USER"@"$DEPLOY_HOST" 'for i in Packages/'"$COLLECTION"'/{fedora,centos}/*/{source,os/*,debug/*}; do createrepo $i; done' - scp graphviz-fedora.repo graphviz-centos.repo "$DEPLOY_USER"@"$DEPLOY_HOST"':'Packages/ diff --git a/CHANGELOG.md b/CHANGELOG.md index acf9f68b7..f8cafd097 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Windows binaries available at https://www2.graphviz.org/Packages/ instead of https://ci.appveyor.com/project/ellson/graphviz-pl238 +- Retarget Windows builds to Visual Studio 2019 and toolset v142 ### Fixed - Released Ubuntu packages does not contain language bindings for Python3 #1737 -- 2.40.0