Fix handling of unicode in project name #119
Workflow file for this run
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: Build Audacity | |
on: | |
push: | |
paths-ignore: ["au4/**", "**/**.md", "**/**.dox2", "**/**.dox", "**/**.dox.in", "**/LICENSE.txt", "/.github/ISSUE_TEMPLATE/**", "INSTALL", "CHANGELOG.txt", ".editorconfig", ".gitignore", ".gitattributes"] | |
pull_request: | |
paths-ignore: ["au4/**", "**/**.md", "**/**.dox2", "**/**.dox", "**/**.dox.in", "**/LICENSE.txt", "/.github/ISSUE_TEMPLATE/**", "INSTALL", "CHANGELOG.txt", ".editorconfig", ".gitignore", ".gitattributes"] | |
workflow_dispatch: | |
inputs: | |
build_level: | |
description: "Build level to be used. Valid values are: alpha, beta, release" | |
required: false | |
default: 'alpha' | |
type: string | |
build_type: | |
description: 'Build type. Valid values are: Debug, Release, RelWithDebInfo, MinSizeRel' | |
required: false | |
default: RelWithDebInfo | |
type: string | |
configuration_types: | |
description: 'Build type. Valid values are: Debug, Release, RelWithDebInfo, MinSizeRel or any combination separated with a semicolon' | |
required: false | |
default: RelWithDebInfo | |
type: string | |
configure_cmake_options: | |
description: 'Additional CMake options for configuration' | |
required: false | |
default: '' | |
type: string | |
workflow_call: | |
inputs: | |
build_level: | |
description: "Build level to be used. Valid values are: alpha, beta, release" | |
required: false | |
default: 'alpha' | |
type: string | |
build_type: | |
description: 'Build type. Valid values are: Debug, Release, RelWithDebInfo, MinSizeRel' | |
required: false | |
default: RelWithDebInfo | |
type: string | |
configuration_types: | |
description: 'Build type. Valid values are: Debug, Release, RelWithDebInfo, MinSizeRel or any combination separated with a semicolon' | |
required: false | |
default: RelWithDebInfo | |
type: string | |
configure_cmake_options: | |
description: 'Additional CMake options for configuration' | |
required: false | |
default: '' | |
type: string | |
secrets: | |
APPLE_CERTIFICATE: | |
required: false | |
APPLE_CERTIFICATE_PASSWORD: | |
required: false | |
APPLE_CODESIGN_IDENTITY: | |
required: false | |
APPLE_NOTARIZATION_USER_NAME: | |
required: false | |
APPLE_NOTARIZATION_PASSWORD: | |
required: false | |
APPLE_NOTARIZATION_TEAM_ID: | |
required: false | |
CRASH_REPORT_URL: | |
required: false | |
SENTRY_AUTH_TOKEN: | |
required: false | |
SENTRY_DSN_KEY: | |
required: false | |
SENTRY_HOST: | |
required: false | |
SENTRY_ORG_SLUG: | |
required: false | |
SENTRY_PROJECT: | |
required: false | |
SENTRY_PROJECT_SLUG: | |
required: false | |
WINDOWS_CERTIFICATE: | |
required: false | |
WINDOWS_CERTIFICATE_PASSWORD: | |
required: false | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_DSN_KEY: ${{ secrets.SENTRY_DSN_KEY }} | |
SENTRY_HOST: ${{ secrets.SENTRY_HOST }} | |
SENTRY_ORG_SLUG: ${{ secrets.SENTRY_ORG_SLUG }} | |
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} | |
SENTRY_PROJECT_SLUG: ${{ secrets.SENTRY_PROJECT_SLUG }} | |
ARTIFACTORY_SYMBOLS_URL: ${{ secrets.ARTIFACTORY_SYMBOLS_URL }} | |
ARTIFACTORY_SYMBOLS_KEY: ${{ secrets.ARTIFACTORY_SYMBOLS_KEY }} | |
CONAN_BINARIES_REMOTE: ${{ secrets.CONAN_BINARIES_REMOTE }} | |
CONAN_LOGIN_USERNAME: ${{ secrets.CONAN_LOGIN_USERNAME }} | |
CONAN_PASSWORD: ${{ secrets.CONAN_PASSWORD }} | |
BUILD_TYPE: ${{ (inputs && inputs.build_type) || (github.event.inputs && github.event.inputs.build_type) || 'RelWithDebInfo' }} | |
CONFIGURATION_TYPES: ${{ (inputs && inputs.configuration_types) || (github.event.inputs && github.event.inputs.configuration_types) || 'RelWithDebInfo' }} | |
CONFIGURE_CMAKE_OPTIONS: | | |
-Daudacity_has_url_schemes_support=On | |
-Daudacity_has_audiocom_upload=On | |
${{ (inputs && inputs.configure_cmake_options) || (github.event.inputs && github.event.inputs.configure_cmake_options) || '' }} | |
BUILD_LEVEL: ${{ (inputs && inputs.build_level) || (github.event.inputs && github.event.inputs.build_level) || ((startsWith(github.ref, 'refs/heads/release-') && 'beta') || 'alpha') }} | |
CRASH_REPORT_URL: ${{ secrets.CRASH_REPORT_URL }} | |
jobs: | |
build_linux: | |
name: ${{ matrix.config.name }} | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- name: Ubuntu 20.04 AppImage (x86_64) | |
os: ubuntu-20.04 | |
force_gcc11: false | |
postfix: '-20.04' | |
# - name: Ubuntu 20.04 AppImage (x86_64, gcc 11) | |
# os: ubuntu-20.04 | |
# force_gcc11: true | |
# postfix: '-20.04-gcc11' | |
- name: Ubuntu 22.04 AppImage (x86_64) | |
os: ubuntu-22.04 | |
force_gcc11: false | |
postfix: '-22.04' | |
steps: | |
- name: Checkout Audacity | |
uses: actions/checkout@v4 | |
- name: Setup Dependencies | |
uses: audacity/audacity-actions/dependencies@v2 | |
with: | |
force_gcc11: ${{ matrix.config.force_gcc11 }} | |
- name: Configure | |
uses: audacity/audacity-actions/configure@v2 | |
with: | |
generator: Unix Makefiles | |
build_type: ${{ env.BUILD_TYPE }} | |
configuration_types: ${{ env.CONFIGURATION_TYPES }} | |
build_level: ${{ env.BUILD_LEVEL }} | |
cmake_options: ${{ env.CONFIGURE_CMAKE_OPTIONS }} | |
- name: Build | |
uses: audacity/audacity-actions/build@v2 | |
- name: Test | |
uses: GabrielBB/xvfb-action@v1 | |
with: | |
run: ctest -C ${{ env.BUILD_TYPE }} --verbose | |
working-directory: ./.build.x64/ | |
- name: Package | |
uses: audacity/audacity-actions/package@v2 | |
with: | |
postfix: ${{ matrix.config.postfix }} | |
build_windows: | |
name: ${{ matrix.config.name }} | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- name: Windows MSVC 2019 (x86) | |
os: windows-2019 | |
arch: x32 | |
generator: Visual Studio 16 2019 | |
postfix: '-msvc2019' | |
windows_sdk: '10.0.18362.0' | |
- name: Windows MSVC 2019 (x86_64) | |
os: windows-2019 | |
arch: x64 | |
generator: Visual Studio 16 2019 | |
postfix: '-msvc2019' | |
windows_sdk: '10.0.18362.0' | |
- name: Windows MSVC 2022 (x86) | |
os: windows-2022 | |
arch: x32 | |
generator: Visual Studio 17 2022 | |
postfix: '-msvc2022' | |
windows_sdk: '10.0.22000.0' | |
- name: Windows MSVC 2022 (x86_64) | |
os: windows-2022 | |
arch: x64 | |
generator: Visual Studio 17 2022 | |
postfix: '-msvc2022' | |
windows_sdk: '10.0.22000.0' | |
steps: | |
- name: Checkout Audacity | |
uses: actions/checkout@v4 | |
- name: Setup Dependencies | |
uses: audacity/audacity-actions/dependencies@v2 | |
with: | |
force_gcc11: ${{ matrix.config.force_gcc11 }} | |
- name: Configure | |
uses: audacity/audacity-actions/configure@v2 | |
with: | |
generator: ${{ matrix.config.generator }} | |
arch: ${{ matrix.config.arch }} | |
build_type: ${{ env.BUILD_TYPE }} | |
configuration_types: ${{ env.CONFIGURATION_TYPES }} | |
build_level: ${{ env.BUILD_LEVEL }} | |
cmake_options: | | |
${{ env.CONFIGURE_CMAKE_OPTIONS }} | |
-DCMAKE_SYSTEM_VERSION=${{ matrix.config.windows_sdk }} | |
windows_certificate: ${{ secrets.WINDOWS_CERTIFICATE }} | |
windows_certificate_password: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }} | |
- name: Build | |
uses: audacity/audacity-actions/build@v2 | |
- name: Test | |
shell: pwsh | |
run: | | |
pushd .build.${{ matrix.config.arch }} | |
ctest -C ${{ env.BUILD_TYPE }} --verbose | |
popd | |
- name: Package | |
uses: audacity/audacity-actions/package@v2 | |
with: | |
postfix: ${{ matrix.config.postfix }} | |
build_macos_intel: | |
name: Build macOS (x86_64) | |
runs-on: macos-13 | |
steps: | |
- name: Checkout Audacity | |
uses: actions/checkout@v4 | |
- name: Setup Dependencies | |
uses: audacity/audacity-actions/dependencies@v2 | |
with: | |
force_gcc11: ${{ matrix.config.force_gcc11 }} | |
- name: Configure x86_64 | |
uses: audacity/audacity-actions/configure@v2 | |
with: | |
generator: Xcode | |
build_type: ${{ env.BUILD_TYPE }} | |
configuration_types: ${{ env.CONFIGURATION_TYPES }} | |
build_level: ${{ env.BUILD_LEVEL }} | |
cmake_options: ${{ env.CONFIGURE_CMAKE_OPTIONS }} | |
arch: x64 | |
- name: Build x86_64 | |
uses: audacity/audacity-actions/build@v2 | |
- name: Test | |
shell: bash | |
run: | | |
pushd .build.x64 | |
ctest -C ${{ env.BUILD_TYPE }} --verbose | |
popd | |
- name: 'Tar files' | |
shell: bash | |
run: tar cf macos_intel.tar .build.x64 | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: macos-intel-${{ github.run_id }}-${{ github.run_attempt }} | |
path: macos_intel.tar | |
build_macos_arm64: | |
name: Build macOS (arm64) | |
runs-on: macos-13 | |
steps: | |
- name: Checkout Audacity | |
uses: actions/checkout@v4 | |
- name: Setup Dependencies | |
uses: audacity/audacity-actions/dependencies@v2 | |
with: | |
force_gcc11: ${{ matrix.config.force_gcc11 }} | |
- name: Configure x86_64 | |
uses: audacity/audacity-actions/configure@v2 | |
with: | |
generator: Xcode | |
build_type: ${{ env.BUILD_TYPE }} | |
configuration_types: ${{ env.CONFIGURATION_TYPES }} | |
build_level: ${{ env.BUILD_LEVEL }} | |
cmake_options: ${{ env.CONFIGURE_CMAKE_OPTIONS }} | |
arch: x64 | |
- name: Build x86_64 | |
uses: audacity/audacity-actions/build@v2 | |
with: | |
target: image-compiler | |
- name: Configure arm64 | |
uses: audacity/audacity-actions/configure@v2 | |
with: | |
generator: Xcode | |
build_type: ${{ env.BUILD_TYPE }} | |
configuration_types: ${{ env.CONFIGURATION_TYPES }} | |
build_level: ${{ env.BUILD_LEVEL }} | |
cmake_options: ${{ env.CONFIGURE_CMAKE_OPTIONS }} | |
arch: arm64 | |
image_compiler: "${{ github.workspace }}/.build.x64/RelWithDebInfo/Audacity.app/Contents/image-compiler/image-compiler" | |
- name: Build arm64 | |
uses: audacity/audacity-actions/build@v2 | |
- name: 'Tar files' | |
shell: bash | |
run: tar cf macos_arm64.tar .build.arm64 | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: macos-arm64-${{ github.run_id }}-${{ github.run_attempt }} | |
path: macos_arm64.tar | |
package_macos: | |
name: Package macOS (x86_64, arm64, universal) | |
runs-on: macos-13 | |
needs: [build_macos_intel, build_macos_arm64] | |
steps: | |
- name: Checkout Audacity | |
uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: macos-intel-${{ github.run_id }}-${{ github.run_attempt }} | |
- uses: actions/download-artifact@v4 | |
with: | |
name: macos-arm64-${{ github.run_id }}-${{ github.run_attempt }} | |
- name: Untar files | |
shell: bash | |
run: | | |
tar xf macos_intel.tar | |
tar xf macos_arm64.tar | |
- uses: geekyeggo/delete-artifact@v5 | |
with: | |
name: | | |
macos-intel-${{ github.run_id }}-${{ github.run_attempt }} | |
macos-arm64-${{ github.run_id }}-${{ github.run_attempt }} | |
- name: Install Apple codesigning certificates | |
uses: apple-actions/import-codesign-certs@v2 | |
env: | |
P12_FILE_BASE64: ${{ secrets.APPLE_CERTIFICATE }} | |
P12_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
if: ${{ env.P12_FILE_BASE64 != '' && env.P12_PASSWORD != '' }} | |
with: | |
p12-file-base64: ${{ secrets.APPLE_CERTIFICATE }} | |
p12-password: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
- name: Package | |
uses: audacity/audacity-actions/package@v2 | |
env: | |
AUDACITY_BUILD_DIR: "${{ github.workspace }}/.build.x64" | |
AUDACITY_BUILD_TYPE: ${{ env.BUILD_TYPE }} | |
AUDACITY_BUILD_LEVEL: ${{ env.BUILD_LEVEL }} | |
with: | |
apple_codesign_identity: ${{ secrets.APPLE_CODESIGN_IDENTITY }} | |
apple_notarization_user_name: ${{ secrets.APPLE_NOTARIZATION_USER_NAME }} | |
apple_notarization_password: ${{ secrets.APPLE_NOTARIZATION_PASSWORD }} | |
apple_notarization_team_id: ${{ secrets.APPLE_NOTARIZATION_TEAM_ID }} | |
archs: | | |
x64 | |
arm64 | |
sources: | |
name: Source Tarball | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout Audacity | |
uses: actions/checkout@v4 | |
- name: Setup Dependencies | |
uses: audacity/audacity-actions/dependencies@v2 | |
with: | |
force_gcc11: ${{ matrix.config.force_gcc11 }} | |
- name: Configure | |
uses: audacity/audacity-actions/configure@v2 | |
with: | |
generator: Unix Makefiles | |
build_type: ${{ env.BUILD_TYPE }} | |
configuration_types: ${{ env.CONFIGURATION_TYPES }} | |
build_level: ${{ env.BUILD_LEVEL }} | |
cmake_options: ${{ env.CONFIGURE_CMAKE_OPTIONS }} | |
- name: Package | |
shell: bash | |
run: | | |
function gh_export() | |
{ | |
[[ "${GITHUB_ENV-}" ]] || local -r GITHUB_ENV="/dev/null" | |
export -- "$@" && printf "%s\n" "$@" >> "${GITHUB_ENV}" | |
} | |
cmake --build .build.x64 --target package_source | |
artifact_name=$(basename "$(ls .build.x64/package/*.tar.gz | head -n 1)" ".tar.gz") | |
gh_export SOURCES_ARTIFACT_NAME="${artifact_name}" | |
- name: Upload sources | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.SOURCES_ARTIFACT_NAME }} | |
path: | | |
.build.x64/package/* | |
!.build.x64/package/_CPack_Packages | |
if-no-files-found: error | |