Rename enum true_color_mode in unix code #626
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
# SPDX-License-Identifier: GPL-3.0-only | |
# | |
name: CMake | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
html-docs: | |
runs-on: ubuntu-latest | |
env: | |
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4.1.1 | |
with: | |
submodules: true | |
- name: Set Environment Variables | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); | |
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | |
- name: Run Workflow | |
run: cmake --workflow --preset ci-html-docs | |
- name: Setup ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.7 | |
- name: Setup AsciiDoctor | |
uses: reitzig/actions-asciidoctor@v2.0.2 | |
with: | |
version: 2.0.18 | |
- name: AsciiDoctor version | |
run: asciidoctor --version | |
- name: Run AsciiDoctor | |
run: asciidoctor build-ci-html-docs/hc/src/id.adoc | |
- name: Upload HTML artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: html-docs | |
path: ${{github.workspace}}/build-ci-html-docs/hc/src/id.html | |
build: | |
needs: html-docs | |
strategy: | |
matrix: | |
preset: [ debug, release ] | |
# macos-latest is disabled for now | |
os: [ ubuntu-latest, windows-latest ] | |
runs-on: ${{matrix.os}} | |
env: | |
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4.1.1 | |
with: | |
submodules: true | |
- name: Set Environment Variables | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); | |
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | |
- name: Get HTML documentation | |
uses: actions/download-artifact@v4 | |
with: | |
name: html-docs | |
- name: Run Workflow | |
run: cmake --workflow --preset ci-${{matrix.preset}} | |
- name: Upload msi package artifacts | |
uses: actions/upload-artifact@v4 | |
if: ${{matrix.os == 'windows-latest'}} | |
with: | |
name: Msi-${{matrix.preset}} | |
path: ${{github.workspace}}/build-ci-${{matrix.preset}}/*.msi | |
compression-level: 0 | |
- name: Upload zip package artifacts | |
uses: actions/upload-artifact@v4 | |
if: ${{matrix.os == 'windows-latest'}} | |
with: | |
name: Zip-${{matrix.preset}} | |
path: ${{github.workspace}}/build-ci-${{matrix.preset}}/*.zip | |
compression-level: 0 | |
- name: Upload tar.gz package artifacts | |
uses: actions/upload-artifact@v4 | |
if: ${{matrix.os == 'ubuntu-latest'}} | |
with: | |
name: Tar-${{matrix.preset}} | |
path: ${{github.workspace}}/build-ci-${{matrix.preset}}/*.tar.gz | |
compression-level: 0 | |
cppcheck: | |
name: cppcheck | |
runs-on: ubuntu-latest | |
env: | |
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4.1.1 | |
with: | |
submodules: true | |
- name: Set Environment Variables | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); | |
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | |
- name: Configure Compilation Database | |
run: cmake --preset cppcheck | |
- name: Run CppCheck | |
uses: deep5050/cppcheck-action@v3.0 | |
with: | |
github_token: ${{secrets.GITHUB_TOKEN}} | |
enable: 'style' | |
force: 'enable' | |
other_options: >- | |
--suppress=commaSeparatedReturn | |
--suppress=cstyleCast | |
--suppress=functionStatic | |
--suppress=incorrectStringBooleanError | |
--suppress=invalidPointerCast | |
--suppress=invalidscanf | |
--suppress=variableHidingEnum | |
--suppress=variableScope | |
--inline-suppr | |
-I headers hc common headers unix win32 | |
-ifractint | |
-ivcpkg | |
-i../build-cppcheck/vcpkg_installed | |
- name: Print Report | |
run: cmake -E cat cppcheck_report.txt |