diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9e03b0c3d4..75a08c3bfd 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -72,16 +72,19 @@ 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 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 @@ -101,21 +104,23 @@ 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 - macos-cross-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) ARCH=arm64 + - run: CFLAGS=-Werror make -j$(sysctl -n hw.ncpu) OS=ios ARCH=arm64 fuzzing: runs-on: ubuntu-latest 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);