1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-06 17:13:49 +01:00

Fix CI build (#715)

This commit is contained in:
Edgar
2022-03-22 23:14:20 +01:00
committed by GitHub
parent a08fdb282b
commit 87ea52b1a4

View File

@@ -4,10 +4,32 @@ on:
push:
branches:
- master
paths-ignore: ["**/**.md", "**/**.dox2", "**/**.dox", "**/**.dox.in", "**/LICENSE.txt", "/.builds/**", "/.github/ISSUE_TEMPLATE/**", "/.github/funding.yml", "/.vscode/**"]
paths-ignore:
[
"**/**.md",
"**/**.dox2",
"**/**.dox",
"**/**.dox.in",
"**/LICENSE.txt",
"/.builds/**",
"/.github/ISSUE_TEMPLATE/**",
"/.github/funding.yml",
"/.vscode/**",
]
pull_request:
paths-ignore: ["**/**.md", "**/**.dox2", "**/**.dox", "**/**.dox.in", "**/LICENSE.txt", "/.builds/**", "/.github/ISSUE_TEMPLATE/**", "/.github/funding.yml", "/.vscode/**"]
paths-ignore:
[
"**/**.md",
"**/**.dox2",
"**/**.dox",
"**/**.dox.in",
"**/LICENSE.txt",
"/.builds/**",
"/.github/ISSUE_TEMPLATE/**",
"/.github/funding.yml",
"/.vscode/**",
]
workflow_dispatch:
@@ -30,7 +52,6 @@ permissions:
statuses: read
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
@@ -94,9 +115,7 @@ jobs:
vcpkg_triplet: x86-windows
CMAKE_GENERATOR: Ninja
env:
AUDACITY_ARCH_LABEL: ${{ matrix.config.arch }}
# CMake settings
@@ -119,11 +138,9 @@ jobs:
WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}
# WxWidgets info for Linux and macOS builds
WX_GIT_URL: https://github.com/wxWidgets/wxWidgets.git
WX_GIT_REF: v3.1.5
WX_VERSION: 3.1.5
steps:
- name: Checkout Git repository
uses: actions/checkout@v2
with:
@@ -221,13 +238,8 @@ jobs:
- name: "[Windows] Install dependencies"
if: runner.os == 'Windows'
shell: pwsh
env:
# Install path of scoop
SCOOP: C:\Scoop\
run: |
echo "C:\Scoop\shims" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
iwr -useb get.scoop.sh | iex
scoop install sccache
choco install sccache -y
# Cache the vcpkg executable to avoid bootstrapping each time
- name: "Setup vcpkg executable cache"
@@ -242,7 +254,7 @@ jobs:
if: runner.os != 'Windows'
with:
path: ${{ env.WX_INSTALL_DIR }}
key: ${{ matrix.config.os }}-${{ matrix.config.arch }}-${{ env.WX_GIT_URL }}-${{ env.WX_GIT_REF }}
key: wx-${{ matrix.config.os }}-${{ matrix.config.arch }}-${{ env.WX_VERSION }}
# FIXME: use wxWidgets from vcpkg for all OSes when bugs are fixed for Linux and macOS
# https://github.com/microsoft/vcpkg/pull/17111
@@ -250,10 +262,12 @@ jobs:
if: steps.wxwidgets-cache.outputs.cache-hit != 'true' && runner.os != 'Windows'
run: |
# wxWidgets' build system does not find dependencies from vcpkg, so use its vendored Git submodules
git clone --recurse-submodules ${{ env.WX_GIT_URL }}
cd wxWidgets
git checkout ${{ env.WX_GIT_REF }}
cmake -S . -B cmake_build -D CMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -D CMAKE_INSTALL_PREFIX=${{ env.WX_INSTALL_DIR }} -D CMAKE_OSX_DEPLOYMENT_TARGET=10.12
wget https://github.com/wxWidgets/wxWidgets/releases/download/v${{ env.WX_VERSION }}/wxWidgets-${{ env.WX_VERSION }}.tar.bz2
tar xvf wxWidgets-${{ env.WX_VERSION }}.tar.bz2
rm wxWidgets-${{ env.WX_VERSION }}.tar.bz2
cd wxWidgets-${{ env.WX_VERSION }}
cmake -G Ninja -D CMAKE_INSTALL_PREFIX=${{ env.WX_INSTALL_DIR }} \
-S . -B cmake_build
cmake --build cmake_build
cmake --install cmake_build