1
0
mirror of https://git.code.sf.net/p/zint/code synced 2025-12-17 09:57:02 +00:00

AZTEC/PDF417: stripf ecc feedback (was getting 32-bit difference)

test suite: test for `arc4random_uniform()` before including
  "test_bwipp" & "test_random" in build
github/ci: try enabling Qt test for ubuntu
This commit is contained in:
gitlost
2025-05-24 02:51:18 +01:00
parent 578d3e4df9
commit 18096a25a7
6 changed files with 129 additions and 114 deletions

View File

@@ -1,7 +1,8 @@
name: CI
# .github/workflows/ci.yml 2025-05-24
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
# events but only for the master branch (or test branch github_ci push)
on:
push:
branches: [ master, github_ci ]
@@ -19,7 +20,7 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install libpng-dev
run: sudo apt-get install libpng-dev
@@ -28,30 +29,30 @@ jobs:
shell: bash
run: sudo locale-gen de_DE.UTF-8 && sudo update-locale
- name: Install Qt5
uses: jurplel/install-qt-action@v4
with:
version: 5.15.2
dir: .
- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: cmake -E make_directory ${{runner.workspace}}/build
shell: bash
run: git config --global --add safe.directory ${GITHUB_WORKSPACE} && cmake -E make_directory build
- name: Configure CMake
working-directory: ${{runner.workspace}}/build
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
working-directory: build
shell: bash
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DZINT_TEST=ON -DZINT_STATIC=ON -DZINT_USE_QT=OFF
run: CMAKE_PREFIX_PATH=$QT_ROOT_DIR cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DZINT_TEST=ON -DZINT_STATIC=ON
- name: Build
working-directory: ${{runner.workspace}}/build
working-directory: build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . -j8 --config $BUILD_TYPE
- name: Test
working-directory: ${{runner.workspace}}/build
working-directory: build
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$(pwd)/backend" PATH=$PATH:"$(pwd)/frontend" ctest -V -C $BUILD_TYPE
run: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$(pwd)/backend" PATH=$PATH:"$(pwd)/frontend" QT_QPA_PLATFORM=offscreen ctest -V -C $BUILD_TYPE
build-ubuntu-debug:
runs-on: ubuntu-latest
@@ -60,7 +61,7 @@ jobs:
BUILD_TYPE: Debug
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install libpng-dev
run: sudo apt-get install libpng-dev
@@ -69,45 +70,53 @@ jobs:
shell: bash
run: sudo locale-gen de_DE.UTF-8 && sudo update-locale
- name: Install Qt6
uses: jurplel/install-qt-action@v4
with:
version: 6.9.0
dir: .
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
shell: bash
run: git config --global --add safe.directory ${GITHUB_WORKSPACE} && cmake -E make_directory build
- name: Configure CMake
working-directory: ${{runner.workspace}}/build
working-directory: build
shell: bash
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DZINT_TEST=ON -DZINT_STATIC=ON -DZINT_USE_QT=OFF
run: CMAKE_PREFIX_PATH=$QT_ROOT_DIR cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DZINT_TEST=ON -DZINT_STATIC=ON -DZINT_QT6=ON
- name: Build
working-directory: ${{runner.workspace}}/build
working-directory: build
shell: bash
run: cmake --build . -j8 --config $BUILD_TYPE
- name: Test
working-directory: ${{runner.workspace}}/build
working-directory: build
shell: bash
run: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$(pwd)/backend" PATH=$PATH:"$(pwd)/frontend" ctest -V -C $BUILD_TYPE
run: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$(pwd)/backend" PATH=$PATH:"$(pwd)/frontend" QT_QPA_PLATFORM=offscreen ctest -V -C $BUILD_TYPE
build-windows-32bit:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
shell: bash
run: git config --global --add safe.directory ${GITHUB_WORKSPACE} && cmake -E make_directory build
- name: Configure CMake
working-directory: ${{runner.workspace}}/build
working-directory: build
shell: bash
run: cmake $GITHUB_WORKSPACE -A Win32 -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DZINT_TEST=ON -DZINT_STATIC=ON -DZINT_USE_PNG=OFF -DZINT_USE_QT=OFF
- name: Build
working-directory: ${{runner.workspace}}/build
working-directory: build
shell: bash
run: cmake --build . -j8 --config $BUILD_TYPE
- name: Test
working-directory: ${{runner.workspace}}/build
working-directory: build
shell: bash
run: PATH=$PATH:"$(pwd)/backend/Release:$(pwd)/frontend/Release" ctest -V -C $BUILD_TYPE
@@ -115,23 +124,24 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
shell: bash
run: git config --global --add safe.directory ${GITHUB_WORKSPACE} && cmake -E make_directory build
- name: Configure CMake
working-directory: ${{runner.workspace}}/build
working-directory: build
shell: bash
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DZINT_TEST=ON -DZINT_STATIC=ON -DZINT_USE_PNG=OFF -DZINT_USE_QT=OFF
- name: Build
working-directory: ${{runner.workspace}}/build
working-directory: build
shell: bash
run: cmake --build . -j8 --config $BUILD_TYPE
- name: Test
working-directory: ${{runner.workspace}}/build
working-directory: build
shell: bash
run: PATH=$PATH:"$(pwd)/backend/Release:$(pwd)/frontend/Release" ctest -V -C $BUILD_TYPE
@@ -139,23 +149,24 @@ jobs:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
shell: bash
run: git config --global --add safe.directory ${GITHUB_WORKSPACE} && cmake -E make_directory build
- name: Configure CMake
working-directory: ${{runner.workspace}}/build
working-directory: build
shell: bash
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DZINT_TEST=ON -DZINT_STATIC=ON -DZINT_USE_PNG=OFF -DZINT_USE_QT=OFF
- name: Build
working-directory: ${{runner.workspace}}/build
working-directory: build
shell: bash
run: SDKROOT="$(xcrun --sdk macosx --show-sdk-path)" cmake --build . -j8 --config $BUILD_TYPE
- name: Test
working-directory: ${{runner.workspace}}/build
working-directory: build
shell: bash
run: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$(pwd)/backend" PATH=$PATH:"$(pwd)/frontend" ctest -V -C $BUILD_TYPE
@@ -163,22 +174,23 @@ jobs:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
shell: bash
run: git config --global --add safe.directory ${GITHUB_WORKSPACE} && cmake -E make_directory build
- name: Configure CMake
working-directory: ${{runner.workspace}}/build
working-directory: build
shell: bash
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DZINT_TEST=ON -DZINT_SANITIZE=ON -DZINT_USE_PNG=OFF -DZINT_USE_QT=OFF
- name: Build
working-directory: ${{runner.workspace}}/build
working-directory: build
shell: bash
run: SDKROOT="$(xcrun --sdk macosx --show-sdk-path)" cmake --build . -j8 --config $BUILD_TYPE
- name: Test
working-directory: ${{runner.workspace}}/build
working-directory: build
shell: bash
run: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$(pwd)/backend" PATH=$PATH:"$(pwd)/frontend" ctest -V -C $BUILD_TYPE