1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-03 09:09:47 +02:00
audacity/.github/workflows/cmake_build.yml
Peter Jonas 4b5c95d7fe Move GitHub Actions CI scripts into separate files
Break the workflow into smaller stages (Configure, Build, Install,
Package, etc.) so that you can see exactly which stage failed in the
GitHub Actions run log.

Create a separate Bash CI script for each job stage (configure.sh,
build.sh, install.sh, package.sh, etc.) to reduce the size of the main
YAML workflow file and enable Bash syntax highlighting.

Close #917
2021-06-10 10:09:49 -07:00

95 lines
2.3 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 }}
run: |
exec bash "scripts/ci/configure.sh"
- name: Build
run: |
exec bash "scripts/ci/build.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