mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-10 09:01:13 +02:00
GH Actions: use Ninja CMake generator on Windows
MSBuild does not work with CMake's CMAKE_C_COMPILER_LAUNCHER / CMAKE_CXX_COMPILER_LAUNCHER for compiler caching. Signed-off-by: Be <be@mixxx.org>
This commit is contained in:
parent
05573da353
commit
9c4fecd913
25
.github/workflows/cmake_build.yml
vendored
25
.github/workflows/cmake_build.yml
vendored
@ -43,13 +43,19 @@ jobs:
|
|||||||
|
|
||||||
- name: Windows_32bit
|
- name: Windows_32bit
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
arch: 32bit # as reported by Windows Settings > System > About
|
arch: x86
|
||||||
generator: Visual Studio 16 2019
|
# required so CMake uses MSVC rather than MinGW
|
||||||
|
cc: cl
|
||||||
|
cxx: cl
|
||||||
|
generator: Ninja
|
||||||
|
|
||||||
- name: Windows_64bit
|
- name: Windows_64bit
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
arch: 64bit # as reported by Windows Settings > System > About
|
arch: amd64
|
||||||
generator: Visual Studio 16 2019
|
# required so CMake uses MSVC rather than MinGW
|
||||||
|
cc: cl
|
||||||
|
cxx: cl
|
||||||
|
generator: Ninja
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
@ -63,7 +69,7 @@ jobs:
|
|||||||
- name: Environment
|
- name: Environment
|
||||||
run: |
|
run: |
|
||||||
source "scripts/ci/environment.sh"
|
source "scripts/ci/environment.sh"
|
||||||
|
|
||||||
- name: Install Apple codesigning certificates
|
- name: Install Apple codesigning certificates
|
||||||
uses: apple-actions/import-codesign-certs@v1
|
uses: apple-actions/import-codesign-certs@v1
|
||||||
if: startswith( matrix.config.os, 'macos' ) && github.event_name == 'push' && github.repository_owner == 'audacity'
|
if: startswith( matrix.config.os, 'macos' ) && github.event_name == 'push' && github.repository_owner == 'audacity'
|
||||||
@ -71,6 +77,13 @@ jobs:
|
|||||||
p12-file-base64: ${{ secrets.APPLE_CERTIFICATE }}
|
p12-file-base64: ${{ secrets.APPLE_CERTIFICATE }}
|
||||||
p12-password: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
|
p12-password: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
|
||||||
|
|
||||||
|
# required for CMake to find Ninja
|
||||||
|
- name: "[Windows] Set up MSVC Developer Command Prompt"
|
||||||
|
if: runner.os == 'Windows'
|
||||||
|
uses: seanmiddleditch/gha-setup-vsdevenv@v3
|
||||||
|
with:
|
||||||
|
arch: ${{ matrix.config.arch }}
|
||||||
|
|
||||||
- name: Cache for .conan
|
- name: Cache for .conan
|
||||||
id: cache-conan
|
id: cache-conan
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
@ -88,6 +101,8 @@ jobs:
|
|||||||
APPLE_CODESIGN_IDENTITY: ${{ secrets.APPLE_CODESIGN_IDENTITY }}
|
APPLE_CODESIGN_IDENTITY: ${{ secrets.APPLE_CODESIGN_IDENTITY }}
|
||||||
APPLE_NOTARIZATION_USER_NAME: ${{ secrets.APPLE_NOTARIZATION_USER_NAME }}
|
APPLE_NOTARIZATION_USER_NAME: ${{ secrets.APPLE_NOTARIZATION_USER_NAME }}
|
||||||
APPLE_NOTARIZATION_PASSWORD: ${{ secrets.APPLE_NOTARIZATION_PASSWORD }}
|
APPLE_NOTARIZATION_PASSWORD: ${{ secrets.APPLE_NOTARIZATION_PASSWORD }}
|
||||||
|
CC: ${{ matrix.config.cc }}
|
||||||
|
CXX: ${{ matrix.config.cxx }}
|
||||||
run: |
|
run: |
|
||||||
exec bash "scripts/ci/configure.sh"
|
exec bash "scripts/ci/configure.sh"
|
||||||
|
|
||||||
|
@ -15,18 +15,6 @@ cmake_args=(
|
|||||||
-D CMAKE_INSTALL_PREFIX="${AUDACITY_INSTALL_PREFIX}"
|
-D CMAKE_INSTALL_PREFIX="${AUDACITY_INSTALL_PREFIX}"
|
||||||
)
|
)
|
||||||
|
|
||||||
if [[ "${AUDACITY_CMAKE_GENERATOR}" == "Visual Studio"* ]]; then
|
|
||||||
cmake_args+=(
|
|
||||||
# skip unneeded configurations
|
|
||||||
-D CMAKE_CONFIGURATION_TYPES="${AUDACITY_BUILD_TYPE}"
|
|
||||||
)
|
|
||||||
case "${AUDACITY_ARCH_LABEL}" in
|
|
||||||
32bit) cmake_args+=( -A Win32 ) ;;
|
|
||||||
64bit) cmake_args+=( -A x64 ) ;;
|
|
||||||
*) echo >&2 "$0: Unrecognised arch label '${AUDACITY_ARCH_LABEL}'" ; exit 1 ;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -n "${APPLE_CODESIGN_IDENTITY}" && "${OSTYPE}" == darwin* ]]; then
|
if [[ -n "${APPLE_CODESIGN_IDENTITY}" && "${OSTYPE}" == darwin* ]]; then
|
||||||
cmake_args+=(
|
cmake_args+=(
|
||||||
-D APPLE_CODESIGN_IDENTITY="${APPLE_CODESIGN_IDENTITY}"
|
-D APPLE_CODESIGN_IDENTITY="${APPLE_CODESIGN_IDENTITY}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user