1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-15 15:49:36 +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:
Be 2021-07-08 21:40:07 -05:00
parent 05573da353
commit 9c4fecd913
No known key found for this signature in database
GPG Key ID: F4D83691462F656E
2 changed files with 20 additions and 17 deletions

View File

@ -43,13 +43,19 @@ jobs:
- name: Windows_32bit
os: windows-latest
arch: 32bit # as reported by Windows Settings > System > About
generator: Visual Studio 16 2019
arch: x86
# required so CMake uses MSVC rather than MinGW
cc: cl
cxx: cl
generator: Ninja
- name: Windows_64bit
os: windows-latest
arch: 64bit # as reported by Windows Settings > System > About
generator: Visual Studio 16 2019
arch: amd64
# required so CMake uses MSVC rather than MinGW
cc: cl
cxx: cl
generator: Ninja
steps:
@ -63,7 +69,7 @@ jobs:
- name: Environment
run: |
source "scripts/ci/environment.sh"
- name: Install Apple codesigning certificates
uses: apple-actions/import-codesign-certs@v1
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-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
id: cache-conan
uses: actions/cache@v2
@ -88,6 +101,8 @@ jobs:
APPLE_CODESIGN_IDENTITY: ${{ secrets.APPLE_CODESIGN_IDENTITY }}
APPLE_NOTARIZATION_USER_NAME: ${{ secrets.APPLE_NOTARIZATION_USER_NAME }}
APPLE_NOTARIZATION_PASSWORD: ${{ secrets.APPLE_NOTARIZATION_PASSWORD }}
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
run: |
exec bash "scripts/ci/configure.sh"

View File

@ -15,18 +15,6 @@ cmake_args=(
-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
cmake_args+=(
-D APPLE_CODESIGN_IDENTITY="${APPLE_CODESIGN_IDENTITY}"