diff --git a/.ci/compile.sh b/.ci/compile.sh index a6bd6475..581447e5 100755 --- a/.ci/compile.sh +++ b/.ci/compile.sh @@ -127,7 +127,7 @@ fi # Add cmake --build flags buildflags=(--config "$BUILDTYPE") if [[ $PARALLEL_COUNT ]]; then - if [[ $(cmake --build /not_a_dir --parallel |& head -1) =~ parallel ]]; then + if [[ $(cmake --build /not_a_dir --parallel 2>&1 | head -1) =~ parallel ]]; then # workaround for bionic having an old cmake echo "this version of cmake does not support --parallel, using native build tool -j instead" buildflags+=(-- -j "$PARALLEL_COUNT") @@ -171,7 +171,7 @@ fi if [[ $MAKE_TEST ]]; then echo "::group::Run tests" - ctest -C "$BUILDTYPE" + ctest -C "$BUILDTYPE" --output-on-failure echo "::endgroup::" fi diff --git a/.github/workflows/desktop-build.yml b/.github/workflows/desktop-build.yml index d20e9e48..2355dc74 100644 --- a/.github/workflows/desktop-build.yml +++ b/.github/workflows/desktop-build.yml @@ -23,7 +23,6 @@ jobs: outputs: tag: ${{steps.configure.outputs.tag}} sha: ${{steps.configure.outputs.sha}} - upload_url: ${{steps.create_release.outputs.upload_url}} steps: - name: Cancel previous runs @@ -64,15 +63,19 @@ jobs: - name: Create release if: steps.configure.outputs.tag != null id: create_release - uses: actions/create-release@v1 + shell: bash env: - GITHUB_TOKEN: ${{github.token}} - with: - tag_name: ${{github.ref}} + GH_TOKEN: ${{github.token}} + tag_name: ${{steps.configure.outputs.tag}} release_name: ${{steps.prepare.outputs.title}} body_path: ${{steps.prepare.outputs.body_path}} - draft: true - prerelease: ${{steps.prepare.outputs.is_beta == 'yes'}} + prerelease: ${{steps.prepare.outputs.is_beta}} + run: | + if [[ $prerelease == yes ]]; then + args="--prerelease" + fi + gh release create "$tag_name" --draft --verify-tag $args \ + --title "$release_name" --notes-file "$body_path" build-linux: strategy: @@ -156,7 +159,7 @@ jobs: RUN --server --debug --test --ccache "$CCACHE_SIZE" --parallel 2 - name: Build release package - id: package + id: build if: matrix.package != 'skip' shell: bash env: @@ -175,19 +178,18 @@ jobs: uses: actions/upload-artifact@v3 with: name: ${{matrix.distro}}-package - path: ${{steps.package.outputs.path}} + path: ${{steps.build.outputs.path}} if-no-files-found: error - name: Upload to release if: matrix.package != 'skip' && needs.configure.outputs.tag != null - uses: actions/upload-release-asset@v1 + shell: bash env: - GITHUB_TOKEN: ${{github.token}} - with: - upload_url: ${{needs.configure.outputs.upload_url}} - asset_path: ${{steps.package.outputs.path}} - asset_name: ${{steps.package.outputs.name}} - asset_content_type: application/octet-stream + GH_TOKEN: ${{github.token}} + tag_name: ${{needs.configure.outputs.tag}} + asset_path: ${{steps.build.outputs.path}} + asset_name: ${{steps.build.outputs.name}} + run: gh release upload "$tag_name" "$asset_path#$asset_name" build-macos: strategy: @@ -196,15 +198,17 @@ jobs: include: - target: Debug # tests only os: macos-latest - xcode: 12.5.1 - qt_version: 6 + xcode: 14.2 + qt_version: 6.* + qt_modules: "qtmultimedia qtwebsockets" type: Debug do_tests: 1 - target: 10.15_Catalina os: macos-11 xcode: 11.7 # allows using macOS 10.15 SDK - qt_version: 6 + qt_version: 6.2.* # LTS (is compatible with 10.14 and 10.15) + qt_modules: "qtmultimedia qtwebsockets" type: Release do_tests: 1 make_package: 1 @@ -212,7 +216,7 @@ jobs: - target: 11_Big_Sur os: macos-11 xcode: 12.5.1 - qt_version: 6 + qt_version: homebrew type: Release do_tests: 1 make_package: 1 @@ -220,7 +224,7 @@ jobs: # - target: 12_Monterey # os: macos-12 # xcode: 13.3 -# qt_version: 6 +# qt_version: homebrew # type: Release # do_tests: 1 # make_package: 1 @@ -242,11 +246,24 @@ jobs: # cmake cannot find the mysql connector # neither of these works: mariadb-connector-c mysql-connector-c++ env: - qt_version: 'qt@${{matrix.qt_version}}' + install_qt: ${{matrix.qt_version}} run: | brew update brew install protobuf - brew install "$qt_version" --force-bottle + if [[ $install_qt == homebrew ]]; then + brew install qt --force-bottle + else # for some reason the tests fail with the action installed qt? + brew install googletest + fi + + - name: Install Qt ${{matrix.qt_version}} for ${{matrix.target}} + if: matrix.qt_version != 'homebrew' + uses: jurplel/install-qt-action@v3 + with: + cache: true + setup-python: false + version: ${{matrix.qt_version}} + modules: ${{matrix.qt_modules}} - name: Build on Xcode ${{matrix.xcode}} shell: bash @@ -256,8 +273,6 @@ jobs: MAKE_TEST: '${{matrix.do_tests}}' MAKE_PACKAGE: '${{matrix.make_package}}' PACKAGE_SUFFIX: '-macOS-${{matrix.target}}' - # set QTDIR to find qt5, qt6 can be found without this - QTDIR: '/usr/local/opt/qt5' # Mac machines actually have 3 cores run: .ci/compile.sh --server --parallel 3 @@ -270,15 +285,14 @@ jobs: if-no-files-found: error - name: Upload to release - if: matrix.make_package && needs.configure.outputs.tag != null - uses: actions/upload-release-asset@v1 + if: matrix.package != 'skip' && needs.configure.outputs.tag != null + shell: bash env: - GITHUB_TOKEN: ${{github.token}} - with: - upload_url: ${{needs.configure.outputs.upload_url}} + GH_TOKEN: ${{github.token}} + tag_name: ${{needs.configure.outputs.tag}} asset_path: ${{steps.build.outputs.path}} asset_name: ${{steps.build.outputs.name}} - asset_content_type: application/octet-stream + run: gh release upload "$tag_name" "$asset_path#$asset_name" build-windows: strategy: @@ -363,12 +377,11 @@ jobs: if-no-files-found: error - name: Upload to release - if: needs.configure.outputs.tag != null - uses: actions/upload-release-asset@v1 + if: matrix.package != 'skip' && needs.configure.outputs.tag != null + shell: bash env: - GITHUB_TOKEN: ${{github.token}} - with: - upload_url: ${{needs.configure.outputs.upload_url}} + GH_TOKEN: ${{github.token}} + tag_name: ${{needs.configure.outputs.tag}} asset_path: ${{steps.build.outputs.path}} asset_name: ${{steps.build.outputs.name}} - asset_content_type: application/octet-stream + run: gh release upload "$tag_name" "$asset_path#$asset_name"