mirror of
https://github.com/audacity/audacity-project-tools.git
synced 2026-04-19 21:11:04 -05:00
67 lines
1.7 KiB
YAML
67 lines
1.7 KiB
YAML
name: CMake
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
BUILD_TYPE: Release
|
|
|
|
jobs:
|
|
build:
|
|
name: Building ${{ matrix.config.os }}
|
|
runs-on: ${{ matrix.config.os }}
|
|
strategy:
|
|
matrix:
|
|
config:
|
|
- os: ubuntu-latest
|
|
preset: conan-release
|
|
- os: macos-latest
|
|
preset: conan-release
|
|
- os: windows-2022
|
|
preset: conan-default
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.12'
|
|
|
|
- name: Install Conan
|
|
run: pip install "conan>=2"
|
|
|
|
- name: Detect Conan profile
|
|
run: conan profile detect --force
|
|
|
|
- name: Cache Conan packages
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.conan2
|
|
key: conan-${{ matrix.config.os }}-${{ hashFiles('conanfile.txt') }}
|
|
restore-keys: |
|
|
conan-${{ matrix.config.os }}-
|
|
|
|
- name: Install dependencies
|
|
run: conan install . --output-folder=build/${{ env.BUILD_TYPE }} --build=missing -s build_type=${{ env.BUILD_TYPE }}
|
|
|
|
- name: Configure CMake
|
|
run: cmake --preset ${{ matrix.config.preset }}
|
|
|
|
- name: Build
|
|
run: cmake --build build/${{ env.BUILD_TYPE }} --config ${{ env.BUILD_TYPE }}
|
|
|
|
- name: Package
|
|
working-directory: build/${{ env.BUILD_TYPE }}
|
|
run: cmake --build . --target package --config ${{ env.BUILD_TYPE }}
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: audacity-project-tools-${{ matrix.config.os }}
|
|
path: |
|
|
build/${{ env.BUILD_TYPE }}/packages/*
|
|
!build/${{ env.BUILD_TYPE }}/packages/_CPack_Packages
|
|
if-no-files-found: error
|