mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-05 22:28:57 +02:00
Fix CI build (#715)
This commit is contained in:
parent
a08fdb282b
commit
87ea52b1a4
446
.github/workflows/cmake_build.yml
vendored
446
.github/workflows/cmake_build.yml
vendored
@ -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:
|
||||||
|
|
||||||
@ -19,7 +41,7 @@ defaults:
|
|||||||
# for information on what these individual permissions represent/control
|
# for information on what these individual permissions represent/control
|
||||||
permissions:
|
permissions:
|
||||||
actions: none
|
actions: none
|
||||||
checks: none
|
checks: none
|
||||||
contents: read
|
contents: read
|
||||||
deployments: none
|
deployments: none
|
||||||
issues: none
|
issues: none
|
||||||
@ -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 }}
|
||||||
@ -43,60 +64,58 @@ jobs:
|
|||||||
# Replace - with _
|
# Replace - with _
|
||||||
# Remove .
|
# Remove .
|
||||||
config:
|
config:
|
||||||
- name: Linux - Ubuntu 20.04 (x86_64) - Ninja
|
- name: Linux - Ubuntu 20.04 (x86_64) - Ninja
|
||||||
id: linux-ubuntu-2004-x86_64-x64_linux-ninja
|
id: linux-ubuntu-2004-x86_64-x64_linux-ninja
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
vcpkg_triplet: x64-linux
|
vcpkg_triplet: x64-linux
|
||||||
CMAKE_GENERATOR: Ninja
|
CMAKE_GENERATOR: Ninja
|
||||||
|
|
||||||
- name: macOS - Big Sur 11 (Intel) - Ninja
|
- name: macOS - Big Sur 11 (Intel) - Ninja
|
||||||
id: macos-bigsur-1100-intel-x64_osx_1012min-ninja
|
id: macos-bigsur-1100-intel-x64_osx_1012min-ninja
|
||||||
os: macos-11
|
os: macos-11
|
||||||
arch: Intel
|
arch: Intel
|
||||||
vcpkg_triplet: x64-osx-10.12min
|
vcpkg_triplet: x64-osx-10.12min
|
||||||
CMAKE_GENERATOR: Ninja
|
CMAKE_GENERATOR: Ninja
|
||||||
|
|
||||||
- name: macOS - Catalina 10.15 (Intel) - Ninja
|
- name: macOS - Catalina 10.15 (Intel) - Ninja
|
||||||
id: macos-catalina-1015-intel-x64_osx_1012min-ninja
|
id: macos-catalina-1015-intel-x64_osx_1012min-ninja
|
||||||
os: macos-10.15
|
os: macos-10.15
|
||||||
arch: Intel
|
arch: Intel
|
||||||
vcpkg_triplet: x64-osx-10.12min
|
vcpkg_triplet: x64-osx-10.12min
|
||||||
CMAKE_GENERATOR: Ninja
|
CMAKE_GENERATOR: Ninja
|
||||||
|
|
||||||
- name: Windows - Server 2019 (amd64) - Visual Studio 2019
|
- name: Windows - Server 2019 (amd64) - Visual Studio 2019
|
||||||
id: windows-server-2019-amd64-x64_windows-vs2019_x64
|
id: windows-server-2019-amd64-x64_windows-vs2019_x64
|
||||||
os: windows-2019
|
os: windows-2019
|
||||||
arch: amd64
|
arch: amd64
|
||||||
vcpkg_triplet: x64-windows
|
vcpkg_triplet: x64-windows
|
||||||
CMAKE_GENERATOR: Visual Studio 16 2019
|
CMAKE_GENERATOR: Visual Studio 16 2019
|
||||||
CMAKE_GENERATOR_PLATFORM: x64
|
CMAKE_GENERATOR_PLATFORM: x64
|
||||||
|
|
||||||
- name: Windows - Server 2019 (win32) - Visual Studio 2019
|
- name: Windows - Server 2019 (win32) - Visual Studio 2019
|
||||||
id: windows-server-2019-x86-x86_windows-vs2019_win32
|
id: windows-server-2019-x86-x86_windows-vs2019_win32
|
||||||
os: windows-2019
|
os: windows-2019
|
||||||
arch: x86
|
arch: x86
|
||||||
vcpkg_triplet: x86-windows
|
vcpkg_triplet: x86-windows
|
||||||
CMAKE_GENERATOR: Visual Studio 16 2019
|
CMAKE_GENERATOR: Visual Studio 16 2019
|
||||||
CMAKE_GENERATOR_PLATFORM: win32
|
CMAKE_GENERATOR_PLATFORM: win32
|
||||||
|
|
||||||
- name: Windows - Server 2019 (amd64) - Ninja
|
- name: Windows - Server 2019 (amd64) - Ninja
|
||||||
id: windows-server-2019-amd64-x64_windows-ninja
|
id: windows-server-2019-amd64-x64_windows-ninja
|
||||||
os: windows-2019
|
os: windows-2019
|
||||||
arch: amd64
|
arch: amd64
|
||||||
vcpkg_triplet: x64-windows
|
vcpkg_triplet: x64-windows
|
||||||
CMAKE_GENERATOR: Ninja
|
CMAKE_GENERATOR: Ninja
|
||||||
|
|
||||||
- name: Windows - Server 2019 (win32) - Ninja
|
|
||||||
id: windows-server-2019-x86-x86_windows-ninja
|
|
||||||
os: windows-2019
|
|
||||||
arch: x86
|
|
||||||
vcpkg_triplet: x86-windows
|
|
||||||
CMAKE_GENERATOR: Ninja
|
|
||||||
|
|
||||||
|
- name: Windows - Server 2019 (win32) - Ninja
|
||||||
|
id: windows-server-2019-x86-x86_windows-ninja
|
||||||
|
os: windows-2019
|
||||||
|
arch: x86
|
||||||
|
vcpkg_triplet: x86-windows
|
||||||
|
CMAKE_GENERATOR: Ninja
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
|
||||||
AUDACITY_ARCH_LABEL: ${{ matrix.config.arch }}
|
AUDACITY_ARCH_LABEL: ${{ matrix.config.arch }}
|
||||||
|
|
||||||
# CMake settings
|
# CMake settings
|
||||||
@ -119,193 +138,188 @@ 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
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
|
||||||
- name: Checkout Git repository
|
- name: Get Git commit of vcpkg submodule
|
||||||
uses: actions/checkout@v2
|
run: echo VCPKG_COMMIT=$(git ls-tree HEAD vcpkg | awk '{print $3}') >> ${GITHUB_ENV}
|
||||||
with:
|
|
||||||
submodules: true
|
|
||||||
|
|
||||||
- name: Get Git commit of vcpkg submodule
|
- name: Setup platform specific environmental variables
|
||||||
run: echo VCPKG_COMMIT=$(git ls-tree HEAD vcpkg | awk '{print $3}') >> ${GITHUB_ENV}
|
run: |
|
||||||
|
if [[ "${{runner.os}}" == "Windows" ]]; then
|
||||||
- name: Setup platform specific environmental variables
|
echo "Using Windows specific env vars"
|
||||||
run: |
|
echo COMPILER_CACHE_PATH=C:\Users\runneradmin\AppData\Local\Mozilla\sccache\cache >> ${GITHUB_ENV}
|
||||||
if [[ "${{runner.os}}" == "Windows" ]]; then
|
echo COMPILER_CACHE=sccache >> ${GITHUB_ENV}
|
||||||
echo "Using Windows specific env vars"
|
echo EXE_SUFFIX=.exe >> ${GITHUB_ENV}
|
||||||
echo COMPILER_CACHE_PATH=C:\Users\runneradmin\AppData\Local\Mozilla\sccache\cache >> ${GITHUB_ENV}
|
echo VCPKG_CACHE_PATH=C:\Users\runneradmin\AppData\Local\vcpkg >> ${GITHUB_ENV}
|
||||||
echo COMPILER_CACHE=sccache >> ${GITHUB_ENV}
|
echo CMAKE_C_COMPILER_LAUNCHER=sccache >> ${GITHUB_ENV}
|
||||||
echo EXE_SUFFIX=.exe >> ${GITHUB_ENV}
|
echo CMAKE_CXX_COMPILER_LAUNCHER=sccache >> ${GITHUB_ENV}
|
||||||
echo VCPKG_CACHE_PATH=C:\Users\runneradmin\AppData\Local\vcpkg >> ${GITHUB_ENV}
|
if [[ "${{ env.CMAKE_GENERATOR }}" == "Ninja" ]]; then
|
||||||
echo CMAKE_C_COMPILER_LAUNCHER=sccache >> ${GITHUB_ENV}
|
echo CC=cl >> ${GITHUB_ENV}
|
||||||
echo CMAKE_CXX_COMPILER_LAUNCHER=sccache >> ${GITHUB_ENV}
|
echo CXX=cl >> ${GITHUB_ENV}
|
||||||
if [[ "${{ env.CMAKE_GENERATOR }}" == "Ninja" ]]; then
|
fi
|
||||||
echo CC=cl >> ${GITHUB_ENV}
|
|
||||||
echo CXX=cl >> ${GITHUB_ENV}
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "Using non-Windows env vars"
|
|
||||||
echo COMPILER_CACHE_PATH= ~/Library/Caches/ccache >> ${GITHUB_ENV}
|
|
||||||
echo COMPILER_CACHE=ccache >> ${GITHUB_ENV}
|
|
||||||
echo EXE_SUFFIX= >> ${GITHUB_ENV}
|
|
||||||
echo VCPKG_CACHE_PATH=~/.cache/vcpkg >> ${GITHUB_ENV}
|
|
||||||
echo CMAKE_C_COMPILER_LAUNCHER=ccache >> ${GITHUB_ENV}
|
|
||||||
echo CMAKE_CXX_COMPILER_LAUNCHER=ccache >> ${GITHUB_ENV}
|
|
||||||
if [[ "${{runner.os}}" == "Linux" ]]; then
|
|
||||||
echo WX_INSTALL_DIR=/home/runner/work/tenacity/tenacity/wxwidgets-install >> ${GITHUB_ENV}
|
|
||||||
echo WX_CONFIG=/home/runner/work/tenacity/tenacity/wxwidgets-install/bin/wx-config >> ${GITHUB_ENV}
|
|
||||||
else
|
else
|
||||||
echo WX_INSTALL_DIR=/Users/runner/work/tenacity/tenacity/wxwidgets-install >> ${GITHUB_ENV}
|
echo "Using non-Windows env vars"
|
||||||
echo WX_CONFIG=/Users/runner/work/tenacity/tenacity/wxwidgets-install/bin/wx-config >> ${GITHUB_ENV}
|
echo COMPILER_CACHE_PATH= ~/Library/Caches/ccache >> ${GITHUB_ENV}
|
||||||
|
echo COMPILER_CACHE=ccache >> ${GITHUB_ENV}
|
||||||
|
echo EXE_SUFFIX= >> ${GITHUB_ENV}
|
||||||
|
echo VCPKG_CACHE_PATH=~/.cache/vcpkg >> ${GITHUB_ENV}
|
||||||
|
echo CMAKE_C_COMPILER_LAUNCHER=ccache >> ${GITHUB_ENV}
|
||||||
|
echo CMAKE_CXX_COMPILER_LAUNCHER=ccache >> ${GITHUB_ENV}
|
||||||
|
if [[ "${{runner.os}}" == "Linux" ]]; then
|
||||||
|
echo WX_INSTALL_DIR=/home/runner/work/tenacity/tenacity/wxwidgets-install >> ${GITHUB_ENV}
|
||||||
|
echo WX_CONFIG=/home/runner/work/tenacity/tenacity/wxwidgets-install/bin/wx-config >> ${GITHUB_ENV}
|
||||||
|
else
|
||||||
|
echo WX_INSTALL_DIR=/Users/runner/work/tenacity/tenacity/wxwidgets-install >> ${GITHUB_ENV}
|
||||||
|
echo WX_CONFIG=/Users/runner/work/tenacity/tenacity/wxwidgets-install/bin/wx-config >> ${GITHUB_ENV}
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
- name: "[macOS] Install Apple codesigning certificates"
|
- name: "[macOS] 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.repository_owner == 'tenacityteam' && github.event_name == 'create' && github.event.ref_type == 'tag'
|
if: startswith( matrix.config.os, 'macos' ) && github.repository_owner == 'tenacityteam' && github.event_name == 'create' && github.event.ref_type == 'tag'
|
||||||
with:
|
with:
|
||||||
p12-file-base64: ${{ secrets.APPLE_CERTIFICATE }}
|
p12-file-base64: ${{ secrets.APPLE_CERTIFICATE }}
|
||||||
p12-password: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
|
p12-password: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
|
||||||
|
|
||||||
- name: "[Windows] Set up MSVC Developer Command Prompt"
|
- name: "[Windows] Set up MSVC Developer Command Prompt"
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
uses: seanmiddleditch/gha-setup-vsdevenv@v3
|
uses: seanmiddleditch/gha-setup-vsdevenv@v3
|
||||||
with:
|
with:
|
||||||
arch: ${{ matrix.config.arch }}
|
arch: ${{ matrix.config.arch }}
|
||||||
|
|
||||||
- name: Install Nuget
|
- name: Install Nuget
|
||||||
uses: nuget/setup-nuget@v1
|
uses: nuget/setup-nuget@v1
|
||||||
with:
|
with:
|
||||||
nuget-version: 5.10.0
|
nuget-version: 5.10.0
|
||||||
|
|
||||||
- name: "Authenticate CI to Github Packages"
|
- name: "Authenticate CI to Github Packages"
|
||||||
if: github.repository_owner == 'tenacityteam'
|
if: github.repository_owner == 'tenacityteam'
|
||||||
run: |
|
run: |
|
||||||
nuget sources add -Name tenacityteam_github_auto -Source https://nuget.pkg.github.com/tenacityteam/index.json -Username tenacityteam -Password ${{ secrets.GITHUB_TOKEN }} -StorePasswordInClearText -ForceEnglishOutput -NonInteractive
|
nuget sources add -Name tenacityteam_github_auto -Source https://nuget.pkg.github.com/tenacityteam/index.json -Username tenacityteam -Password ${{ secrets.GITHUB_TOKEN }} -StorePasswordInClearText -ForceEnglishOutput -NonInteractive
|
||||||
nuget setapikey ${{ secrets.GITHUB_TOKEN }} -Source tenacityteam_github_auto -ForceEnglishOutput -NonInteractive
|
nuget setapikey ${{ secrets.GITHUB_TOKEN }} -Source tenacityteam_github_auto -ForceEnglishOutput -NonInteractive
|
||||||
echo "VCPKG_BINARY_SOURCES=clear;nuget,tenacityteam_github_auto,readwrite;" >> ${GITHUB_ENV}
|
echo "VCPKG_BINARY_SOURCES=clear;nuget,tenacityteam_github_auto,readwrite;" >> ${GITHUB_ENV}
|
||||||
|
|
||||||
- name: "[Linux] Install dependencies"
|
- name: "[Linux] Install dependencies"
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
run: >-
|
run: >-
|
||||||
sudo apt-get update &&
|
sudo apt-get update &&
|
||||||
sudo apt-get install -y --no-install-recommends
|
sudo apt-get install -y --no-install-recommends
|
||||||
file
|
file
|
||||||
g++
|
g++
|
||||||
ninja-build
|
ninja-build
|
||||||
nasm
|
nasm
|
||||||
git
|
git
|
||||||
wget
|
wget
|
||||||
bash
|
bash
|
||||||
scdoc
|
scdoc
|
||||||
ccache
|
ccache
|
||||||
debhelper-compat
|
debhelper-compat
|
||||||
gettext
|
gettext
|
||||||
libasound2-dev
|
libasound2-dev
|
||||||
libgtk-3-dev
|
libgtk-3-dev
|
||||||
libsuil-dev
|
libsuil-dev
|
||||||
gettext
|
gettext
|
||||||
|
|
||||||
- name: "[MacOS] Install dependencies"
|
- name: "[MacOS] Install dependencies"
|
||||||
if: runner.os == 'macOS'
|
if: runner.os == 'macOS'
|
||||||
run: >-
|
run: >-
|
||||||
brew install
|
brew install
|
||||||
bash
|
bash
|
||||||
ccache
|
ccache
|
||||||
ninja
|
ninja
|
||||||
nasm
|
nasm
|
||||||
|
|
||||||
- name: "[Windows] Install dependencies"
|
- name: "[Windows] Install dependencies"
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
env:
|
run: |
|
||||||
# Install path of scoop
|
choco install sccache -y
|
||||||
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
|
|
||||||
|
|
||||||
# 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"
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ${{ github.workspace }}/vcpkg/vcpkg${{ env.EXE_SUFFIX }}
|
path: ${{ github.workspace }}/vcpkg/vcpkg${{ env.EXE_SUFFIX }}
|
||||||
key: ${{ matrix.config.id }}-${{ env.VCPKG_COMMIT }}
|
key: ${{ matrix.config.id }}-${{ env.VCPKG_COMMIT }}
|
||||||
|
|
||||||
- name: "[Linux/macOS] Set up wxWidgets cache"
|
- name: "[Linux/macOS] Set up wxWidgets cache"
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
id: wxwidgets-cache
|
id: wxwidgets-cache
|
||||||
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
|
||||||
- name: "[Linux/macOS] Build and install wxWidgets"
|
- name: "[Linux/macOS] Build and install wxWidgets"
|
||||||
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 --build cmake_build
|
cmake -G Ninja -D CMAKE_INSTALL_PREFIX=${{ env.WX_INSTALL_DIR }} \
|
||||||
cmake --install cmake_build
|
-S . -B cmake_build
|
||||||
|
cmake --build cmake_build
|
||||||
|
cmake --install cmake_build
|
||||||
|
|
||||||
- name: Set up compiler cache
|
- name: Set up compiler cache
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ${{ env.COMPILER_CACHE_PATH }}
|
path: ${{ env.COMPILER_CACHE_PATH }}
|
||||||
key: ${{ matrix.config.os }}-${{ matrix.config.arch }}-${{ github.head_ref }}-${{ github.run_number }}
|
key: ${{ matrix.config.os }}-${{ matrix.config.arch }}-${{ github.head_ref }}-${{ github.run_number }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ matrix.config.os }}-${{ matrix.config.arch }}-${{ github.head_ref }}-
|
${{ matrix.config.os }}-${{ matrix.config.arch }}-${{ github.head_ref }}-
|
||||||
${{ matrix.config.os }}-${{ matrix.config.arch }}-
|
${{ matrix.config.os }}-${{ matrix.config.arch }}-
|
||||||
|
|
||||||
- name: Configure
|
- name: Configure
|
||||||
run: cmake -B build -D VCPKG=ON -D CMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/build/install
|
run: cmake -B build -D VCPKG=ON -D CMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/build/install
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} --verbose
|
run: cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} --verbose
|
||||||
|
|
||||||
- name: Print compiler cache stats
|
- name: Print compiler cache stats
|
||||||
run: ${{ env.COMPILER_CACHE}} -s
|
run: ${{ env.COMPILER_CACHE}} -s
|
||||||
|
|
||||||
- name: Install
|
- name: Install
|
||||||
run: cmake --install build --config ${{ env.CMAKE_BUILD_TYPE }} --verbose
|
run: cmake --install build --config ${{ env.CMAKE_BUILD_TYPE }} --verbose
|
||||||
|
|
||||||
- name: Package
|
- name: Package
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{runner.os}}" == "Windows" ]]; then
|
if [[ "${{runner.os}}" == "Windows" ]]; then
|
||||||
cmake --build build --target innosetup --config ${{ env.CMAKE_BUILD_TYPE }}
|
cmake --build build --target innosetup --config ${{ env.CMAKE_BUILD_TYPE }}
|
||||||
else
|
else
|
||||||
cd build
|
cd build
|
||||||
cpack -C ${{ env.CMAKE_BUILD_TYPE }} -D CPACK_COMMAND_HDIUTIL=${{ env.CPACK_COMMAND_HDIUTIL }} --verbose
|
cpack -C ${{ env.CMAKE_BUILD_TYPE }} -D CPACK_COMMAND_HDIUTIL=${{ env.CPACK_COMMAND_HDIUTIL }} --verbose
|
||||||
rm -r package/_CPack_Packages
|
rm -r package/_CPack_Packages
|
||||||
fi
|
fi
|
||||||
env:
|
env:
|
||||||
# Workaround for CPack hdiutil/ finder service race condition bug
|
# Workaround for CPack hdiutil/ finder service race condition bug
|
||||||
CPACK_COMMAND_HDIUTIL: ${{ github.workspace }}/scripts/ci/macos/repeat_hdiutil.sh
|
CPACK_COMMAND_HDIUTIL: ${{ github.workspace }}/scripts/ci/macos/repeat_hdiutil.sh
|
||||||
# Required on Linux to find wxWidgets libraries installed without a package manager
|
# Required on Linux to find wxWidgets libraries installed without a package manager
|
||||||
WXWIDGETS_LD_LIBRARY_PATH: ${{ env.WX_INSTALL_DIR }}/lib
|
WXWIDGETS_LD_LIBRARY_PATH: ${{ env.WX_INSTALL_DIR }}/lib
|
||||||
|
|
||||||
- name: Upload package artifact
|
- name: Upload package artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: Tenacity_${{ matrix.config.id }}_${{ github.run_id }}_${{ env.GIT_HASH_SHORT }}
|
name: Tenacity_${{ matrix.config.id }}_${{ github.run_id }}_${{ env.GIT_HASH_SHORT }}
|
||||||
path: build/package/*
|
path: build/package/*
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload artifact of vcpkg build logs
|
- name: Upload artifact of vcpkg build logs
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
name: vcpkg-logs-${{ matrix.config.id }}
|
name: vcpkg-logs-${{ matrix.config.id }}
|
||||||
path: |
|
path: |
|
||||||
${{ github.workspace }}/vcpkg/buildtrees/**/*.log
|
${{ github.workspace }}/vcpkg/buildtrees/**/*.log
|
||||||
${{ github.workspace }}/build/vcpkg-bootstrap.log
|
${{ github.workspace }}/build/vcpkg-bootstrap.log
|
||||||
if-no-files-found: ignore
|
if-no-files-found: ignore
|
||||||
|
Loading…
x
Reference in New Issue
Block a user