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