From 64c82fc3308ed34a4b6ac8c3e85b39b0ea94cd2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 8 Nov 2023 11:47:58 +0200 Subject: [PATCH 1/5] ci: Reenable -Werror testing on mingw targets The issue that was warned about before seem to have been resolved. --- .github/workflows/build.yaml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9e03b0c3d4..431c95df78 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -72,11 +72,8 @@ jobs: - run: c++ --version - run: make gmp-bootstrap - run: make gtest-bootstrap - # disable Werror on gcc 12 until #3533 is fixed. - #- run: CFLAGS=-Werror make -j$(nproc) all plugin test - - run: make -j$(nproc) all plugin test - #- run: meson builddir --werror - - run: meson builddir + - run: CFLAGS=-Werror make -j$(nproc) all plugin test + - run: meson builddir --werror - run: ninja -C builddir -v - run: meson test -C builddir -v From de620ccdbcfbe6f3741492112444c9edfa8d214c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 8 Nov 2023 12:02:57 +0200 Subject: [PATCH 2/5] test: Don't use sprintf, use snprintf instead Current Xcode versions warn about sprintf being deprecated. --- test/api/simple_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/api/simple_test.cpp b/test/api/simple_test.cpp index 41b2f84cfa..ca570a1b0d 100644 --- a/test/api/simple_test.cpp +++ b/test/api/simple_test.cpp @@ -13,7 +13,7 @@ int main (int argc, char** argv) { #if (defined(ANDROID_NDK)||defined(APPLE_IOS)||defined(WINDOWS_PHONE)) char xmlPath[1024] = ""; - sprintf (xmlPath, "xml:%s", argv[1]); + snprintf (xmlPath, sizeof(xmlPath), "xml:%s", argv[1]); ::testing::GTEST_FLAG (output) = xmlPath; #endif ::testing::InitGoogleTest (&argc, argv); From 272e3ef85a0c9d4fd8a696b1889cf20ecbe191ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 8 Nov 2023 11:46:52 +0200 Subject: [PATCH 3/5] ci: Add a build configuration, testing building for iOS --- .github/workflows/build.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 431c95df78..2d1af5e05f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -114,6 +114,15 @@ jobs: - run: c++ --version - run: CFLAGS=-Werror make -j$(sysctl -n hw.ncpu) ARCH=arm64 + ios-cross-arm64: + runs-on: macos-latest + steps: + - uses: actions/checkout@v3 + - run: make gmp-bootstrap + - run: make gtest-bootstrap + - run: c++ --version + - run: CFLAGS=-Werror make -j$(sysctl -n hw.ncpu) OS=ios ARCH=arm64 + fuzzing: runs-on: ubuntu-latest steps: From f15393a50213524dea1731700e55c24c62fa4e44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Sun, 24 Nov 2024 18:35:20 +0200 Subject: [PATCH 4/5] ci: Build and run on macOS on both x86_64 and arm64 The "macos-latest" runners are arm64 these days, while "macos-13" is older runners that are x86_64. Keep running tests on both, for as long as the x86_64 based runners are available. --- .github/workflows/build.yaml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2d1af5e05f..f02a8a8514 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -78,7 +78,13 @@ jobs: - run: meson test -C builddir -v macos: - runs-on: macos-latest + strategy: + fail-fast: false + matrix: + runner: + - macos-13 # x86_64 + - macos-latest # aarch64 + runs-on: ${{matrix.runner}} steps: - uses: actions/checkout@v3 - run: brew install nasm meson @@ -105,15 +111,6 @@ jobs: - run: CFLAGS=-Werror make -j$(nproc) ARCH=aarch64 CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ - run: qemu-aarch64 -L /usr/aarch64-linux-gnu/ ./codec_unittest - macos-cross-arm64: - runs-on: macos-latest - steps: - - uses: actions/checkout@v3 - - run: make gmp-bootstrap - - run: make gtest-bootstrap - - run: c++ --version - - run: CFLAGS=-Werror make -j$(sysctl -n hw.ncpu) ARCH=arm64 - ios-cross-arm64: runs-on: macos-latest steps: From 4c6103a44d706bf291e7b913fb9f9aa7c4d694ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Sun, 24 Nov 2024 23:18:50 +0200 Subject: [PATCH 5/5] ci: Improve the linux-cross-arm configuration Run the tests on arm, too, and print the version of the compiler used for aarch64 (even though it's probably in practice always the same as for arm). --- .github/workflows/build.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f02a8a8514..75a08c3bfd 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -104,9 +104,11 @@ jobs: - run: sudo apt-get update -qq - run: sudo apt-get install -qq g++-arm-linux-gnueabihf g++-aarch64-linux-gnu qemu-user - run: arm-linux-gnueabihf-g++ --version + - run: aarch64-linux-gnu-g++ --version - run: make gmp-bootstrap - run: make gtest-bootstrap - run: CFLAGS=-Werror make -j$(nproc) ARCH=armv7 CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ + - run: qemu-arm -L /usr/arm-linux-gnueabihf/ ./codec_unittest - run: CFLAGS=-Werror make clean - run: CFLAGS=-Werror make -j$(nproc) ARCH=aarch64 CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ - run: qemu-aarch64 -L /usr/aarch64-linux-gnu/ ./codec_unittest