diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index ce47f323..c5bf74b3 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -63,7 +63,7 @@ jobs: - name: Build pull request version run: | cmake -S . -B ./build -DCMAKE_BUILD_TYPE=Debug ${{ matrix.cmakeConfig }} - cmake --build ./build --config Debug --target ${{ matrix.cmakeTarget }} --parallel 3 + cmake --build ./build --config Debug --target ${{ matrix.target }} --parallel 3 - name: Run Tests run: | diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9d3ae240..309048c2 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,411 +1 @@ # ShortCircuit XT PR and Main Pipeline - -trigger: - - main - -variables: - - group: mac-signing - -jobs: - - job: BuildCodeQuality - condition: eq(variables['Build.Reason'], 'PullRequest') - pool: - vmImage: 'ubuntu-20.04' - - steps: - - checkout: self - fetchDepth: 1 - # submodules: recursive # can't do submodules here b'cuz depth=1 fails with Github - - - bash: | - set -e - mkdir ignore - pushd ignore - git clone https://github.com/jidicula/clang-format-action - popd - ./ignore/clang-format-action/check.sh 17 src llvm - ./ignore/clang-format-action/check.sh 17 src-ui llvm - ./ignore/clang-format-action/check.sh 17 tests llvm - ./ignore/clang-format-action/check.sh 17 clients llvm - - displayName: Do Codequal - - - job: PRBuild - condition: eq(variables['Build.Reason'], 'PullRequest') - strategy: - matrix: - mac-x86: - imageName: 'macos-latest' - cmakeArgs: -D"CMAKE_OSX_ARCHITECTURES=x86_64" - scxtTarget: scxt_plugin_Standalone - xcodeVersion: 14.2 - isMac: True - mac-arm: - imageName: 'macos-latest' - cmakeArgs: -D"CMAKE_OSX_ARCHITECTURES=arm64" - scxtTarget: scxt_plugin_Standalone - xcodeVersion: 14.2 - isMac: True - mac-x86-clap-first: - imageName: 'macos-latest' - cmakeArgs: -D"CMAKE_OSX_ARCHITECTURES=x86_64" -DSCXT_JUCE_CLASSIC_STYLE=FALSE - isMac: True - xcodeVersion: 14.2 - scxtTarget: scxt_clapfirst_all - win-clang: - imageName: 'windows-latest' - cmakeArgs: -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang - scxtTarget: scxt_plugin_Standalone - isWindows: True - win-msvc: - imageName: 'windows-latest' - cmakeArgs: -A x64 - scxtTarget: scxt_plugin_Standalone - isWindowsMSVC: True - win-msvc-clap-first: - imageName: 'windows-latest' - cmakeArgs: -A x64 -DSCXT_JUCE_CLASSIC_STYLE=FALSE - isWindowsMSVC: True - scxtTarget: scxt_clapfirst_all - lin: - imageName: 'ubuntu-latest' - isLinux: True - scxtTarget: scxt_plugin_Standalone - cmakeArgs: - #lin-gcc13: - # imageName: 'ubuntu-latest' - # isLinux: True - # scxtTarget: scxt_plugin_Standalone - # cmakeArgs: -DCMAKE_CXX_COMPILER=g++-13 -DCMAKE_C_COMPILER=gcc-13 - lin-clap-first: - imageName: 'ubuntu-latest' - isLinux: True - cmakeArgs: -DSCXT_JUCE_CLASSIC_STYLE=FALSE - scxtTarget: scxt_clapfirst_all - - pool: - vmImage: $(imageName) - - steps: - - checkout: self - fetchDepth: 1 - - - bash: | - set -e - - sudo apt-get update - - sudo apt-get install -y \ - devscripts \ - libxcb-cursor-dev \ - libxcb-keysyms1-dev \ - libxcb-util-dev \ - libxkbcommon-dev \ - libxkbcommon-x11-dev \ - ninja-build \ - xcb \ - libgtk-3-dev \ - libwebkit2gtk-4.0 \ - libwebkit2gtk-4.0-dev \ - libcurl4-openssl-dev \ - alsa \ - alsa-tools \ - libasound2-dev \ - libjack-dev \ - libfreetype6-dev \ - libxinerama-dev \ - libxcb-xinerama0 \ - libxinerama1 \ - x11proto-xinerama-dev \ - libxrandr-dev \ - libgl1-mesa-dev \ - libxcursor-dev \ - libxcursor1 \ - libxcb-cursor-dev \ - libxcb-cursor0 - - condition: variables.isLinux - displayName: linux - run apt-get - - - - bash: | - git submodule update --depth 1 --init --recursive - displayName: Get SubModules - - - bash: | - sudo xcode-select -s /Applications/Xcode_$(xcodeVersion).app - displayName: Select XCode - condition: variables.isMac - - - bash: | - echo cmake -Bbuild -DCMAKE_BUILD_TYPE=Debug $(cmakeArgs) - cmake -Bbuild -DAZURE_PIPELINE=1 -DCMAKE_BUILD_TYPE=Debug -DSCXT_COPY_PLUGIN_AFTER_BUILD=FALSE $(cmakeArgs) - displayName: Run CMake (Debug) - - - bash: | - cmake --build build --config Debug --target $(scxtTarget) --parallel 4 - displayName: Build SCXT and scxt-test - - - bash: | - cmake --build build --config Debug --target scxt-test --parallel 4 - ./build/tests/scxt-test - displayName: Run Tests SCXT - condition: variables.isLinux - - - job: ReleaseBuild - condition: not(eq(variables['Build.Reason'], 'PullRequest')) - strategy: - matrix: - mac: - imageName: 'macos-latest' - cmakeArgs: -D"CMAKE_OSX_ARCHITECTURES=arm64;x86_64" - xcodeVersion: 14.2 - isMac: True - win: - imageName: 'windows-latest' - cmakeArgs: -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang - isWindows: True - lin: - imageName: 'ubuntu-latest' - isLinux: True - cmakeArgs: - - - pool: - vmImage: $(imageName) - - steps: - - checkout: self - fetchDepth: 5 - # submodules: recursive # can't do submodules here b'cuz depth=1 fails with Github - - - bash: | - set -e - - sudo apt-get update - - sudo apt-get install -y \ - devscripts \ - libxcb-cursor-dev \ - libxcb-keysyms1-dev \ - libxcb-util-dev \ - libxkbcommon-dev \ - libxkbcommon-x11-dev \ - ninja-build \ - xcb \ - libgtk-3-dev \ - libwebkit2gtk-4.0 \ - libwebkit2gtk-4.0-dev \ - libcurl4-openssl-dev \ - alsa \ - alsa-tools \ - libasound2-dev \ - libjack-dev \ - libfreetype6-dev \ - libxinerama-dev \ - libxcb-xinerama0 \ - libxinerama1 \ - x11proto-xinerama-dev \ - libxrandr-dev \ - libgl1-mesa-dev \ - libxcursor-dev \ - libxcursor1 \ - libxcb-cursor-dev \ - libxcb-cursor0 - - condition: variables.isLinux - displayName: linux - run apt-get - - - - task: InstallAppleCertificate@2 - inputs: - certSecureFile: 'dev_id.p12' - certPwd: '$(MAC_EXPORTED_CERT_PW)' - condition: variables.isMac - - - task: InstallAppleCertificate@2 - inputs: - certSecureFile: 'inst_id.p12' - certPwd: '$(MAC_EXPORTED_CERT_PW)' - condition: variables.isMac - - - bash: | - git submodule update --depth 1 --init --recursive - displayName: Get SubModules - - - bash: | - sudo xcode-select -s /Applications/Xcode_$(xcodeVersion).app - displayName: Select XCode - condition: variables.isMac - - - bash: | - cmake -Bbuild -DAZURE_PIPELINE=1 -DCMAKE_BUILD_TYPE=Release -DSCXT_COPY_PLUGIN_AFTER_BUILD=FALSE $(cmakeArgs) - displayName: Run CMake (Release) - - - bash: | - cmake --build build --config Release --target shortcircuit-installer --parallel 4 - displayName: Build SCXT Installer for Main - env: - MAC_INSTALLING_CERT: $(MAC_INSTALLING_CERT) - MAC_SIGNING_1UPW: $(MAC_SIGNING_1UPW) - MAC_SIGNING_CERT: $(MAC_SIGNING_CERT) - MAC_SIGNING_ID: $(MAC_SIGNING_ID) - MAC_SIGNING_TEAM: $(MAC_SIGNING_TEAM) - - - - bash: | - mkdir -p build/stage_git/git_info - git log -1 --pretty=format:'%h : %s - %an' > build/stage_git/git_info/git_nightly_sc3_log_display - git log -1 --pretty=format:'%h : %s%n%aD%n%an%n%n%B' > build/stage_git/git_info/git_nightly_sc3_log_long_display - git log -5 --pretty=format:'%h : %s - %an' > build/stage_git/git_info/git_nightly_sc3_recent_five - git log -1 --pretty=format:'%h' > build/stage_git/git_info/git_nightly_sc3_log_hash - - cat build/stage_git/git_info/* - - condition: variables.isLinux - displayName: Use the linux build to make git log info - - - task: PublishPipelineArtifact@0 - inputs: - artifactName: 'INSTALLER_MAC_DIST' - targetPath: 'build/installer' - condition: variables.isMac - displayName: mac - publish mac zip - - - task: PublishPipelineArtifact@0 - inputs: - artifactName: 'INSTALLER_WIN_DIST' - targetPath: 'build/installer' - condition: variables.isWindows - displayName: win - publish win zip - - - task: PublishPipelineArtifact@0 - inputs: - artifactName: 'INSTALLER_LIN_DIST' - targetPath: 'build/installer' - condition: variables.isLinux - displayName: lin - publish lin zip - - - - task: PublishPipelineArtifact@0 - inputs: - artifactName: 'GIT_INFO' - targetPath: 'build/stage_git/' - condition: variables.isLinux - displayName: lin - publish git info - - - job: Release - dependsOn: ReleaseBuild - condition: and(succeeded(), not(eq(variables['Build.Reason'], 'PullRequest'))) - strategy: - matrix: - lin: - imageName: 'ubuntu-20.04' - - pool: - vmImage: $(imageName) - - steps: - - checkout: self - persistCredentials: true - - - task: DownloadSecureFile@1 - inputs: - secureFile: discord-nightly-shortcircuit.webhook - - - task: DownloadPipelineArtifact@0 - inputs: - artifactName: 'INSTALLER_MAC_DIST' - targetPath: $(System.DefaultWorkingDirectory) - - - task: DownloadPipelineArtifact@0 - inputs: - artifactName: 'INSTALLER_WIN_DIST' - targetPath: $(System.DefaultWorkingDirectory) - - - task: DownloadPipelineArtifact@0 - inputs: - artifactName: 'INSTALLER_LIN_DIST' - targetPath: $(System.DefaultWorkingDirectory) - - - - task: DownloadPipelineArtifact@0 - inputs: - artifactName: 'GIT_INFO' - targetPath: $(System.DefaultWorkingDirectory) - - - bash: | - set -e - set -x - - mkdir -p releases - - mv *.zip *.dmg *.exe releases - - ls -l $(System.DefaultWorkingDirectory)/git_info/ - echo "## ShortCircuit Nightly Build" > releases/ReleaseNotes.md - echo " " >> releases/ReleaseNotes.md - echo "**This is an incomplete pre-alpha build of SCXT. Please beware.** " >> releases/ReleaseNotes.md - echo "The software has missing features, known bugs, may crash, and more. If you " >> releases/ReleaseNotes.md - echo "choose to use it, please strongly consider a limiter in your DAW and dont " >> releases/ReleaseNotes.md - echo "use in-ear headphones as DSP errors may make unbounded noise. " >> releases/ReleaseNotes.md - echo "For more info, please join our discord!" >> releases/ReleaseNotes.md - echo " " >> releases/ReleaseNotes.md - date +"**Last Updated On: %Y-%m-%d %H:%M:%S %Z**" >> releases/ReleaseNotes.md - echo " " >> releases/ReleaseNotes.md - echo "5 most recent commits in this install:" >> releases/ReleaseNotes.md - echo "
" >> releases/ReleaseNotes.md
-          cat $(System.DefaultWorkingDirectory)/git_info/git_nightly_sc3_recent_five >> releases/ReleaseNotes.md
-          echo " " >> releases/ReleaseNotes.md
-          echo "
" >> releases/ReleaseNotes.md - - echo "---------------" - cat releases/ReleaseNotes.md - echo "---------------" - - ls -alFh releases - displayName: Prepare Release - - - task: GitHubRelease@0 - displayName: "Create Github Nightly Release" - # condition: eq(variables.SURGE_IS_MAIN, 'true') - inputs: - gitHubConnection: surge-rackupdater - repositoryName: surge-synthesizer/shortcircuit-xt - action: 'edit' - tag: Nightly - target: '$(Build.SourceVersion)' - addChangeLog: false - assetUploadMode: 'delete' - releaseNotesFile: $(System.DefaultWorkingDirectory)/releases/ReleaseNotes.md - assets: $(System.DefaultWorkingDirectory)/releases/*.* - - # ToDo: Non-nightly release - # - bash: | - # git tag $(SURGE_VERSION) - # git push origin $(SURGE_VERSION) - # displayName: "Create Github Tag for Stable" - # condition: eq(variables.SURGE_IS_MAIN, 'false') - - # - task: GitHubRelease@0 - # displayName: "Create Github Stable Release" - # condition: eq(variables.SURGE_IS_MAIN, 'false') - # inputs: - # gitHubConnection: surge-rackupdater - # repositoryName: surge-synthesizer/releases-xt - # action: 'create' - # tag: $(SURGE_VERSION) - # tagSource: 'auto' - # target: '$(Build.SourceVersion)' - # addChangeLog: false - # assetUploadMode: 'delete' - # releaseNotesFile: $(System.DefaultWorkingDirectory)/releases/ReleaseNotes.md - # assets: $(System.DefaultWorkingDirectory)/releases/*.* - - - - bash: | - # Finally tell discord - export GIT_LOG_DISP=`cat git_info/git_nightly_sc3_log_display | sed -e s/\"//g` - - curl -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data "{\"content\": \"A ShortcircuitXT Nightly is available. Still pre-alpha, but many core things are starting to work.\n${GIT_LOG_DISP}\nhttps://github.com/surge-synthesizer/shortcircuit-xt/releases/tag/Nightly\"}" `cat $AGENT_TEMPDIRECTORY/discord-nightly-shortcircuit.webhook` - displayName: Tell Discord