Repair macOS CI workflow ahead of combining all CI workflows (#7350)

* Test

* Fixed Mac image names

* Version lock to macOS 14

* Change name of Homebrew Qt package

* Use CMake to build

* Remove dep already installed

* Remove version source

* Remove env var not needed

* Add homebrew path to CMake presets

* Revert "Add homebrew path to CMake presets"

This reverts commit 6b1342cdc2f412cad3e840e51e3e018dd7470d21.

* Add Qt prefix to workflow

* Upgrade CodeQL analysis to v2

* Rename SonarCloud workflow for convention

* Delete test file

* Upgrade CodeQL analysis to v3
This commit is contained in:
Nick Bolton 2024-06-11 11:48:15 +01:00 committed by GitHub
parent 6bace0d575
commit 444b7d764e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 29 deletions

View file

@ -1,10 +1,9 @@
name: "CodeQL Analysis" name: "CodeQL Analysis"
on: on:
push: workflow_dispatch:
branches: [master]
pull_request: pull_request:
# The branches below must be a subset of the branches above push:
branches: [master] branches: [master]
concurrency: concurrency:
@ -47,23 +46,13 @@ jobs:
- name: Checkout git repo - name: Checkout git repo
uses: actions/checkout@v3 uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v1 uses: github/codeql-action/init@v3
with: with:
languages: ${{ matrix.language }} languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or 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.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild - name: Autobuild
uses: github/codeql-action/autobuild@v1 uses: github/codeql-action/autobuild@v3
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1 uses: github/codeql-action/analyze@v3

View file

@ -23,12 +23,12 @@ jobs:
matrix: matrix:
runtime: runtime:
- name: "macos-10-intel" - name: "macos-10-intel"
os: "macos-latest" os: "macos-14-large"
arch: x64 arch: x64
target: "10.14" target: "10.14"
shell: "bash" shell: "bash"
- name: "macos-11-m1" - name: "macos-11-m1"
os: "macos-latest-xlarge" os: "macos-14"
arch: arm64 arch: arm64
target: "11" target: "11"
shell: "/usr/bin/arch -arch arm64e /bin/bash --noprofile --norc -eo pipefail {0}" shell: "/usr/bin/arch -arch arm64e /bin/bash --noprofile --norc -eo pipefail {0}"
@ -54,20 +54,16 @@ jobs:
with: with:
submodules: "recursive" submodules: "recursive"
- name: Install brew dependencies - name: Install Qt5
run: brew bundle --file=- <<< "brew 'qt5'; brew 'openssl'" run: brew install qt@5
- name: Build - name: Configure
env: env:
CMAKE_OSX_DEPLOYMENT_TARGET: ${{ matrix.runtime.target }} CMAKE_OSX_DEPLOYMENT_TARGET: ${{ matrix.runtime.target }}
run: | run: cmake -B build --preset=macos-release -DCMAKE_PREFIX_PATH=$(brew --prefix qt@5)
mkdir build
cd build - name: Build
cmake \ run: cmake --build build
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="$(brew --prefix qt5);$(brew --prefix openssl)" ..
. ./version
make -j
- name: Run unit test - name: Run unit test
run: ./build/bin/unittests run: ./build/bin/unittests