fix errors building on Qt 6 #44
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate Bundles and Release | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- 'v*' | |
paths-ignore: | |
- 'docs/**' | |
- 'README.md' | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- 'docs/**' | |
- 'README.md' | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: pwsh | |
jobs: | |
Build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- windows-latest | |
- ubuntu-latest | |
- macos-13 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Get DiffScope Bridge target | |
run: | | |
$target = (Get-Content scripts/setup/modules.json | ConvertFrom-Json).'diffscope-bridge' | |
Write-Output DIFFSCOPE_BRIDGE_REPO=$($target.repository) >> $env:GITHUB_ENV | |
Write-Output DIFFSCOPE_BRIDGE_REF=$($target.ref) >> $env:GITHUB_ENV | |
- name: Restore DiffScope Bridge from cache | |
id: cache_diffscope_bridge | |
uses: actions/cache/restore@v4 | |
with: | |
path: scripts/setup/diffscope-bridge | |
key: ${{ runner.os }}-diffscope-bridge-${{ env.DIFFSCOPE_BRIDGE_REPO }}-${{ env.DIFFSCOPE_BRIDGE_REF }} | |
- name: Checkout DiffScope Bridge | |
uses: actions/checkout@v4 | |
if: steps.cache_diffscope_bridge.outputs.cache-hit != 'true' | |
with: | |
repository: ${{ env.DIFFSCOPE_BRIDGE_REPO }} | |
ref: ${{ env.DIFFSCOPE_BRIDGE_REF }} | |
path: scripts/setup/diffscope-bridge | |
submodules: recursive | |
- name: Initialize building environment | |
uses: ./.github/actions/init-build | |
- name: Build DiffScope | |
run: | | |
cmake -B build -G Ninja ` | |
-DCMAKE_BUILD_TYPE=RelWithDebInfo ` | |
-DCMAKE_TOOLCHAIN_FILE="${{ env.VCPKG_ROOT_DIR }}/scripts/buildsystems/vcpkg.cmake" ` | |
-DVCPKG_APPLOCAL_DEPS:BOOL=FALSE ` | |
-DQMSETUP_APPLOCAL_DEPS_PATHS_DEBUG="${{ env.VCPKG_ROOT_DIR }}/installed/${{ env.VCPKG_TRIPLET }}/debug/${{ matrix.os == 'windows-latest' && 'bin' || 'lib' }}" ` | |
-DQMSETUP_APPLOCAL_DEPS_PATHS_RELEASE="${{ env.VCPKG_ROOT_DIR }}/installed/${{ env.VCPKG_TRIPLET }}/${{ matrix.os == 'windows-latest' && 'bin' || 'lib' }}" ` | |
-DCK_ENABLE_CONSOLE:BOOL=FALSE ` | |
-DCK_WIN_APPLOCAL_DEPS:BOOL=TRUE ` | |
-DTALCS_DEVICE_ENABLE_ASIO:BOOL=ON ` | |
-DTALCS_ASIOSDK_DIR=${{ env.ASIOSDK_DIR }} ` | |
-DTALCS_REMOTE:BOOL=ON ` | |
-DTALCS_DSPX:BOOL=ON ` | |
-DCMAKE_INSTALL_PREFIX=installed | |
cmake --build build --target all | |
cmake --build build --target install | |
Write-Output DIFFSCOPE_INSTALLED_DIR=$(Resolve-Path -Path installed) >> $env:GITHUB_ENV | |
- name: Build DiffScope Bridge | |
if: steps.cache_diffscope_bridge.outputs.cache-hit != 'true' | |
run: | | |
Set-Location scripts/setup/diffscope-bridge | |
cmake -B build -G Ninja ` | |
-DCMAKE_BUILD_TYPE=RelWithDebInfo ` | |
-DCMAKE_TOOLCHAIN_FILE="${{ env.VCPKG_ROOT_DIR }}/scripts/buildsystems/vcpkg.cmake" ` | |
-DVCPKG_INSTALLED_DIR="${{ env.VCPKG_ROOT_DIR }}/bridge_installed" ` | |
-DVCPKG_MANIFEST_MODE:BOOL=OFF ` | |
-DVCPKG_TARGET_TRIPLET=${{ env.VCPKG_TRIPLET_STATIC }} | |
cmake --build build --target all | |
- name: Store DiffScope Bridge artefacts directory | |
run: | | |
Write-Output DIFFSCOPE_BRIDGE_ARTEFACTS_DIR=$(Resolve-Path -Path scripts/setup/diffscope-bridge/build/DiffScopeBridge_artefacts/RelWithDebInfo) >> $env:GITHUB_ENV | |
- name: Save DiffScope Bridge to cache | |
uses: actions/cache/save@v4 | |
with: | |
path: scripts/setup/diffscope-bridge | |
key: ${{ runner.os }}-diffscope-bridge-${{ env.DIFFSCOPE_BRIDGE_REPO }}-${{ env.DIFFSCOPE_BRIDGE_REF }} | |
- name: Set binary name | |
run: | | |
Write-Output BINARY_NAME=diffscope-$('${{ env.VCPKG_TRIPLET }}'.replace('osx', 'macos'))-${{ github.ref_type == 'tag' && github.ref_name || github.sha }} >> $env:GITHUB_ENV | |
- name: Collect symbol files | |
uses: ./.github/actions/symbol-file | |
- name: Create package for release | |
uses: ./.github/actions/pack | |
- name: Upload package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.BINARY_NAME }} | |
path: ${{ env.PACKAGE_PATH }} | |
- name: Upload symbol files | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.BINARY_NAME }}-symbol_files | |
path: ${{ env.SYMBOL_FILES_PATH }} | |
Release: | |
runs-on: ubuntu-latest | |
needs: Build | |
if: github.event_name == 'push' && github.ref_type == 'tag' && startsWith(github.ref_name , 'v') | |
steps: | |
- name: Get artifacts | |
uses: actions/download-artifact@v4 | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
draft: true | |
files: | | |
diffscope-*/* |