From f8b5f8f67686648ae7a564646407d2bff28be5be Mon Sep 17 00:00:00 2001 From: KubaZ2 Date: Sat, 13 Sep 2025 18:49:29 +0200 Subject: [PATCH 01/16] Add macOS builds --- .github/workflows/cmake.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 3a18ca2..2c148e9 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -15,7 +15,7 @@ jobs: fail-fast: false matrix: - os: [ubuntu-24.04, ubuntu-24.04-arm, windows-2025] + os: [ubuntu-24.04, ubuntu-24.04-arm, windows-2025, macos-13, macos-26] cpp_compiler: [g++, clang++, cl] build_shared_libs: [ON] include: @@ -29,6 +29,14 @@ jobs: cpp_compiler: clang++ - os: windows-2025 cpp_compiler: cl + - os: macos-13 + cpp_compiler: g++ + - os: macos-13 + cpp_compiler: clang++ + - os: macos-26 + cpp_compiler: g++ + - os: macos-26 + cpp_compiler: clang++ exclude: - os: ubuntu-24.04 cpp_compiler: cl @@ -38,6 +46,10 @@ jobs: cpp_compiler: g++ - os: windows-2025 cpp_compiler: clang++ + - os: macos-13 + cpp_compiler: cl + - os: macos-26 + cpp_compiler: cl steps: - uses: actions/checkout@v4 @@ -51,6 +63,11 @@ jobs: sudo apt-get update sudo apt-get install nasm + - name: Install Required Packages + if: matrix.os == 'macos-13' || matrix.os == 'macos-26' + run: | + brew install nasm + - name: Set reusable strings # Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. id: strings From 94214d812f009c3e99b91b5452029268c08b725d Mon Sep 17 00:00:00 2001 From: KubaZ2 Date: Sat, 13 Sep 2025 18:51:49 +0200 Subject: [PATCH 02/16] Install go for macOS --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 2c148e9..f73693e 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -66,7 +66,7 @@ jobs: - name: Install Required Packages if: matrix.os == 'macos-13' || matrix.os == 'macos-26' run: | - brew install nasm + brew install nasm go - name: Set reusable strings # Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. From f1244f762d9027ef80e8c206fc2b2e1023fd138a Mon Sep 17 00:00:00 2001 From: KubaZ2 Date: Sat, 13 Sep 2025 19:37:24 +0200 Subject: [PATCH 03/16] Uninstall openssl on macOS --- .github/workflows/cmake.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index f73693e..c18e035 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -57,15 +57,16 @@ jobs: submodules: recursive fetch-depth: 0 - - name: Install Required Packages + - name: Setup Packages if: matrix.os == 'ubuntu-24.04' || matrix.os == 'ubuntu-24.04-arm' run: | sudo apt-get update sudo apt-get install nasm - - name: Install Required Packages + - name: Setup Packages if: matrix.os == 'macos-13' || matrix.os == 'macos-26' run: | + brew uninstall openssl brew install nasm go - name: Set reusable strings From e7ff1d500e1789df58a6a5b08de3f9a2ad495268 Mon Sep 17 00:00:00 2001 From: KubaZ2 Date: Sat, 13 Sep 2025 19:39:58 +0200 Subject: [PATCH 04/16] Add a flag for brew uninstall --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index c18e035..2c87ecb 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -66,7 +66,7 @@ jobs: - name: Setup Packages if: matrix.os == 'macos-13' || matrix.os == 'macos-26' run: | - brew uninstall openssl + brew uninstall --ignore-dependencies openssl brew install nasm go - name: Set reusable strings From f4e42818fb6d9d19c6b89778f1dc542192b1ae20 Mon Sep 17 00:00:00 2001 From: KubaZ2 Date: Sat, 13 Sep 2025 19:46:27 +0200 Subject: [PATCH 05/16] Install ninja on macOS --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 2c87ecb..ca0d209 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -67,7 +67,7 @@ jobs: if: matrix.os == 'macos-13' || matrix.os == 'macos-26' run: | brew uninstall --ignore-dependencies openssl - brew install nasm go + brew install nasm go ninja - name: Set reusable strings # Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. From 27c92c9a0d83ad0be50389c16205c433bbaf8586 Mon Sep 17 00:00:00 2001 From: KubaZ2 Date: Sat, 13 Sep 2025 19:49:35 +0200 Subject: [PATCH 06/16] Install make instead of ninja --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index ca0d209..489d217 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -67,7 +67,7 @@ jobs: if: matrix.os == 'macos-13' || matrix.os == 'macos-26' run: | brew uninstall --ignore-dependencies openssl - brew install nasm go ninja + brew install nasm go make - name: Set reusable strings # Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. From cb1d5b02540e2451cd97df521d94e22ace3a691b Mon Sep 17 00:00:00 2001 From: KubaZ2 Date: Sat, 13 Sep 2025 19:53:12 +0200 Subject: [PATCH 07/16] Add make to path on macOS --- .github/workflows/cmake.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 489d217..f1e84de 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -68,6 +68,7 @@ jobs: run: | brew uninstall --ignore-dependencies openssl brew install nasm go make + echo "/usr/local/opt/make/libexec/gnubin" >> $GITHUB_PATH - name: Set reusable strings # Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. From 80a4be45e5c3b63c4d6f4fdbc1559fda16d407ed Mon Sep 17 00:00:00 2001 From: KubaZ2 Date: Sat, 13 Sep 2025 19:56:05 +0200 Subject: [PATCH 08/16] Set CMAKE_MAKE_PROGRAM --- .github/workflows/cmake.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index f1e84de..f28b535 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -69,6 +69,7 @@ jobs: brew uninstall --ignore-dependencies openssl brew install nasm go make echo "/usr/local/opt/make/libexec/gnubin" >> $GITHUB_PATH + echo "CMAKE_MAKE_PROGRAM=/usr/local/opt/make/libexec/gnubin/make" >> $GITHUB_ENV - name: Set reusable strings # Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. From 078124fec703b6fc7617212a7bc2c10706a7613d Mon Sep 17 00:00:00 2001 From: KubaZ2 Date: Sat, 13 Sep 2025 20:01:39 +0200 Subject: [PATCH 09/16] Drop macOS 13 --- .github/workflows/cmake.yml | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index f28b535..7b76328 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -15,7 +15,7 @@ jobs: fail-fast: false matrix: - os: [ubuntu-24.04, ubuntu-24.04-arm, windows-2025, macos-13, macos-26] + os: [ubuntu-24.04, ubuntu-24.04-arm, windows-2025, macos-26] cpp_compiler: [g++, clang++, cl] build_shared_libs: [ON] include: @@ -29,10 +29,6 @@ jobs: cpp_compiler: clang++ - os: windows-2025 cpp_compiler: cl - - os: macos-13 - cpp_compiler: g++ - - os: macos-13 - cpp_compiler: clang++ - os: macos-26 cpp_compiler: g++ - os: macos-26 @@ -46,8 +42,6 @@ jobs: cpp_compiler: g++ - os: windows-2025 cpp_compiler: clang++ - - os: macos-13 - cpp_compiler: cl - os: macos-26 cpp_compiler: cl @@ -64,12 +58,9 @@ jobs: sudo apt-get install nasm - name: Setup Packages - if: matrix.os == 'macos-13' || matrix.os == 'macos-26' + if: matrix.os == 'macos-26' run: | - brew uninstall --ignore-dependencies openssl - brew install nasm go make - echo "/usr/local/opt/make/libexec/gnubin" >> $GITHUB_PATH - echo "CMAKE_MAKE_PROGRAM=/usr/local/opt/make/libexec/gnubin/make" >> $GITHUB_ENV + brew install nasm go - name: Set reusable strings # Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. From b7f3befa27fab211340bcad648eccb0b56e02e2b Mon Sep 17 00:00:00 2001 From: KubaZ2 Date: Sat, 13 Sep 2025 20:25:48 +0200 Subject: [PATCH 10/16] Strip symbols on macOS --- .github/workflows/cmake.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 7b76328..3176a45 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -126,6 +126,11 @@ jobs: run: | rm ${{ steps.strings.outputs.build-output-dir }}/out/libdavec.pdb + - name: Strip Symbols + if: matrix.os == 'macos-26' + run: | + strip ${{ steps.strings.outputs.build-output-dir }}/out/libdavec.dylib + - name: Upload Artifacts without Symbols uses: actions/upload-artifact@v4 with: From f70e8097ae984e1ab8fa32b257512f8884af0566 Mon Sep 17 00:00:00 2001 From: KubaZ2 Date: Sat, 13 Sep 2025 20:39:09 +0200 Subject: [PATCH 11/16] Fix strip for macOS --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 3176a45..f0923f1 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -129,7 +129,7 @@ jobs: - name: Strip Symbols if: matrix.os == 'macos-26' run: | - strip ${{ steps.strings.outputs.build-output-dir }}/out/libdavec.dylib + strip -S ${{ steps.strings.outputs.build-output-dir }}/out/libdavec.dylib - name: Upload Artifacts without Symbols uses: actions/upload-artifact@v4 From 8db28b347d82808eb30470f48dcbbe2de434f8d9 Mon Sep 17 00:00:00 2001 From: KubaZ2 Date: Sat, 13 Sep 2025 21:02:16 +0200 Subject: [PATCH 12/16] Strip on macos more aggresively --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index f0923f1..d4c886d 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -129,7 +129,7 @@ jobs: - name: Strip Symbols if: matrix.os == 'macos-26' run: | - strip -S ${{ steps.strings.outputs.build-output-dir }}/out/libdavec.dylib + strip -x ${{ steps.strings.outputs.build-output-dir }}/out/libdavec.dylib - name: Upload Artifacts without Symbols uses: actions/upload-artifact@v4 From 3fa5671f34d0133744bfb89736ceeeaad30bec2e Mon Sep 17 00:00:00 2001 From: KubaZ2 Date: Sat, 13 Sep 2025 21:32:32 +0200 Subject: [PATCH 13/16] Remove g++ builds --- .github/workflows/cmake.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index d4c886d..35f297d 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -16,21 +16,15 @@ jobs: matrix: os: [ubuntu-24.04, ubuntu-24.04-arm, windows-2025, macos-26] - cpp_compiler: [g++, clang++, cl] + cpp_compiler: [clang++, cl] build_shared_libs: [ON] include: - - os: ubuntu-24.04 - cpp_compiler: g++ - os: ubuntu-24.04 cpp_compiler: clang++ - - os: ubuntu-24.04-arm - cpp_compiler: g++ - os: ubuntu-24.04-arm cpp_compiler: clang++ - os: windows-2025 cpp_compiler: cl - - os: macos-26 - cpp_compiler: g++ - os: macos-26 cpp_compiler: clang++ exclude: @@ -38,8 +32,6 @@ jobs: cpp_compiler: cl - os: ubuntu-24.04-arm cpp_compiler: cl - - os: windows-2025 - cpp_compiler: g++ - os: windows-2025 cpp_compiler: clang++ - os: macos-26 From c5b29d7860e607d650c2a88b19de86b1e0ea4a83 Mon Sep 17 00:00:00 2001 From: KubaZ2 Date: Sat, 13 Sep 2025 21:44:24 +0200 Subject: [PATCH 14/16] Simplify matrix --- .github/workflows/cmake.yml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 35f297d..c9d282c 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -11,12 +11,9 @@ jobs: runs-on: ${{ matrix.os }} strategy: - # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. fail-fast: false matrix: - os: [ubuntu-24.04, ubuntu-24.04-arm, windows-2025, macos-26] - cpp_compiler: [clang++, cl] build_shared_libs: [ON] include: - os: ubuntu-24.04 @@ -27,15 +24,6 @@ jobs: cpp_compiler: cl - os: macos-26 cpp_compiler: clang++ - exclude: - - os: ubuntu-24.04 - cpp_compiler: cl - - os: ubuntu-24.04-arm - cpp_compiler: cl - - os: windows-2025 - cpp_compiler: clang++ - - os: macos-26 - cpp_compiler: cl steps: - uses: actions/checkout@v4 @@ -55,7 +43,6 @@ jobs: brew install nasm go - name: Set reusable strings - # Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. id: strings shell: bash run: | @@ -78,7 +65,6 @@ jobs: SOURCE_DIR=${{ github.workspace }} - name: Build - # Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). run: > make build CONFIG=${{ steps.strings.outputs.build-type }} @@ -87,8 +73,6 @@ jobs: - name: Test working-directory: ${{ steps.strings.outputs.build-output-dir }} - # Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). - # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: ctest --build-config ${{ steps.strings.outputs.build-type }} - name: Move Build Output From 36dea60aed13a6220f75fd28237a496d1bba3ce3 Mon Sep 17 00:00:00 2001 From: KubaZ2 Date: Sat, 13 Sep 2025 21:47:30 +0200 Subject: [PATCH 15/16] Fix matrix --- .github/workflows/cmake.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index c9d282c..914fbbc 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -14,16 +14,18 @@ jobs: fail-fast: false matrix: + os: [ubuntu-24.04, ubuntu-24.04-arm, windows-2025, macos-26] + cpp_compiler: [clang++, cl] build_shared_libs: [ON] - include: + exclude: - os: ubuntu-24.04 - cpp_compiler: clang++ + cpp_compiler: cl - os: ubuntu-24.04-arm - cpp_compiler: clang++ - - os: windows-2025 cpp_compiler: cl - - os: macos-26 + - os: windows-2025 cpp_compiler: clang++ + - os: macos-26 + cpp_compiler: cl steps: - uses: actions/checkout@v4 From fef009eaf5e940c03297ca4cf6c38fed94ab4910 Mon Sep 17 00:00:00 2001 From: KubaZ2 Date: Sat, 13 Sep 2025 21:56:33 +0200 Subject: [PATCH 16/16] Refactor CI and improve artifact names --- .github/workflows/cmake.yml | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 914fbbc..2b905d8 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -15,17 +15,15 @@ jobs: matrix: os: [ubuntu-24.04, ubuntu-24.04-arm, windows-2025, macos-26] - cpp_compiler: [clang++, cl] - build_shared_libs: [ON] - exclude: + include: - os: ubuntu-24.04 - cpp_compiler: cl + cpp_compiler: clang++ - os: ubuntu-24.04-arm - cpp_compiler: cl - - os: windows-2025 cpp_compiler: clang++ - - os: macos-26 + - os: windows-2025 cpp_compiler: cl + - os: macos-26 + cpp_compiler: clang++ steps: - uses: actions/checkout@v4 @@ -34,13 +32,13 @@ jobs: fetch-depth: 0 - name: Setup Packages - if: matrix.os == 'ubuntu-24.04' || matrix.os == 'ubuntu-24.04-arm' + if: runner.os == 'Linux' run: | sudo apt-get update sudo apt-get install nasm - name: Setup Packages - if: matrix.os == 'macos-26' + if: runner.os == 'macOS' run: | brew install nasm go @@ -52,6 +50,7 @@ jobs: echo "vcpkg-manifest-dir=${{ github.workspace }}/libdave/cpp/vcpkg-alts/boringssl" >> "$GITHUB_OUTPUT" echo "cmake-toolchain-file=${{ github.workspace }}/libdave/cpp/vcpkg/scripts/buildsystems/vcpkg.cmake" >> "$GITHUB_OUTPUT" echo "build-type=Release" >> "$GITHUB_OUTPUT" + echo "build-shared-libs=ON" >> "$GITHUB_OUTPUT" echo "pdb=ON" >> "$GITHUB_OUTPUT" - name: Configure CMake @@ -62,7 +61,7 @@ jobs: CONFIG=${{ steps.strings.outputs.build-type }} VCPKG_MANIFEST_DIR=${{ steps.strings.outputs.vcpkg-manifest-dir }} TOOLCHAIN_FILE=${{ steps.strings.outputs.cmake-toolchain-file }} - SHARED=${{ matrix.build_shared_libs }} + SHARED=${{ steps.strings.outputs.build-shared-libs }} PDB=${{ steps.strings.outputs.pdb }} SOURCE_DIR=${{ github.workspace }} @@ -78,7 +77,7 @@ jobs: run: ctest --build-config ${{ steps.strings.outputs.build-type }} - name: Move Build Output - if: matrix.os == 'windows-2025' + if: runner.os == 'Windows' run: | mv ${{ steps.strings.outputs.build-output-dir }}/out/${{ steps.strings.outputs.build-type }}/* ${{ steps.strings.outputs.build-output-dir }}/out/ rm ${{ steps.strings.outputs.build-output-dir }}/out/${{ steps.strings.outputs.build-type }}/ @@ -90,28 +89,28 @@ jobs: - name: Upload Artifacts with Symbols uses: actions/upload-artifact@v4 with: - name: libdavec-${{ matrix.os }}-${{ matrix.cpp_compiler }}-shared${{ matrix.build_shared_libs }}-symbolsON + name: libdavec-${{ runner.os }}-${{ runner.arch }}-symbols path: | ${{ steps.strings.outputs.build-output-dir }}/out/ - name: Strip Symbols - if: matrix.os == 'ubuntu-24.04' || matrix.os == 'ubuntu-24.04-arm' + if: runner.os == 'Linux' run: | strip ${{ steps.strings.outputs.build-output-dir }}/out/libdavec.so - name: Strip Symbols - if: matrix.os == 'windows-2025' + if: runner.os == 'Windows' run: | rm ${{ steps.strings.outputs.build-output-dir }}/out/libdavec.pdb - name: Strip Symbols - if: matrix.os == 'macos-26' + if: runner.os == 'macOS' run: | strip -x ${{ steps.strings.outputs.build-output-dir }}/out/libdavec.dylib - name: Upload Artifacts without Symbols uses: actions/upload-artifact@v4 with: - name: libdavec-${{ matrix.os }}-${{ matrix.cpp_compiler }}-shared${{ matrix.build_shared_libs }}-symbolsOFF + name: libdavec-${{ runner.os }}-${{ runner.arch }} path: | ${{ steps.strings.outputs.build-output-dir }}/out/