add gcc14 support #115
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
pull_request: | |
release: | |
types: [published] | |
push: | |
tags: | |
branches: | |
- main | |
- master | |
env: | |
CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules | |
CCACHE_BASEDIR: ${{ github.workspace }} | |
CCACHE_DIR: ${{ github.workspace }}/.ccache | |
CCACHE_COMPRESS: true | |
CCACHE_COMPRESSLEVEL: 6 | |
CCACHE_MAXSIZE: 400M | |
jobs: | |
Test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
#- macos-latest | |
#- windows-2022 | |
compiler: | |
# you can specify the version after `-` like "llvm-15.0.2". | |
- llvm-18 | |
- gcc-14 | |
build_type: | |
- Release | |
include: | |
# Windows msvc builds | |
- os: windows-latest | |
compiler: msvc | |
build_type: Release | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
${{ github.workspace }}/.ccache | |
${{ github.workspace }}/cpm_modules | |
${{ matrix.os == 'windows-latest' && 'C:/Users/runneradmin/AppData/Local/Temp/OpenCV' || '' }} | |
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ hashFiles('**/CMakeLists.txt') }} | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.compiler }} | |
- name: Install dependencies (linux) | |
run: | | |
sudo add-apt-repository universe | |
sudo apt-get update | |
sudo apt-get install ninja-build libopencv-dev libpoco-dev | |
sudo apt-get install gcc-14 | |
if: contains(matrix.os, 'ubuntu' ) | |
- name: Install dependencies (windows) | |
run: | | |
choco install opencv --version 4.10.0 -y --package-parameters '/InstallationPath:C:\opencv /Environment' | |
echo "C:\opencv\opencv\build\x64\vc16\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
if: contains(matrix.os, 'windows' ) | |
- name: Setup Cpp | |
uses: aminya/setup-cpp@v1 | |
with: | |
compiler: ${{ matrix.compiler }} | |
vcvarsall: ${{ contains(matrix.os, 'windows' )}} | |
ninja: true | |
ccache: true | |
- name: Configure CMake | |
run: | |
cmake -S . -B ./build -G "Ninja Multi-Config" | |
-DCMAKE_BUILD_TYPE:STRING=${{matrix.build_type}} | |
-DCMAKE_C_COMPILER_LAUNCHER=ccache | |
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache | |
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON | |
-DFAIRYCAM_ENABLE_TESTING=ON | |
${{ matrix.os == 'windows-latest' && '-DOpenCV_DIR="C:/opencv/opencv/build/"' || '' }} | |
- name: Build | |
# Execute the build. You can specify a specific target with "--target <NAME>" | |
run: | | |
cmake --build ./build --config ${{matrix.build_type}} | |
- name: Test | |
working-directory: ${{github.workspace}}/build | |
run: ctest -C ${{matrix.build_type}} --output-on-failure | |
- name: ccache stats | |
run: | | |
ccache -s |