diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3beae09c..c1e2542b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,113 +4,112 @@ variables: releaseExamples: 'controlgallery cpp-multithread datetime drawtext histogram tester timer' jobs: -- job: linux_amd64_shared_ninja - displayName: 'Linux amd64 Shared with Ninja' +- job: windows_386_msvc2015_shared_ninja + displayName: 'Windows 386 MSVC2015 Shared Ninja' pool: - vmImage: 'ubuntu-16.04' + vmImage: 'vs2015-win2012r2' workspace: clean: all steps: - - template: azure-pipelines/setup-python3.yml + - template: azure-pipelines/vs2015-install-python3.yml - template: azure-pipelines/install-latest-meson.yml - - script: | - sudo apt-get install libgtk-3-dev ninja-build - displayName: 'Install Dependencies' + - template: azure-pipelines/windows-install-ninja.yml - template: azure-pipelines/configure.yml parameters: - defaultLibrary: shared - backend: ninja - - template: azure-pipelines/build-ninja.yml - - template: azure-pipelines/darwinunix-artifacts.yml - parameters: - os: linux - arch: amd64 - libtype: shared - libfiles: libui.so.0 - osHeader: ui_unix.h - -- job: linux_amd64_static_ninja - displayName: 'Linux amd64 Static with Ninja' - pool: - vmImage: 'ubuntu-16.04' - workspace: - clean: all - steps: - - template: azure-pipelines/setup-python3.yml - - template: azure-pipelines/install-latest-meson.yml - - script: | - sudo apt-get install libgtk-3-dev ninja-build - displayName: 'Install Dependencies' - - template: azure-pipelines/configure.yml - parameters: - defaultLibrary: static - backend: ninja - - template: azure-pipelines/build-ninja.yml - - template: azure-pipelines/darwinunix-artifacts.yml - parameters: - os: linux - arch: amd64 - libtype: static - libfiles: libui.a - osHeader: ui_unix.h - -# mac { - -# notes: -# [18:36:55] <@jpakkane> Don't use the xcode backend for anything serious, it's a bit crap. - -# TODO macosx10.14 doesn't work; it just uses the default SDK - -- job: darwin_amd64_1014sdk_shared_ninja - displayName: 'Darwin amd64 10.14 SDK Shared with Ninja' - pool: - vmImage: 'macos-10.13' - workspace: - clean: all - steps: - - template: azure-pipelines/setup-python3.yml - - template: azure-pipelines/install-latest-meson.yml - - template: azure-pipelines/darwin-install-ninja.yml - - template: azure-pipelines/configure.yml - parameters: - beforeConfigure: export SDKROOT=$(xcodebuild -version -sdk macosx10.14 Path) + beforeConfigure: call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 defaultLibrary: shared backend: ninja - template: azure-pipelines/build-ninja.yml parameters: - beforeBuild: export SDKROOT=$(xcodebuild -version -sdk macosx10.14 Path) + beforeBuild: call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 - template: azure-pipelines/darwinunix-artifacts.yml parameters: - os: darwin - arch: amd64 + os: windows + arch: 386 + toolchain: msvc2015 libtype: shared - libfiles: libui.A.dylib - osHeader: ui_darwin.h + libfiles: libui.dll libui.exp libui.lib + osHeader: ui_windows.h -- job: darwin_amd64_1014sdk_static_ninja - displayName: 'Darwin amd64 10.14 SDK Static with Ninja' +- job: windows_386_msvc2015_static_ninja + displayName: 'Windows 386 MSVC2015 Static Ninja' pool: - vmImage: 'macos-10.13' + vmImage: 'vs2015-win2012r2' + workspace: + clean: all + steps: + - template: azure-pipelines/vs2015-install-python3.yml + - template: azure-pipelines/install-latest-meson.yml + - template: azure-pipelines/windows-install-ninja.yml + - template: azure-pipelines/configure.yml + parameters: + beforeConfigure: call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 + defaultLibrary: static + backend: ninja + - template: azure-pipelines/build-ninja.yml + parameters: + beforeBuild: call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 + afterBuild: ren build\meson-out\libui.a build\meson-out\libui.lib + - template: azure-pipelines/windows-artifacts.yml + parameters: + os: windows + arch: 386 + toolchain: msvc2015 + libtype: static + libfiles: libui.lib + osHeader: ui_windows.h + +- job: windows_386_msvc2017_shared_ninja + displayName: 'Windows 386 MSVC2017 Shared Ninja' + pool: + vmImage: 'vs2017-win2016' workspace: clean: all steps: - template: azure-pipelines/setup-python3.yml - template: azure-pipelines/install-latest-meson.yml - - template: azure-pipelines/darwin-install-ninja.yml + - template: azure-pipelines/windows-install-ninja.yml - template: azure-pipelines/configure.yml parameters: - beforeConfigure: export SDKROOT=$(xcodebuild -version -sdk macosx10.14 Path) + beforeConfigure: call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86 + defaultLibrary: shared + backend: ninja + - template: azure-pipelines/build-ninja.yml + parameters: + beforeBuild: call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86 + - template: azure-pipelines/windows-artifacts.yml + parameters: + os: windows + arch: 386 + toolchain: msvc2017 + libtype: shared + libfiles: libui.dll libui.exp libui.lib + osHeader: ui_windows.h + +- job: windows_386_msvc2017_static_ninja + displayName: 'Windows 386 MSVC2017 Static Ninja' + pool: + vmImage: 'vs2017-win2016' + workspace: + clean: all + steps: + - template: azure-pipelines/setup-python3.yml + - template: azure-pipelines/install-latest-meson.yml + - template: azure-pipelines/windows-install-ninja.yml + - template: azure-pipelines/configure.yml + parameters: + beforeConfigure: call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86 defaultLibrary: static backend: ninja - template: azure-pipelines/build-ninja.yml parameters: - beforeBuild: export SDKROOT=$(xcodebuild -version -sdk macosx10.14 Path) - - template: azure-pipelines/darwinunix-artifacts.yml + beforeBuild: call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86 + afterBuild: ren build\meson-out\libui.a build\meson-out\libui.lib + - template: azure-pipelines/windows-artifacts.yml parameters: - os: darwin - arch: amd64 + os: windows + arch: 386 + toolchain: msvc2017 libtype: static - libfiles: libui.a - osHeader: ui_darwin.h - -# } + libfiles: libui.lib + osHeader: ui_windows.h diff --git a/azure-pipelines/build-ninja.yml b/azure-pipelines/build-ninja.yml index 2fd591e7..b7f24b54 100644 --- a/azure-pipelines/build-ninja.yml +++ b/azure-pipelines/build-ninja.yml @@ -2,9 +2,11 @@ parameters: beforeBuild: '' + afterBuild: '' steps: - script: | ${{ parameters.beforeBuild }} ninja -C build + ${{ parameters.afterBuild }} displayName: 'Build' diff --git a/azure-pipelines/windows-artifacts.yml b/azure-pipelines/windows-artifacts.yml new file mode 100644 index 00000000..69d63145 --- /dev/null +++ b/azure-pipelines/windows-artifacts.yml @@ -0,0 +1,25 @@ +# 6 april 2019 + +parameters: + os: '' + arch: '' + toolchain: '' + libtype: '' + libfiles: '' + osHeader: '' + +steps: +- powershell: | + echo $PSVersionTable + Set-PSDebug + pushd build\meson-out + Copy-Item @("..\..\ui.h","..\..\${{ parameters.osHeader }}") -Destination . + Compress-Archive $(Build.ArtifactStagingDirectory)\libui-$(Build.SourceBranchName)-${{ parameters.os }}-${{ parameters.arch }}-${{ parameters.toolchain }}-${{ parameters.libtype }}.zip -Path $("${{ parameters.libfiles }}",ui.h,${{ parameters.osHeader}}) + Compress-Archive -Destination $(Build.ArtifactStagingDirectory)\examples-$(Build.SourceBranchName)-${{ parameters.os }}-${{ parameters.arch }}-${{ parameters.libtype }}.zip -Path @("$(releaseExamples)".Split(" ") | % {$_ + ".exe"}) + del ui.h ${{ parameters.osHeader }} + popd + displayName: 'Create Artifacts' +- task: PublishBuildArtifacts@1 + inputs: + pathToPublish: $(Build.ArtifactStagingDirectory) + artifactName: ${{ parameters.os }}-${{ parameters.arch }}-${{ parameters.libtype }} diff --git a/azure-pipelines_linux b/azure-pipelines_linux new file mode 100644 index 00000000..3beae09c --- /dev/null +++ b/azure-pipelines_linux @@ -0,0 +1,116 @@ +# 31 march 2019 + +variables: + releaseExamples: 'controlgallery cpp-multithread datetime drawtext histogram tester timer' + +jobs: +- job: linux_amd64_shared_ninja + displayName: 'Linux amd64 Shared with Ninja' + pool: + vmImage: 'ubuntu-16.04' + workspace: + clean: all + steps: + - template: azure-pipelines/setup-python3.yml + - template: azure-pipelines/install-latest-meson.yml + - script: | + sudo apt-get install libgtk-3-dev ninja-build + displayName: 'Install Dependencies' + - template: azure-pipelines/configure.yml + parameters: + defaultLibrary: shared + backend: ninja + - template: azure-pipelines/build-ninja.yml + - template: azure-pipelines/darwinunix-artifacts.yml + parameters: + os: linux + arch: amd64 + libtype: shared + libfiles: libui.so.0 + osHeader: ui_unix.h + +- job: linux_amd64_static_ninja + displayName: 'Linux amd64 Static with Ninja' + pool: + vmImage: 'ubuntu-16.04' + workspace: + clean: all + steps: + - template: azure-pipelines/setup-python3.yml + - template: azure-pipelines/install-latest-meson.yml + - script: | + sudo apt-get install libgtk-3-dev ninja-build + displayName: 'Install Dependencies' + - template: azure-pipelines/configure.yml + parameters: + defaultLibrary: static + backend: ninja + - template: azure-pipelines/build-ninja.yml + - template: azure-pipelines/darwinunix-artifacts.yml + parameters: + os: linux + arch: amd64 + libtype: static + libfiles: libui.a + osHeader: ui_unix.h + +# mac { + +# notes: +# [18:36:55] <@jpakkane> Don't use the xcode backend for anything serious, it's a bit crap. + +# TODO macosx10.14 doesn't work; it just uses the default SDK + +- job: darwin_amd64_1014sdk_shared_ninja + displayName: 'Darwin amd64 10.14 SDK Shared with Ninja' + pool: + vmImage: 'macos-10.13' + workspace: + clean: all + steps: + - template: azure-pipelines/setup-python3.yml + - template: azure-pipelines/install-latest-meson.yml + - template: azure-pipelines/darwin-install-ninja.yml + - template: azure-pipelines/configure.yml + parameters: + beforeConfigure: export SDKROOT=$(xcodebuild -version -sdk macosx10.14 Path) + defaultLibrary: shared + backend: ninja + - template: azure-pipelines/build-ninja.yml + parameters: + beforeBuild: export SDKROOT=$(xcodebuild -version -sdk macosx10.14 Path) + - template: azure-pipelines/darwinunix-artifacts.yml + parameters: + os: darwin + arch: amd64 + libtype: shared + libfiles: libui.A.dylib + osHeader: ui_darwin.h + +- job: darwin_amd64_1014sdk_static_ninja + displayName: 'Darwin amd64 10.14 SDK Static with Ninja' + pool: + vmImage: 'macos-10.13' + workspace: + clean: all + steps: + - template: azure-pipelines/setup-python3.yml + - template: azure-pipelines/install-latest-meson.yml + - template: azure-pipelines/darwin-install-ninja.yml + - template: azure-pipelines/configure.yml + parameters: + beforeConfigure: export SDKROOT=$(xcodebuild -version -sdk macosx10.14 Path) + defaultLibrary: static + backend: ninja + - template: azure-pipelines/build-ninja.yml + parameters: + beforeBuild: export SDKROOT=$(xcodebuild -version -sdk macosx10.14 Path) + - template: azure-pipelines/darwinunix-artifacts.yml + parameters: + os: darwin + arch: amd64 + libtype: static + libfiles: libui.a + osHeader: ui_darwin.h + +# }