From 933fe0bbe2aaaab2c912843ec47cab4a9cd41aa7 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Tue, 9 Jun 2026 10:58:35 +0800 Subject: [PATCH 1/5] ci: remove Coverity scan workflow (#448) The scheduled Coverity scan has been failing and isn't worth maintaining. Removing the workflow entirely. Co-authored-by: Claude Opus 4.8 --- .github/workflows/coverity.yml | 77 ---------------------------------- 1 file changed, 77 deletions(-) delete mode 100644 .github/workflows/coverity.yml diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml deleted file mode 100644 index bde566e98..000000000 --- a/.github/workflows/coverity.yml +++ /dev/null @@ -1,77 +0,0 @@ -name: Coverity -on: - schedule: - - cron: "0 7 * * 1" - workflow_dispatch: -jobs: - build: - name: Coverity - runs-on: ubuntu-latest - environment: Coverity - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - submodules: 'recursive' - - name: Install package dependencies - id: cmake_and_ninja - shell: cmake -P {0} - run: | - execute_process(COMMAND sudo apt-get update) - execute_process(COMMAND sudo apt-get install libcairo2-dev) - execute_process(COMMAND sudo apt-get install libgtk-3-dev) - execute_process(COMMAND sudo apt-get install ninja-build) - execute_process(COMMAND sudo apt-get install libwebp-dev) - execute_process(COMMAND sudo apt-get install wget) - - name: Download Coverity Build Tool - run: | - wget -q https://scan.coverity.com/download/linux64 --post-data "token=$TOKEN&project=cycfi%2Felements" -O cov-analysis-linux64.tar.gz - mkdir cov-analysis-linux64 - tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64 - env: - TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} - - name: Configure - shell: cmake -P {0} - run: | - set(ENV{CC} gcc) - set(ENV{CXX} g++) - - execute_process( - COMMAND ${CMAKE_COMMAND} - -S . - -B build - -D CMAKE_BUILD_TYPE=$ENV{BUILD_TYPE} - -G Ninja - -D CMAKE_MAKE_PROGRAM=ninja - RESULT_VARIABLE result - ERROR_VARIABLE error_message - ) - - if (NOT result EQUAL 0) - message(FATAL_ERROR "Could not run with ${CMAKE_COMMAND}: Got ${error_message} - ${result}") - endif() - - name: Build - shell: cmake -P {0} - run: | - execute_process( - COMMAND cov-analysis-linux64/bin/cov-build --dir cov-int ${CMAKE_COMMAND} --build build - RESULT_VARIABLE result - ERROR_VARIABLE error_message - ) - - if (NOT result EQUAL 0) - message(FATAL_ERROR "Could not run with ${CMAKE_COMMAND}: Got ${error_message} - ${result}") - endif() - - name: Submit the result to Coverity Scan - run: | - tar czvf elements.tgz cov-int - curl \ - --form token=$TOKEN \ - --form email=$EMAIL \ - --form file=@elements.tgz \ - --form version="master" \ - --form description="master" \ - https://scan.coverity.com/builds?project=cycfi%2Felements - env: - TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} - EMAIL: ${{ secrets.COVERITY_SCAN_EMAIL }} From eef0f54251a9a020dd689c0f7a3857b089417666 Mon Sep 17 00:00:00 2001 From: djowel Date: Sat, 13 Jun 2026 10:52:25 +0800 Subject: [PATCH 2/5] ci: skip build for docs-only changes Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/build.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0a310f076..aa347e530 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,5 +1,11 @@ name: Build -on: [push, pull_request] +on: + push: + paths-ignore: + - 'docs/**' + pull_request: + paths-ignore: + - 'docs/**' env: BUILD_TYPE: Release jobs: From b37728e2fa9f81d2de24892d80ce924d8b678923 Mon Sep 17 00:00:00 2001 From: djowel Date: Sun, 14 Jun 2026 06:37:46 +0800 Subject: [PATCH 3/5] =?UTF-8?q?ci:=20fix=20Windows=20MSVC=20build=20?= =?UTF-8?q?=E2=80=94=20use=20vswhere=20instead=20of=20hardcoded=20VS=20pat?= =?UTF-8?q?h=20Also=20update=20.gitignore=20to=20cover=20build-*/,=20vcpkg?= =?UTF-8?q?=5Finstalled/,=20lib/artist/,=20ai/?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 24 ++++++++++++++---------- .gitignore | 4 ++++ 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aa347e530..3174e24ad 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,6 @@ jobs: os: windows-latest cc: "cl" cxx: "cl" - environment_script: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat" - name: "Ubuntu Latest GCC" os: ubuntu-latest cc: "gcc" @@ -31,9 +30,17 @@ jobs: cxx: "clang++" steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: 'recursive' + - name: Resolve MSVC environment (Windows) + if: runner.os == 'Windows' + shell: pwsh + run: | + $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" + $vsPath = & $vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath + $vcvars = Join-Path $vsPath "VC\Auxiliary\Build\vcvars64.bat" + echo "VCVARS64=$vcvars" >> $env:GITHUB_ENV - name: Cache vcpkg installed libraries uses: actions/cache@v3 with: @@ -79,11 +86,10 @@ jobs: run: | set(ENV{CC} ${{ matrix.config.cc }}) set(ENV{CXX} ${{ matrix.config.cxx }}) - # If we are on windows, run the environment script, parse it with cmake - # and set environment variables with it (required for Visual Studio) - if ("${{ runner.os }}" STREQUAL "Windows" AND NOT "x${{ matrix.config.environment_script }}" STREQUAL "x") + + if ("${{ runner.os }}" STREQUAL "Windows") execute_process( - COMMAND "${{ matrix.config.environment_script }}" && set + COMMAND "$ENV{VCVARS64}" && set OUTPUT_FILE environment_script_output.txt ) file(STRINGS environment_script_output.txt output_lines) @@ -125,11 +131,9 @@ jobs: - name: Build shell: cmake -P {0} run: | - # If we are on windows, run the environment script, parse it with cmake - # and set environment variables with it (required for Visual Studio) - if ("${{ runner.os }}" STREQUAL "Windows" AND NOT "x${{ matrix.config.environment_script }}" STREQUAL "x") + if ("${{ runner.os }}" STREQUAL "Windows") execute_process( - COMMAND "${{ matrix.config.environment_script }}" && set + COMMAND "$ENV{VCVARS64}" && set OUTPUT_FILE environment_script_output.txt ) file(STRINGS environment_script_output.txt output_lines) diff --git a/.gitignore b/.gitignore index c0efa808e..af5457d19 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ xcuserdata/ /.vscode/ /.idea/ /build/ +/build-*/ /cmake-build-debug/ /cmake-build-release/ /.vs/ @@ -34,3 +35,6 @@ xcuserdata/ /docs/antora/node_modules/ /docs/antora/build/ /.cache/ +/vcpkg_installed/ +/lib/artist/ +/ai/ From 145ede789de47196bf4555e53fbdbb12d23a412b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20H=C3=B6ster?= Date: Sun, 21 Jun 2026 01:18:05 +0200 Subject: [PATCH 4/5] Add vcpkg.json manifest for project dependencies my vcpkg wouldn't install the dependencies otherwise --- vcpkg.json | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 vcpkg.json diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 000000000..b543b334b --- /dev/null +++ b/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "elements", + "version-date": "2026-06-20", + "dependencies": ["pkgconf", "cairo", "fontconfig", "freetype", "libwebp"], + "builtin-baseline": "566f9496b7e00ee0cc00aca0ab90493d122d148a" +} From 8a3e2c190f105836bf63d23602f0ce9dbb061068 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20H=C3=B6ster?= Date: Sun, 21 Jun 2026 01:23:22 +0200 Subject: [PATCH 5/5] Fix Clang builds on Windows forcing MultiThreadedDebug runtime in release builds --- cmake/ElementsConfigApp.cmake | 2 +- lib/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/ElementsConfigApp.cmake b/cmake/ElementsConfigApp.cmake index 437d6441a..42c4b29fe 100644 --- a/cmake/ElementsConfigApp.cmake +++ b/cmake/ElementsConfigApp.cmake @@ -100,7 +100,7 @@ elseif (WIN32) if (MSVC) - if (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_C_COMPILER_ID STREQUAL "Clang") + if (CMAKE_BUILD_TYPE STREQUAL "Debug") set_property(TARGET ${ELEMENTS_APP_PROJECT} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreadedDebug" ) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 70543b675..119eb3a2e 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -295,7 +295,7 @@ elseif (WIN32) BOOST_REGEX_NO_LIB ) - if (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_C_COMPILER_ID STREQUAL "Clang") + if (CMAKE_BUILD_TYPE STREQUAL "Debug") set_property(TARGET elements PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreadedDebug" )