From d9cb1fea2748d54dd1e62862afdd5a1ba2b5aeec Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Sun, 5 Jan 2025 14:45:33 +0100 Subject: [PATCH 01/16] libmatroska2: detect Windows ARM64 in minilzo --- libmatroska2/minilzo/lzodefs.h | 3 +++ libmatroska2/minilzo/minilzo.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libmatroska2/minilzo/lzodefs.h b/libmatroska2/minilzo/lzodefs.h index 18056372..91bc49df 100644 --- a/libmatroska2/minilzo/lzodefs.h +++ b/libmatroska2/minilzo/lzodefs.h @@ -674,6 +674,9 @@ #elif defined(__arm__) || defined(_M_ARM) # define LZO_ARCH_ARM 1 # define LZO_INFO_ARCH "arm" +#elif defined(_M_ARM64) +//# define LZO_ARCH_ARM 1 +# define LZO_INFO_ARCH "arm64" #elif (UINT_MAX <= LZO_0xffffL) && defined(__AVR__) # define LZO_ARCH_AVR 1 # define LZO_INFO_ARCH "avr" diff --git a/libmatroska2/minilzo/minilzo.c b/libmatroska2/minilzo/minilzo.c index 6a62b31b..b2175787 100644 --- a/libmatroska2/minilzo/minilzo.c +++ b/libmatroska2/minilzo/minilzo.c @@ -695,6 +695,9 @@ #elif defined(__arm__) || defined(_M_ARM) # define LZO_ARCH_ARM 1 # define LZO_INFO_ARCH "arm" +#elif defined(_M_ARM64) +//# define LZO_ARCH_ARM 1 +# define LZO_INFO_ARCH "arm64" #elif (UINT_MAX <= LZO_0xffffL) && defined(__AVR__) # define LZO_ARCH_AVR 1 # define LZO_INFO_ARCH "avr" @@ -4109,4 +4112,3 @@ DO_DECOMPRESS ( const lzo_bytep in , lzo_uint in_len, #endif /***** End of minilzo.c *****/ - From a29bc0b010f2ce382892d5b433670aa833d98827 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Sun, 5 Jan 2025 15:25:19 +0100 Subject: [PATCH 02/16] libmatroska2: disable build static zlib It doesn't build properly with clang-cl and we don't need it. --- libmatroska2/CMakeLists.txt | 6 +- .../0001-CMake-don-t-build-dynamic-zlib.patch | 81 +++++++++++++++++++ 2 files changed, 84 insertions(+), 3 deletions(-) create mode 100644 libmatroska2/zlib/0001-CMake-don-t-build-dynamic-zlib.patch diff --git a/libmatroska2/CMakeLists.txt b/libmatroska2/CMakeLists.txt index 0cec3dfe..3974482b 100644 --- a/libmatroska2/CMakeLists.txt +++ b/libmatroska2/CMakeLists.txt @@ -15,9 +15,9 @@ if (CONFIG_ZLIB) FetchContent_Declare( zlib - URL "https://github.com/madler/zlib/releases/download/v1.3.1/zlib-1.3.1.tar.gz" - URL_HASH SHA512=580677aad97093829090d4b605ac81c50327e74a6c2de0b85dd2e8525553f3ddde17556ea46f8f007f89e435493c9a20bc997d1ef1c1c2c23274528e3c46b94f - DOWNLOAD_EXTRACT_TIMESTAMP TRUE + GIT_REPOSITORY https://github.com/madler/zlib.git + GIT_TAG 51b7f2abdade71cd9bb0e7a373ef2610ec6f9daf # 1.3.1 tag + PATCH_COMMAND git apply "${CMAKE_CURRENT_SOURCE_DIR}/zlib/0001-CMake-don-t-build-dynamic-zlib.patch" ) FetchContent_MakeAvailable(zlib) diff --git a/libmatroska2/zlib/0001-CMake-don-t-build-dynamic-zlib.patch b/libmatroska2/zlib/0001-CMake-don-t-build-dynamic-zlib.patch new file mode 100644 index 00000000..a968e315 --- /dev/null +++ b/libmatroska2/zlib/0001-CMake-don-t-build-dynamic-zlib.patch @@ -0,0 +1,81 @@ +From 4cb6185abc1f6a4fec7d6e7e1ed1a607e0ec1511 Mon Sep 17 00:00:00 2001 +From: Steve Lhomme +Date: Sun, 5 Jan 2025 15:22:00 +0100 +Subject: [PATCH] CMake: don't build dynamic zlib + +--- + CMakeLists.txt | 33 ++++++--------------------------- + 1 file changed, 6 insertions(+), 27 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 15ceebe..55122a2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -149,37 +149,16 @@ if(MINGW) + set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) + endif(MINGW) + +-add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) +-target_include_directories(zlib PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) + add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) + target_include_directories(zlibstatic PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) +-set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL) +-set_target_properties(zlib PROPERTIES SOVERSION 1) +- +-if(NOT CYGWIN) +- # This property causes shared libraries on Linux to have the full version +- # encoded into their final filename. We disable this on Cygwin because +- # it causes cygz-${ZLIB_FULL_VERSION}.dll to be created when cygz.dll +- # seems to be the default. +- # +- # This has no effect with MSVC, on that platform the version info for +- # the DLL comes from the resource file win32/zlib1.rc +- set_target_properties(zlib PROPERTIES VERSION ${ZLIB_FULL_VERSION}) +-endif() + + if(UNIX) + # On unix-like platforms the library is almost always called libz +- set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z) +- if(NOT APPLE AND NOT(CMAKE_SYSTEM_NAME STREQUAL AIX)) +- set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"") +- endif() +-elseif(BUILD_SHARED_LIBS AND WIN32) +- # Creates zlib1.dll when building shared library version +- set_target_properties(zlib PROPERTIES SUFFIX "1.dll") ++ set_target_properties(zlibstatic PROPERTIES OUTPUT_NAME z) + endif() + + if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) +- install(TARGETS zlib zlibstatic ++ install(TARGETS zlibstatic + RUNTIME DESTINATION "${INSTALL_BIN_DIR}" + ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" + LIBRARY DESTINATION "${INSTALL_LIB_DIR}" ) +@@ -199,20 +178,20 @@ endif() + #============================================================================ + if(ZLIB_BUILD_EXAMPLES) + add_executable(example test/example.c) +- target_link_libraries(example zlib) ++ target_link_libraries(example zlibstatic) + add_test(example example) + + add_executable(minigzip test/minigzip.c) +- target_link_libraries(minigzip zlib) ++ target_link_libraries(minigzip zlibstatic) + + if(HAVE_OFF64_T) + add_executable(example64 test/example.c) +- target_link_libraries(example64 zlib) ++ target_link_libraries(example64 zlibstatic) + set_target_properties(example64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") + add_test(example64 example64) + + add_executable(minigzip64 test/minigzip.c) +- target_link_libraries(minigzip64 zlib) ++ target_link_libraries(minigzip64 zlibstatic) + set_target_properties(minigzip64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") + endif() + endif() +-- +2.39.5 (Apple Git-154) + From 03cb626712fcb6bb91afc3a523756d4bd7eab517 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Sun, 5 Jan 2025 13:37:35 +0100 Subject: [PATCH 03/16] CI: list Ubuntu compilers --- .github/workflows/generate-tools.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/generate-tools.yaml b/.github/workflows/generate-tools.yaml index 994f096f..2fa4ce74 100644 --- a/.github/workflows/generate-tools.yaml +++ b/.github/workflows/generate-tools.yaml @@ -5,7 +5,7 @@ on: - 'spectool/**' jobs: - build_tools_win32: + build_tools: name: Build all tools for ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: @@ -23,6 +23,10 @@ jobs: env: CMAKE_OPTIONS: -DDEV_MODE=ON steps: + - name: list compilers + if: ${{ contains(matrix.os, 'ubuntu') }} + run: dpkg --list | grep compiler + - name: Get pushed code uses: actions/checkout@v4 From 1b5f2041dd45f272e24565cf222b6a9ce64cad12 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Sun, 5 Jan 2025 13:44:30 +0100 Subject: [PATCH 04/16] CI: use more configurable targets --- .github/workflows/generate-tools.yaml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/generate-tools.yaml b/.github/workflows/generate-tools.yaml index 2fa4ce74..57de13e2 100644 --- a/.github/workflows/generate-tools.yaml +++ b/.github/workflows/generate-tools.yaml @@ -6,32 +6,36 @@ on: jobs: build_tools: - name: Build all tools for ${{ matrix.os }} - runs-on: ${{ matrix.os }} + name: Build all tools for ${{ matrix.target.os }} ${{ matrix.target.cmake_env }} + runs-on: ${{ matrix.target.os }} strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + target: [ + {"os": "ubuntu-latest", "cmake_env": "CC=gcc-14"}, + {"os": "macos-latest" }, + {"os": "windows-latest"}, + ] include: - os: windows-latest triplet: x64-windows - os: ubuntu-latest triplet: x64-linux - CMAKE_CC: CC=gcc-14 - os: macos-latest triplet: x64-osx env: CMAKE_OPTIONS: -DDEV_MODE=ON + CMAKE_ENV: ${{ matrix.target.cmake_env }} steps: - name: list compilers - if: ${{ contains(matrix.os, 'ubuntu') }} + if: ${{ contains(matrix.target.os, 'ubuntu') }} run: dpkg --list | grep compiler - name: Get pushed code uses: actions/checkout@v4 - name: Configure CMake - run: ${{ matrix.CMAKE_CC }} cmake -S . -B _build ${{ env.CMAKE_OPTIONS }} + run: ${{ env.CMAKE_ENV }} cmake -S . -B _build ${{ env.CMAKE_OPTIONS }} - name: Build with CMake run: cmake --build _build --config Debug --parallel From 2594b24c77cda0e7d714d22751af248e8cf23f36 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Sun, 5 Jan 2025 13:47:21 +0100 Subject: [PATCH 05/16] CI: add a Linux clang target --- .github/workflows/generate-tools.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/generate-tools.yaml b/.github/workflows/generate-tools.yaml index 57de13e2..3334b320 100644 --- a/.github/workflows/generate-tools.yaml +++ b/.github/workflows/generate-tools.yaml @@ -13,6 +13,7 @@ jobs: matrix: target: [ {"os": "ubuntu-latest", "cmake_env": "CC=gcc-14"}, + {"os": "ubuntu-latest", "cmake_env": "CC=clang-18"}, {"os": "macos-latest" }, {"os": "windows-latest"}, ] From 521422f2c59dad2abfdff83391f5265421c312e5 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Sun, 5 Jan 2025 13:54:21 +0100 Subject: [PATCH 06/16] CI: add older compilers --- .github/workflows/generate-tools.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/generate-tools.yaml b/.github/workflows/generate-tools.yaml index 3334b320..a943ca40 100644 --- a/.github/workflows/generate-tools.yaml +++ b/.github/workflows/generate-tools.yaml @@ -14,6 +14,8 @@ jobs: target: [ {"os": "ubuntu-latest", "cmake_env": "CC=gcc-14"}, {"os": "ubuntu-latest", "cmake_env": "CC=clang-18"}, + {"os": "ubuntu-20.04", "cmake_env": "CC=gcc-9"}, + {"os": "ubuntu-20.04", "cmake_env": "CC=clang-10"}, {"os": "macos-latest" }, {"os": "windows-latest"}, ] @@ -22,6 +24,8 @@ jobs: triplet: x64-windows - os: ubuntu-latest triplet: x64-linux + - os: ubuntu-20.04 + triplet: x64-linux - os: macos-latest triplet: x64-osx env: From b87fa0342cf4f7c2ca1e169538907e62f6a0ec13 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Sun, 5 Jan 2025 14:03:07 +0100 Subject: [PATCH 07/16] CI: add Intel macOS build --- .github/workflows/generate-tools.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/generate-tools.yaml b/.github/workflows/generate-tools.yaml index a943ca40..cf4a51a9 100644 --- a/.github/workflows/generate-tools.yaml +++ b/.github/workflows/generate-tools.yaml @@ -16,7 +16,8 @@ jobs: {"os": "ubuntu-latest", "cmake_env": "CC=clang-18"}, {"os": "ubuntu-20.04", "cmake_env": "CC=gcc-9"}, {"os": "ubuntu-20.04", "cmake_env": "CC=clang-10"}, - {"os": "macos-latest" }, + {"os": "macos-latest", "cmake_env": "CMAKE_OSX_ARCHITECTURES=arm64"}, + {"os": "macos-latest", "cmake_env": "CMAKE_OSX_ARCHITECTURES=x86_64"}, {"os": "windows-latest"}, ] include: From 891882293d82be7cd8b6a76a654d8a110a7f53f8 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Sun, 5 Jan 2025 14:06:55 +0100 Subject: [PATCH 08/16] CI: add a fancy name for each target --- .github/workflows/generate-tools.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/generate-tools.yaml b/.github/workflows/generate-tools.yaml index cf4a51a9..2b9860b7 100644 --- a/.github/workflows/generate-tools.yaml +++ b/.github/workflows/generate-tools.yaml @@ -6,19 +6,19 @@ on: jobs: build_tools: - name: Build all tools for ${{ matrix.target.os }} ${{ matrix.target.cmake_env }} + name: Build all tools for ${{ matrix.target.name }} runs-on: ${{ matrix.target.os }} strategy: fail-fast: false matrix: target: [ - {"os": "ubuntu-latest", "cmake_env": "CC=gcc-14"}, - {"os": "ubuntu-latest", "cmake_env": "CC=clang-18"}, - {"os": "ubuntu-20.04", "cmake_env": "CC=gcc-9"}, - {"os": "ubuntu-20.04", "cmake_env": "CC=clang-10"}, - {"os": "macos-latest", "cmake_env": "CMAKE_OSX_ARCHITECTURES=arm64"}, - {"os": "macos-latest", "cmake_env": "CMAKE_OSX_ARCHITECTURES=x86_64"}, - {"os": "windows-latest"}, + {"name": "Linux GCC 14", "os": "ubuntu-latest", "cmake_env": "CC=gcc-14"}, + {"name": "Linux Clang 18", "os": "ubuntu-latest", "cmake_env": "CC=clang-18"}, + {"name": "Linux GCC 9", "os": "ubuntu-20.04", "cmake_env": "CC=gcc-9"}, + {"name": "Linux Clang 10", "os": "ubuntu-20.04", "cmake_env": "CC=clang-10"}, + {"name": "macOS arm64", "os": "macos-latest", "cmake_env": "CMAKE_OSX_ARCHITECTURES=arm64"}, + {"name": "macOS x86_64", "os": "macos-latest", "cmake_env": "CMAKE_OSX_ARCHITECTURES=x86_64"}, + {"name": "Windows", "os": "windows-latest"}, ] include: - os: windows-latest From 322e8837d09ffe45638b5545e7dbcafeccb1fe50 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Sun, 5 Jan 2025 14:07:12 +0100 Subject: [PATCH 09/16] CI: use the latest macOS With a more recent clang. --- .github/workflows/generate-tools.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate-tools.yaml b/.github/workflows/generate-tools.yaml index 2b9860b7..5f79a12e 100644 --- a/.github/workflows/generate-tools.yaml +++ b/.github/workflows/generate-tools.yaml @@ -16,8 +16,8 @@ jobs: {"name": "Linux Clang 18", "os": "ubuntu-latest", "cmake_env": "CC=clang-18"}, {"name": "Linux GCC 9", "os": "ubuntu-20.04", "cmake_env": "CC=gcc-9"}, {"name": "Linux Clang 10", "os": "ubuntu-20.04", "cmake_env": "CC=clang-10"}, - {"name": "macOS arm64", "os": "macos-latest", "cmake_env": "CMAKE_OSX_ARCHITECTURES=arm64"}, - {"name": "macOS x86_64", "os": "macos-latest", "cmake_env": "CMAKE_OSX_ARCHITECTURES=x86_64"}, + {"name": "macOS arm64", "os": "macos-15", "cmake_env": "CMAKE_OSX_ARCHITECTURES=arm64"}, + {"name": "macOS x86_64", "os": "macos-15", "cmake_env": "CMAKE_OSX_ARCHITECTURES=x86_64"}, {"name": "Windows", "os": "windows-latest"}, ] include: From ae56fa43b22eb7ad0b1cacb894bf3a900a5ce91b Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Sun, 5 Jan 2025 14:07:56 +0100 Subject: [PATCH 10/16] CI: remove unused triplet --- .github/workflows/generate-tools.yaml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/generate-tools.yaml b/.github/workflows/generate-tools.yaml index 5f79a12e..49932fdc 100644 --- a/.github/workflows/generate-tools.yaml +++ b/.github/workflows/generate-tools.yaml @@ -20,15 +20,6 @@ jobs: {"name": "macOS x86_64", "os": "macos-15", "cmake_env": "CMAKE_OSX_ARCHITECTURES=x86_64"}, {"name": "Windows", "os": "windows-latest"}, ] - include: - - os: windows-latest - triplet: x64-windows - - os: ubuntu-latest - triplet: x64-linux - - os: ubuntu-20.04 - triplet: x64-linux - - os: macos-latest - triplet: x64-osx env: CMAKE_OPTIONS: -DDEV_MODE=ON CMAKE_ENV: ${{ matrix.target.cmake_env }} From 3a5647d0d6fad525bb29cd37e1265b6945f18dd6 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Sun, 5 Jan 2025 14:15:54 +0100 Subject: [PATCH 11/16] CI: add Windows clang targets --- .github/workflows/generate-tools.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/generate-tools.yaml b/.github/workflows/generate-tools.yaml index 49932fdc..17f14e68 100644 --- a/.github/workflows/generate-tools.yaml +++ b/.github/workflows/generate-tools.yaml @@ -19,9 +19,10 @@ jobs: {"name": "macOS arm64", "os": "macos-15", "cmake_env": "CMAKE_OSX_ARCHITECTURES=arm64"}, {"name": "macOS x86_64", "os": "macos-15", "cmake_env": "CMAKE_OSX_ARCHITECTURES=x86_64"}, {"name": "Windows", "os": "windows-latest"}, + {"name": "Windows Clang-CL", "os": "windows-latest", "cmake_options": "-T ClangCl"}, ] env: - CMAKE_OPTIONS: -DDEV_MODE=ON + CMAKE_OPTIONS: -DDEV_MODE=ON ${{ matrix.target.cmake_options }} CMAKE_ENV: ${{ matrix.target.cmake_env }} steps: - name: list compilers From 971968ab46a22df830a210613d60e7bb815fab79 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Sun, 5 Jan 2025 14:31:42 +0100 Subject: [PATCH 12/16] CI: add Windows arm64 targets --- .github/workflows/generate-tools.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/generate-tools.yaml b/.github/workflows/generate-tools.yaml index 17f14e68..4f0126fc 100644 --- a/.github/workflows/generate-tools.yaml +++ b/.github/workflows/generate-tools.yaml @@ -19,7 +19,9 @@ jobs: {"name": "macOS arm64", "os": "macos-15", "cmake_env": "CMAKE_OSX_ARCHITECTURES=arm64"}, {"name": "macOS x86_64", "os": "macos-15", "cmake_env": "CMAKE_OSX_ARCHITECTURES=x86_64"}, {"name": "Windows", "os": "windows-latest"}, + {"name": "Windows Arm64", "os": "windows-latest", "cmake_options": "-A arm64"}, {"name": "Windows Clang-CL", "os": "windows-latest", "cmake_options": "-T ClangCl"}, + {"name": "WinArm64 Clang-CL","os": "windows-latest", "cmake_options": "-T ClangCl -A arm64"}, ] env: CMAKE_OPTIONS: -DDEV_MODE=ON ${{ matrix.target.cmake_options }} From 5af33df1b5ae4303251db9b002b0f3927c3ee2c9 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Sun, 5 Jan 2025 14:40:22 +0100 Subject: [PATCH 13/16] CI: install clang-7 The oldest we can get on Github --- .github/workflows/generate-tools.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/generate-tools.yaml b/.github/workflows/generate-tools.yaml index 4f0126fc..6bcfca5d 100644 --- a/.github/workflows/generate-tools.yaml +++ b/.github/workflows/generate-tools.yaml @@ -15,7 +15,7 @@ jobs: {"name": "Linux GCC 14", "os": "ubuntu-latest", "cmake_env": "CC=gcc-14"}, {"name": "Linux Clang 18", "os": "ubuntu-latest", "cmake_env": "CC=clang-18"}, {"name": "Linux GCC 9", "os": "ubuntu-20.04", "cmake_env": "CC=gcc-9"}, - {"name": "Linux Clang 10", "os": "ubuntu-20.04", "cmake_env": "CC=clang-10"}, + {"name": "Linux Clang 7", "os": "ubuntu-20.04", "cmake_env": "CC=clang-7", "install": "clang-7"}, {"name": "macOS arm64", "os": "macos-15", "cmake_env": "CMAKE_OSX_ARCHITECTURES=arm64"}, {"name": "macOS x86_64", "os": "macos-15", "cmake_env": "CMAKE_OSX_ARCHITECTURES=x86_64"}, {"name": "Windows", "os": "windows-latest"}, @@ -31,6 +31,12 @@ jobs: if: ${{ contains(matrix.target.os, 'ubuntu') }} run: dpkg --list | grep compiler + - name: intall compilers + if: ${{ contains(matrix.target.os, 'ubuntu') && matrix.target.install != '' }} + run: | + sudo add-apt-repository --yes --update ppa:ubuntu-toolchain-r/test + sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends ${{ matrix.target.install }} + - name: Get pushed code uses: actions/checkout@v4 From b814565b51370c4198609cd4d664d39ce1ca07be Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Sun, 5 Jan 2025 14:49:34 +0100 Subject: [PATCH 14/16] CI: install gcc-7 The oldest we can get on Github --- .github/workflows/generate-tools.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate-tools.yaml b/.github/workflows/generate-tools.yaml index 6bcfca5d..a6884359 100644 --- a/.github/workflows/generate-tools.yaml +++ b/.github/workflows/generate-tools.yaml @@ -14,7 +14,7 @@ jobs: target: [ {"name": "Linux GCC 14", "os": "ubuntu-latest", "cmake_env": "CC=gcc-14"}, {"name": "Linux Clang 18", "os": "ubuntu-latest", "cmake_env": "CC=clang-18"}, - {"name": "Linux GCC 9", "os": "ubuntu-20.04", "cmake_env": "CC=gcc-9"}, + {"name": "Linux GCC 7", "os": "ubuntu-20.04", "cmake_env": "CC=gcc-7", "install": "gcc-7"}, {"name": "Linux Clang 7", "os": "ubuntu-20.04", "cmake_env": "CC=clang-7", "install": "clang-7"}, {"name": "macOS arm64", "os": "macos-15", "cmake_env": "CMAKE_OSX_ARCHITECTURES=arm64"}, {"name": "macOS x86_64", "os": "macos-15", "cmake_env": "CMAKE_OSX_ARCHITECTURES=x86_64"}, From 43f5a328da902843ceff7f57546317b2ed9c7e47 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Sun, 5 Jan 2025 15:29:58 +0100 Subject: [PATCH 15/16] CI: shorter build job title --- .github/workflows/generate-tools.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate-tools.yaml b/.github/workflows/generate-tools.yaml index a6884359..b35abfdd 100644 --- a/.github/workflows/generate-tools.yaml +++ b/.github/workflows/generate-tools.yaml @@ -6,7 +6,7 @@ on: jobs: build_tools: - name: Build all tools for ${{ matrix.target.name }} + name: Build tools for ${{ matrix.target.name }} runs-on: ${{ matrix.target.os }} strategy: fail-fast: false From ec05e44cf3843b28d57a4c2ef105d3366e70316d Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Sun, 5 Jan 2025 15:33:49 +0100 Subject: [PATCH 16/16] CI: don't use environment variables We can just use the values directly --- .github/workflows/generate-tools.yaml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/generate-tools.yaml b/.github/workflows/generate-tools.yaml index b35abfdd..4b2b253c 100644 --- a/.github/workflows/generate-tools.yaml +++ b/.github/workflows/generate-tools.yaml @@ -14,7 +14,7 @@ jobs: target: [ {"name": "Linux GCC 14", "os": "ubuntu-latest", "cmake_env": "CC=gcc-14"}, {"name": "Linux Clang 18", "os": "ubuntu-latest", "cmake_env": "CC=clang-18"}, - {"name": "Linux GCC 7", "os": "ubuntu-20.04", "cmake_env": "CC=gcc-7", "install": "gcc-7"}, + {"name": "Linux GCC 7", "os": "ubuntu-20.04", "cmake_env": "CC=gcc-7", "install": "gcc-7"}, {"name": "Linux Clang 7", "os": "ubuntu-20.04", "cmake_env": "CC=clang-7", "install": "clang-7"}, {"name": "macOS arm64", "os": "macos-15", "cmake_env": "CMAKE_OSX_ARCHITECTURES=arm64"}, {"name": "macOS x86_64", "os": "macos-15", "cmake_env": "CMAKE_OSX_ARCHITECTURES=x86_64"}, @@ -23,9 +23,6 @@ jobs: {"name": "Windows Clang-CL", "os": "windows-latest", "cmake_options": "-T ClangCl"}, {"name": "WinArm64 Clang-CL","os": "windows-latest", "cmake_options": "-T ClangCl -A arm64"}, ] - env: - CMAKE_OPTIONS: -DDEV_MODE=ON ${{ matrix.target.cmake_options }} - CMAKE_ENV: ${{ matrix.target.cmake_env }} steps: - name: list compilers if: ${{ contains(matrix.target.os, 'ubuntu') }} @@ -41,7 +38,7 @@ jobs: uses: actions/checkout@v4 - name: Configure CMake - run: ${{ env.CMAKE_ENV }} cmake -S . -B _build ${{ env.CMAKE_OPTIONS }} + run: ${{ matrix.target.cmake_env }} cmake -S . -B _build -DDEV_MODE=ON ${{ matrix.target.cmake_options }} - name: Build with CMake run: cmake --build _build --config Debug --parallel