From 463edc3c0120c3a2562483f72220bbad77aa59b3 Mon Sep 17 00:00:00 2001 From: Eldred Habert Date: Mon, 13 Apr 2026 19:31:01 +0200 Subject: [PATCH] Enable color output in our Linux and macOS CI tests (#1939) Co-authored-by: Rangi --- .github/workflows/analysis.yml | 6 ++++++ .github/workflows/build-container.yml | 6 ++++++ .github/workflows/checkdiff.yml | 6 ++++++ .github/workflows/checkformat.yml | 6 ++++++ .github/workflows/coverage.yml | 6 ++++++ .github/workflows/create-release-artifacts.yml | 6 +++++- .github/workflows/create-release-docs.yml | 6 ++++++ .github/workflows/testing.yml | 11 ++++++++--- .github/workflows/update-master-docs.yml | 6 ++++++ 9 files changed, 55 insertions(+), 4 deletions(-) diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml index 477172fb..71e16574 100644 --- a/.github/workflows/analysis.yml +++ b/.github/workflows/analysis.yml @@ -3,6 +3,12 @@ on: - push - pull_request +env: + # Force colored output (see https://bixense.com/clicolors/ and https://force-color.org/) + TERM: xterm-256color + CLICOLOR: 1 + CLICOLOR_FORCE: 1 + jobs: analysis: runs-on: ubuntu-latest diff --git a/.github/workflows/build-container.yml b/.github/workflows/build-container.yml index e166553a..05a12a30 100644 --- a/.github/workflows/build-container.yml +++ b/.github/workflows/build-container.yml @@ -6,6 +6,12 @@ on: tags: - '*' +env: + # Force colored output (see https://bixense.com/clicolors/ and https://force-color.org/) + TERM: xterm-256color + CLICOLOR: 1 + CLICOLOR_FORCE: 1 + jobs: publish-docker-image: if: github.repository_owner == 'gbdev' diff --git a/.github/workflows/checkdiff.yml b/.github/workflows/checkdiff.yml index 2f0a32c7..8ee90efd 100644 --- a/.github/workflows/checkdiff.yml +++ b/.github/workflows/checkdiff.yml @@ -1,6 +1,12 @@ name: Diff completeness check on: pull_request +env: + # Force colored output (see https://bixense.com/clicolors/ and https://force-color.org/) + TERM: xterm-256color + CLICOLOR: 1 + CLICOLOR_FORCE: 1 + jobs: checkdiff: runs-on: ubuntu-slim diff --git a/.github/workflows/checkformat.yml b/.github/workflows/checkformat.yml index 84bf441f..3760fba7 100644 --- a/.github/workflows/checkformat.yml +++ b/.github/workflows/checkformat.yml @@ -1,6 +1,12 @@ name: Code format checking on: pull_request +env: + # Force colored output (see https://bixense.com/clicolors/ and https://force-color.org/) + TERM: xterm-256color + CLICOLOR: 1 + CLICOLOR_FORCE: 1 + jobs: checkformat: runs-on: ubuntu-latest diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index f17d1315..ed08bf69 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -3,6 +3,12 @@ on: - push - pull_request +env: + # Force colored output (see https://bixense.com/clicolors/ and https://force-color.org/) + TERM: xterm-256color + CLICOLOR: 1 + CLICOLOR_FORCE: 1 + jobs: coverage: runs-on: ubuntu-24.04 diff --git a/.github/workflows/create-release-artifacts.yml b/.github/workflows/create-release-artifacts.yml index 60abbd09..4e17714c 100644 --- a/.github/workflows/create-release-artifacts.yml +++ b/.github/workflows/create-release-artifacts.yml @@ -5,7 +5,11 @@ on: - v[0-9]* env: - CLICOLOR_FORCE: 1 # Tells CMake to have colored output. + # Force colored output (see https://bixense.com/clicolors/ and https://force-color.org/) + TERM: xterm-256color + CLICOLOR: 1 + CLICOLOR_FORCE: 1 + CMAKE_COLOR_DIAGNOSTICS: ON # Tells CMake-generated build systems to have colored output. # Approximate number of CPU cores in GitHub's runners as of 2026-03-18: # https://docs.github.com/en/actions/reference/runners/github-hosted-runners#standard-github-hosted-runners-for-public-repositories diff --git a/.github/workflows/create-release-docs.yml b/.github/workflows/create-release-docs.yml index ff2d5064..b849d8b5 100644 --- a/.github/workflows/create-release-docs.yml +++ b/.github/workflows/create-release-docs.yml @@ -4,6 +4,12 @@ on: types: - released # This avoids triggering on pre-releases +env: + # Force colored output (see https://bixense.com/clicolors/ and https://force-color.org/) + TERM: xterm-256color + CLICOLOR: 1 + CLICOLOR_FORCE: 1 + jobs: build: if: github.repository_owner == 'gbdev' diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index f3391d94..2213f1a7 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -4,7 +4,11 @@ on: - pull_request env: - CLICOLOR_FORCE: 1 # Tells CMake to have colored output. + # Force colored output (see https://bixense.com/clicolors/ and https://force-color.org/) + TERM: xterm-256color + CLICOLOR: 1 + CLICOLOR_FORCE: 1 + CMAKE_COLOR_DIAGNOSTICS: ON # Tells CMake-generated build systems to have colored output. CMAKE_CONFIG_TYPE: Debug # `cmake --build` now implies `--config Debug`. # Approximate number of CPU cores in GitHub's runners as of 2026-03-18: @@ -362,8 +366,9 @@ jobs: uses: vmactions/freebsd-vm@v1 with: envs: >- - CLICOLOR_FORCE CMAKE_COLOR_DIAGNOSTICS CMAKE_CONFIG_TYPE - CMAKE_BUILD_PARALLEL_LEVEL CMAKE_INSTALL_PARALLEL_LEVEL CTEST_PARALLEL_LEVEL + TERM CLICOLOR CLICOLOR_FORCE + CMAKE_COLOR_DIAGNOSTICS CMAKE_CONFIG_TYPE + CMAKE_BUILD_PARALLEL_LEVEL CTEST_PARALLEL_LEVEL CTEST_NO_TESTS_ACTION CTEST_OUTPUT_ON_FAILURE GIT_CONFIG_COUNT GIT_CONFIG_KEY_0 GIT_CONFIG_VALUE_0 release: "14.3" diff --git a/.github/workflows/update-master-docs.yml b/.github/workflows/update-master-docs.yml index 9b9a3830..6c9986d8 100644 --- a/.github/workflows/update-master-docs.yml +++ b/.github/workflows/update-master-docs.yml @@ -7,6 +7,12 @@ on: - man/* workflow_dispatch: +env: + # Force colored output (see https://bixense.com/clicolors/ and https://force-color.org/) + TERM: xterm-256color + CLICOLOR: 1 + CLICOLOR_FORCE: 1 + jobs: build: if: github.repository_owner == 'gbdev'