diff --git a/.gitignore b/.gitignore index 69b7d67015..f7bb8bb9fc 100644 --- a/.gitignore +++ b/.gitignore @@ -173,6 +173,8 @@ FakesAssemblies/ # This exclusion needs to be added at the end, after any previous # reference to "build" !building.adoc +# Same thing to allow "build"-files in the .woodpecker directory to be tracked +!.woodpecker/*build* # squish test test/gui/config.ini diff --git a/.woodpecker/build.ps1 b/.woodpecker/build.ps1 new file mode 100644 index 0000000000..fdf0ed98bc --- /dev/null +++ b/.woodpecker/build.ps1 @@ -0,0 +1,22 @@ +git config --system --add safe.directory * +New-Item -itemtype Junction -path $HOME/craft -value $env:CI_WORKSPACE/woodpecker_craft +New-Item -Path $HOME/cache -ItemType Directory -ErrorAction SilentlyContinue +.github/workflows/.craft.ps1 --setup +.github/workflows/.craft.ps1 -c --unshelve .craft.shelf +.github/workflows/.craft.ps1 -c craft +New-Item -ItemType Directory binaries +.github/workflows/.craft.ps1 -c --set "forceAsserts$($env:CI_PIPELINE_EVENT -ne "tag")" opencloud/opencloud-desktop +.github/workflows/.craft.ps1 -c --set "srcDir=$env:CI_WORKSPACE" opencloud/opencloud-desktop +.github/workflows/.craft.ps1 -c --set "buildNumber=$env:CI_PIPELINE_NUMBER" opencloud/opencloud-desktop +.github/workflows/.craft.ps1 -c dev-utils/nsis +.github/workflows/.craft.ps1 -c --install-deps opencloud/opencloud-desktop +.github/workflows/.craft.ps1 -c --shelve .craft.shelf +Copy-Item .craft.shelf binaries/craft.shelf +.github/workflows/.craft.ps1 -c --no-cache opencloud/opencloud-desktop +.github/workflows/.craft.ps1 -c --no-cache --test opencloud/opencloud-desktop +.github/workflows/.craft.ps1 -c --no-cache --package opencloud/opencloud-desktop +.github/workflows/.craft.ps1 -c --no-cache --package --options "[Packager]PackageType=AppxPackager" --options "[Packager]Destination=$env:CI_WORKSPACE/appx/" opencloud/opencloud-desktop +Copy-Item ${HOME}/craft/binaries/* binaries/ +Copy-Item appx/* binaries/ +dir binaries +return 0 diff --git a/.woodpecker/build_test.yaml b/.woodpecker/build_test.yaml new file mode 100644 index 0000000000..1145f7cfa7 --- /dev/null +++ b/.woodpecker/build_test.yaml @@ -0,0 +1,45 @@ +--- +labels: + platform: windows/amd64 + backend: docker + +when: + - branch: + - main + - stable-* + event: + - push + - manual + - event: pull_request + - event: tag + +clone: + - name: clone + image: opencloudeu/woodpecker-windows-git-plugin:v2 + +steps: + - name: Clone Craftmaster + image: opencloudeu/woodpecker-windows-git:v2 + commands: + - git clone --depth=1 https://invent.kde.org/kde/craftmaster.git ` + $$env:CI_WORKSPACE/woodpecker_craft/CraftMaster/CraftMaster + + - name: build + image: opencloudeu/woodpecker-windows-desktop-build-tools:v1 + environment: + CRAFT_TARGET: windows-cl-msvc2022-x86_64 + CRAFT_PACKAGE_SYMBOLS: true + entrypoint: [ + "pwsh", + "-noprofile", + "-noninteractive", + "-command", + "Set-StrictMode -Version Latest; ` + $ErrorActionPreference = 'Stop'; ` + $ProgressPreference = 'SilentlyContinue'; ` + $PSNativeCommandUseErrorActionPreference = $true; ` + echo $([System.Text.Encoding]::UTF8.GetString(` + [System.Convert]::FromBase64String($Env:CI_SCRIPT)` + )) | iex"] + commands: + - cd $$env:CI_WORKSPACE ; .woodpecker/build.ps1 diff --git a/test/opencloud_add_test.cmake b/test/opencloud_add_test.cmake index 7b33361632..ab5d1bf514 100644 --- a/test/opencloud_add_test.cmake +++ b/test/opencloud_add_test.cmake @@ -22,7 +22,7 @@ function(opencloud_add_test test_class) add_dependencies(${_test_target_name} opencloud) target_include_directories(${_test_target_name} PRIVATE "${CMAKE_SOURCE_DIR}/test/") - if (UNIX AND NOT APPLE) + if ((UNIX AND NOT APPLE) OR WIN32) set_property(TEST ${_test_target_name} PROPERTY ENVIRONMENT "QT_QPA_PLATFORM=offscreen") endif() endfunction()