Skip to content

Commit

Permalink
Tools update (#1395)
Browse files Browse the repository at this point in the history
* version updates

bleeding edge builds Qt 6.8.0 -> 6.8.1.
macos-15 Xcode 16.0 -> 16.1.
aqt 3.1.19 is required for Qt 6.8.1
cmake 3.21.1 is required by Qt for targeting Apple platforms.
python 3.12 is recommened for aqt.

* quote pip argument

* run codeql on noble

* use aqt 3.1.20

which can find qtwebengine, qtpdf with 6.8.

* update codeql workflow

* use preview windows-2025 runner.

* add action language for codeql

* manually install innosetup on windows-2025

* correct typo

* actions uses buildtype none

* xcode 15.2
  • Loading branch information
tsteven4 authored Dec 23, 2024
1 parent a228aa5 commit b7bd532
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 38 deletions.
6 changes: 6 additions & 0 deletions .github/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
paths-ignore:
- coverity_model.cc
- deprecated
- reference
- 'shapelib/*.html'
- '**/gpsbabel*.ts'
73 changes: 46 additions & 27 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
name: "CodeQL Advanced"

on:
push:
Expand All @@ -22,32 +22,47 @@ on:

jobs:
analyze:
name: Analyze
name: Analyze (${{ matrix.runs-on }},${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners
# Consider using larger runners for possible analysis time improvements.
runs-on: ubuntu-latest
timeout-minutes: 360
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ matrix.runs-on }}
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read
security-events: write
container:
image: gpsbabel-docker.jfrog.io/tsteven4/gpsbabel_build_environment_jammy
image: ${{ matrix.image || '' }}
env:
CMAKE_GENERATOR: Ninja

strategy:
fail-fast: false
matrix:
language: [ 'c-cpp' ]
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

include:
- language: c-cpp
build-mode: autobuild
image: gpsbabel-docker.jfrog.io/tsteven4/gpsbabel_build_environment_noble
runs-on: ubuntu-latest
- language: actions
build-mode: none
runs-on: ubuntu-latest
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -57,28 +72,32 @@ jobs:
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
config-file: ./.github/codeql-config.yml
# 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.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

#- run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
4 changes: 2 additions & 2 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ jobs:
GENERATOR: 'Ninja'
RELEASE: true
os: macos-14
- QT_VERSION: '6.8.0'
XCODE_VERSION: '16.0'
- QT_VERSION: '6.8.1'
XCODE_VERSION: '16.2'
GENERATOR: 'Ninja'
RELEASE: false
os: macos-15
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ jobs:
RELEASE: true
GENERATOR: 'Ninja'
os: windows-latest
- QT_VERSION: '6.8.0'
- QT_VERSION: '6.8.1'
ARCH: 'amd64'
HOST_ARCH: 'amd64'
COMPILER: 'msvc2022_64'
METHOD: 'aqt'
RELEASE: false
GENERATOR: 'Ninja'
os: windows-latest
os: windows-2025

steps:
- name: Checkout repository
Expand All @@ -78,7 +78,7 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.12'

- name: Install Qt
if: steps.cache.outputs.cache-hit != 'true'
Expand All @@ -88,6 +88,10 @@ jobs:
run: |
./tools/ci_install_windows.sh "${{ matrix.QT_VERSION }}" "${{ matrix.COMPILER }}" "${{ matrix.METHOD }}"
- name: Install Inno Setup
if: matrix.os == 'windows-2025'
run: choco install innosetup

- name: Build
shell: powershell
run: |
Expand Down
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
cmake_minimum_required(VERSION 3.16)
if(APPLE)
cmake_minimum_required(VERSION 3.21.1)
else()
cmake_minimum_required(VERSION 3.16)
endif()

include(CMakeDependentOption)
include(CheckIncludeFile)
Expand Down
2 changes: 1 addition & 1 deletion tools/ci_install_osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ else
fi
)
elif [ "$METHOD" = "aqt" ]; then
pip3 install aqtinstall>=2.0.0
pip3 install 'aqtinstall>=3.1.20'
"${CI_BUILD_DIR}/tools/ci_install_qt.sh" mac "${QT_VERSION}" clang_64 "${CACHEDIR}/Qt"
echo "export PATH=${QTDIR}/bin:\$PATH" > "${CACHEDIR}/qt-${QT_VERSION}.env"
else
Expand Down
6 changes: 3 additions & 3 deletions tools/ci_install_qt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# install Qt
#
# Examples:
# ci_install_qt.sh mac 6.2.0 clang_64 /tmp/Qt
# ci_install_qt.sh windows 6.2.0 win64_msvc2019_64 /tmp/Qt
# ci_install_qt.sh linux 6.2.0 gcc_64 /tmp/Qt
# ci_install_qt.sh mac 6.8.1 clang_64 /tmp/Qt
# ci_install_qt.sh windows 6.8.1 win64_msvc2022_64 /tmp/Qt
# ci_install_qt.sh linux 6.8.1 linux_gcc_64 /tmp/Qt

host=$1
version=$2
Expand Down
2 changes: 1 addition & 1 deletion tools/ci_install_windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ else
mkdir -p "${CACHEDIR}"

if [ "${METHOD}" = "aqt" ]; then
pip3 install aqtinstall>=2.0.0
pip3 install 'aqtinstall>=3.1.20'
"${CI_BUILD_DIR}/tools/ci_install_qt.sh" windows "${QT_VERSION}" "${PACKAGE_SUFFIX}" "${CACHEDIR}/Qt"
echo "export PATH=${QTDIR}/bin:\$PATH" > "${CACHEDIR}/qt.env"
else
Expand Down

0 comments on commit b7bd532

Please sign in to comment.