1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-04-29 23:29:41 +02:00

Update CodeQL runner for vcpkg integration

Signed-off-by: Emily Mabrey <emabrey@tenacityaudio.org>
This commit is contained in:
Emily Mabrey 2021-08-17 21:10:06 -04:00
parent ebd31bb376
commit 18343ef1f2
No known key found for this signature in database
GPG Key ID: 6F4EF47256A1B7DC

View File

@ -33,32 +33,37 @@ on:
jobs: jobs:
analyze: analyze:
name: Analyze name: Analyze
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
AUDACITY_CMAKE_GENERATOR: ${{ matrix.config.generator }} CMAKE_BUILD_TYPE: Release
AUDACITY_ARCH_LABEL: ${{ matrix.config.arch }}
# Windows codesigning # Windows codesigning
# This variables will be used by all the steps
WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }} WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }}
WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }} WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}
# Conan home location to be used for cache action # Apple code signing
CONAN_USER_HOME: "${{ github.workspace }}/conan-home/" APPLE_CODESIGN_IDENTITY: ${{ secrets.APPLE_CODESIGN_IDENTITY }}
CONAN_USER_HOME_SHORT: "${{ github.workspace }}/conan-home/short" APPLE_NOTARIZATION_USER_NAME: ${{ secrets.APPLE_NOTARIZATION_USER_NAME }}
APPLE_NOTARIZATION_PASSWORD: ${{ secrets.APPLE_NOTARIZATION_PASSWORD }}
permissions: permissions:
actions: read actions: read
contents: read contents: read
security-events: write security-events: write
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
config: config:
- name: Ubuntu - name: Ubuntu_20.04
os: ubuntu-latest os: ubuntu-latest
arch: x86_64 arch: x86_64 # as reported by `arch` or `uname -m`
generator: Unix Makefiles compiler_cache: ccache
language: 'cpp' # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] compiler_cache_path: ~/.ccache
language: 'cpp' # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
vcpkg_binary_cache: ~/.cache/vcpkg
vcpkg_triplet: x64-linux
wxwidgets_git_url: https://github.com/wxWidgets/wxWidgets.git
wxwidgets_git_ref: v3.1.5
WX_CONFIG: /home/runner/work/tenacity/tenacity/wxwidgets-install/bin/wx-config
steps: steps:
# Setup 64-bit GCC 11 # Setup 64-bit GCC 11
- name: Set up GCC - name: Set up GCC
@ -69,36 +74,44 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Dependencies
- name: Install dependencies
run: | run: |
exec bash "scripts/ci/dependencies.sh" exec bash "scripts/ci/dependencies.sh"
- name: Environment
- name: Get Git commit of vcpkg submodule
run: echo VCPKG_COMMIT=$(git ls-tree HEAD vcpkg | awk '{print $3}') >> ${GITHUB_ENV}
# FIXME: use wxWidgets from vcpkg for all OSes when bugs are fixed for Linux and macOS
# https://github.com/microsoft/vcpkg/pull/17111
- name: Build and install wxWidgets
if: steps.wxwidgets-cache.outputs.cache-hit != 'true' && runner.os != 'Windows'
run: | run: |
source "scripts/ci/environment.sh" # wxWidgets' build system does not find dependencies from vcpkg, so use its vendored Git submodules
- name: Cache for .conan git clone --recurse-submodules ${{ matrix.config.wxwidgets_git_url }}
id: cache-conan cd wxWidgets
uses: actions/cache@v2 git checkout ${{ matrix.config.wxwidgets_git_ref }}
env: cmake -G Ninja -D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/wxwidgets-install \
cache-name: cache-conan-modules -S . -B cmake_build
with: cmake --build cmake_build
path: ${{ env.CONAN_USER_HOME }} cmake --install cmake_build
key: host-${{ matrix.config.name }}-${{ hashFiles('cmake-proxies/CMakeLists.txt') }}
restore-keys: |
host-${{ matrix.config.name }}-
# Install scdoc with conan TODO: Move conan pkg to own repo
- name: "[Linux] Install scdoc"
if: runner.os == 'Linux'
run: |
conan remote add -f rigs-of-rods-deps https://conan.cloudsmith.io/rigs-of-rods/deps/
conan install scdoc/1.11.1@anotherfoxguy/stable -g=virtualenv --build=missing
- name: Configure - name: Configure
run: >-
cmake
-G Ninja
-D CMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }}
-D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/build/install
-D VCPKG=ON
-S .
-B build
env: env:
# Apple code signing CC: ${{ matrix.config.cc }}
APPLE_CODESIGN_IDENTITY: ${{ secrets.APPLE_CODESIGN_IDENTITY }} CXX: ${{ matrix.config.cxx }}
APPLE_NOTARIZATION_USER_NAME: ${{ secrets.APPLE_NOTARIZATION_USER_NAME }} # hack to get CMake to find wxWidgets until vcpkg wxWidgets port is fixed
APPLE_NOTARIZATION_PASSWORD: ${{ secrets.APPLE_NOTARIZATION_PASSWORD }} # https://github.com/microsoft/vcpkg/pull/17111
run: | WX_CONFIG: ${{ matrix.config.WX_CONFIG }}
exec bash "scripts/ci/configure.sh"
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v1 uses: github/codeql-action/init@v1
@ -108,9 +121,10 @@ jobs:
# By default, queries listed here will override any specified in a config file. # By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file. # Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main # queries: ./path/to/local/query, your-org/your-repo/queries@main
- name: Build - name: Build
run: | run: cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} --verbose
exec bash "scripts/ci/build.sh"
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1 uses: github/codeql-action/analyze@v1