mirror of
https://github.com/cookiengineer/audacity
synced 2025-04-30 07:39:42 +02:00
110 lines
3.0 KiB
YAML
110 lines
3.0 KiB
YAML
name: CMake Build
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
jobs:
|
|
build:
|
|
name: ${{ matrix.config.name }}
|
|
runs-on: ${{ matrix.config.os }}
|
|
env:
|
|
AUDACITY_CMAKE_GENERATOR: ${{ matrix.config.generator }}
|
|
AUDACITY_ARCH_LABEL: ${{ matrix.config.arch }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
config:
|
|
|
|
- name: Ubuntu_18.04
|
|
os: ubuntu-18.04
|
|
arch: x86_64 # as reported by `arch` or `uname -m`
|
|
generator: Unix Makefiles
|
|
|
|
- name: macOS_Intel
|
|
os: macos-latest
|
|
arch: Intel # as reported by Apple menu > About This Mac
|
|
generator: Xcode
|
|
|
|
- name: Windows_32bit
|
|
os: windows-latest
|
|
arch: 32bit # as reported by Windows Settings > System > About
|
|
generator: Visual Studio 16 2019
|
|
|
|
- name: Windows_64bit
|
|
os: windows-latest
|
|
arch: 64bit # as reported by Windows Settings > System > About
|
|
generator: Visual Studio 16 2019
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Dependencies
|
|
run: |
|
|
exec bash "scripts/ci/dependencies.sh"
|
|
|
|
- name: Environment
|
|
run: |
|
|
source "scripts/ci/environment.sh"
|
|
|
|
- name: Cache for .conan
|
|
id: cache-conan
|
|
uses: actions/cache@v2
|
|
env:
|
|
cache-name: cache-conan-modules
|
|
with:
|
|
path: ${{ env.CONAN_USER_HOME }}
|
|
key: host-${{ matrix.config.name }}-${{ hashFiles('cmake-proxies/CMakeLists.txt') }}
|
|
restore-keys: |
|
|
host-${{ matrix.config.name }}-
|
|
|
|
- name: Configure
|
|
env:
|
|
SENTRY_DSN_KEY: ${{ secrets.SENTRY_DSN_KEY }}
|
|
SENTRY_HOST: ${{ secrets.SENTRY_HOST }}
|
|
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
|
|
CRASH_REPORT_URL: ${{ secrets.CRASH_REPORT_URL }}
|
|
run: |
|
|
exec bash "scripts/ci/configure.sh"
|
|
|
|
- name: Build
|
|
run: |
|
|
exec bash "scripts/ci/build.sh"
|
|
|
|
- name: Upload debug symbols
|
|
if: startsWith(github.ref, 'refs/tags/release-')
|
|
env:
|
|
SENTRY_DSN_KEY: ${{ secrets.SENTRY_DSN_KEY }}
|
|
SENTRY_HOST: ${{ secrets.SENTRY_HOST }}
|
|
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
|
|
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
|
SENTRY_ORG_SLUG: ${{ secrets.SENTRY_ORG_SLUG }}
|
|
SENTRY_PROJECT_SLUG: ${{ secrets.SENTRY_PROJECT_SLUG }}
|
|
#this is required to run sentry's get-cli script on platforms where 'sudo' is not available
|
|
INSTALL_DIR: ${{ github.workspace }}
|
|
run: |
|
|
exec bash "scripts/ci/upload_debug_symbols.sh"
|
|
|
|
- name: Install
|
|
run: |
|
|
exec bash "scripts/ci/install.sh"
|
|
|
|
- name: Package
|
|
run: |
|
|
exec bash "scripts/ci/package.sh"
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: Audacity_${{ matrix.config.name }}_${{ github.run_id }}_${{ env.GIT_HASH_SHORT }}
|
|
path: |
|
|
build/package/*
|
|
!build/package/_CPack_Packages
|
|
if-no-files-found: error
|