Mercurial > hgrepos > Python2 > PyMuPDF
comparison mupdf-source/thirdparty/zxing-cpp/.github/workflows/ci.yml @ 2:b50eed0cc0ef upstream
ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4.
The directory name has changed: no version number in the expanded directory now.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 15 Sep 2025 11:43:07 +0200 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 1:1d09e1dec1d9 | 2:b50eed0cc0ef |
|---|---|
| 1 name: CI | |
| 2 | |
| 3 # Controls when the action will run. Triggers the workflow on push or pull request | |
| 4 # events but only for the master branch | |
| 5 on: | |
| 6 push: | |
| 7 branches: [ master ] | |
| 8 pull_request: | |
| 9 branches: [ master ] | |
| 10 | |
| 11 env: | |
| 12 # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
| 13 BUILD_TYPE: Release | |
| 14 | |
| 15 jobs: | |
| 16 build: | |
| 17 runs-on: ${{ matrix.os }} | |
| 18 strategy: | |
| 19 matrix: | |
| 20 os: [windows-latest, ubuntu-latest, macos-13] | |
| 21 # don't cancel all jobs just because one of them failed | |
| 22 fail-fast: false | |
| 23 | |
| 24 # Steps represent a sequence of tasks that will be executed as part of the job | |
| 25 steps: | |
| 26 - uses: actions/checkout@v4 | |
| 27 | |
| 28 - name: Setup Python 3 | |
| 29 uses: actions/setup-python@v5 | |
| 30 with: | |
| 31 python-version: '3.x' | |
| 32 | |
| 33 - name: Configure | |
| 34 run: > | |
| 35 cmake -S . -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_SHARED_LIBS=ON | |
| 36 -DZXING_READERS=ON -DZXING_WRITERS=ON | |
| 37 -DZXING_BLACKBOX_TESTS=ON -DZXING_UNIT_TESTS=ON -DZXING_PYTHON_MODULE=ON -DZXING_C_API=ON | |
| 38 | |
| 39 - name: Build | |
| 40 run: cmake --build build -j8 --config ${{env.BUILD_TYPE}} | |
| 41 | |
| 42 # - name: Set PATH for Tests | |
| 43 # shell: bash # to make the $GITHUB_PATH update work | |
| 44 # if: runner.os == 'Windows' | |
| 45 # run: | | |
| 46 # echo "${GITHUB_WORKSPACE}/build/core/${BUILD_TYPE}" >> $GITHUB_PATH | |
| 47 # echo "${GITHUB_WORKSPACE}/build/lib/${BUILD_TYPE}" >> $GITHUB_PATH | |
| 48 | |
| 49 - name: Test | |
| 50 if: runner.os != 'Windows' # need to disable ctest on Windows when build as shared library for now | |
| 51 run: ctest --test-dir build -V -C ${{env.BUILD_TYPE}} | |
| 52 | |
| 53 - name: Install | |
| 54 run: | | |
| 55 cmake -E make_directory install | |
| 56 cmake --install build --config ${{env.BUILD_TYPE}} --prefix ${{github.workspace}}/install | |
| 57 | |
| 58 - uses: actions/upload-artifact@v4 | |
| 59 with: | |
| 60 name: ${{matrix.os}}-artifacts | |
| 61 path: install | |
| 62 | |
| 63 build-experimental: | |
| 64 runs-on: ${{ matrix.os }} | |
| 65 strategy: | |
| 66 matrix: | |
| 67 os: [windows-latest, ubuntu-latest, macos-13] | |
| 68 | |
| 69 steps: | |
| 70 - uses: actions/checkout@v4 | |
| 71 with: | |
| 72 submodules: true | |
| 73 | |
| 74 - name: Configure | |
| 75 run: > | |
| 76 cmake -S . -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_SHARED_LIBS=ON | |
| 77 -DZXING_READERS=ON -DZXING_WRITERS=NEW -DZXING_EXPERIMENTAL_API=ON | |
| 78 -DZXING_BLACKBOX_TESTS=ON -DZXING_UNIT_TESTS=OFF -DZXING_PYTHON_MODULE=OFF -DZXING_C_API=ON | |
| 79 | |
| 80 - name: Build | |
| 81 run: cmake --build build -j8 --config ${{env.BUILD_TYPE}} | |
| 82 | |
| 83 - name: Test | |
| 84 if: runner.os != 'Windows' # need to disable ctest on Windows when build as shared library for now | |
| 85 run: ctest --test-dir build -V -C ${{env.BUILD_TYPE}} | |
| 86 | |
| 87 - name: Install | |
| 88 run: | | |
| 89 cmake -E make_directory install | |
| 90 cmake --install build --config ${{env.BUILD_TYPE}} --prefix ${{github.workspace}}/install | |
| 91 | |
| 92 - uses: actions/upload-artifact@v4 | |
| 93 with: | |
| 94 name: ${{matrix.os}}-exp-artifacts | |
| 95 path: install | |
| 96 | |
| 97 build-ubuntu-sanitize: | |
| 98 runs-on: ubuntu-20.04 # see https://github.com/quantumlib/Stim/issues/717#issuecomment-2002623560 | |
| 99 steps: | |
| 100 - uses: actions/checkout@v4 | |
| 101 | |
| 102 - name: Configure | |
| 103 run: > | |
| 104 cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo | |
| 105 -DZXING_READERS=ON -DZXING_WRITERS=ON | |
| 106 -DZXING_BLACKBOX_TESTS=ON -DZXING_UNIT_TESTS=ON -DZXING_PYTHON_MODULE=OFF -DZXING_C_API=OFF | |
| 107 -DCMAKE_CXX_COMPILER=clang++ | |
| 108 -DCMAKE_CXX_FLAGS="-march=native -fsanitize=address,undefined -fno-optimize-sibling-calls -fsanitize-address-use-after-scope -fno-omit-frame-pointer" | |
| 109 -DCMAKE_C_COMPILER=clang | |
| 110 -DCMAKE_C_FLAGS="-march=native -fsanitize=address,undefined -fno-optimize-sibling-calls -fsanitize-address-use-after-scope -fno-omit-frame-pointer" | |
| 111 | |
| 112 - name: Build | |
| 113 run: cmake --build build -j8 | |
| 114 | |
| 115 - name: Test | |
| 116 run: ctest -V --test-dir build | |
| 117 | |
| 118 build-ios: | |
| 119 runs-on: macos-13 | |
| 120 steps: | |
| 121 - uses: actions/checkout@v4 | |
| 122 with: | |
| 123 submodules: true | |
| 124 | |
| 125 - name: Build the swift package | |
| 126 run: swift build | |
| 127 | |
| 128 - name: Build the demo app | |
| 129 working-directory: wrappers/ios/demo | |
| 130 run: xcodebuild build -scheme demo -sdk "iphonesimulator" | |
| 131 | |
| 132 - name: Validate the Pod | |
| 133 run: pod lib lint --allow-warnings | |
| 134 | |
| 135 build-android: | |
| 136 runs-on: ubuntu-latest | |
| 137 steps: | |
| 138 - uses: actions/checkout@v4 | |
| 139 - uses: actions/setup-java@v4 | |
| 140 with: | |
| 141 distribution: 'temurin' | |
| 142 java-version: '17' | |
| 143 | |
| 144 - name: Build the lib/app | |
| 145 working-directory: wrappers/android | |
| 146 run: ./gradlew assembleRelease | |
| 147 | |
| 148 - uses: actions/upload-artifact@v4 | |
| 149 with: | |
| 150 name: android-artifacts | |
| 151 path: "wrappers/android/zxingcpp/build/outputs/aar/zxingcpp-release.aar" | |
| 152 | |
| 153 - name: Publish Library Snapshot | |
| 154 if: github.repository == 'zxing-cpp/zxing-cpp' && github.event_name != 'pull_request' | |
| 155 working-directory: wrappers/android | |
| 156 env: | |
| 157 ORG_GRADLE_PROJECT_publishSnapshot: true | |
| 158 ORG_GRADLE_PROJECT_signingKey: ${{ secrets.OSSRH_GPG_SECRET_KEY }} | |
| 159 ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} | |
| 160 ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.OSSRH_USERNAME }} | |
| 161 ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.OSSRH_PASSWORD }} | |
| 162 run: ./gradlew publishReleasePublicationToSonatypeRepository | |
| 163 | |
| 164 build-kn: | |
| 165 runs-on: ubuntu-latest | |
| 166 defaults: | |
| 167 run: | |
| 168 working-directory: wrappers/kn | |
| 169 steps: | |
| 170 - name: Checkout repository | |
| 171 uses: actions/checkout@v4 | |
| 172 with: | |
| 173 submodules: true | |
| 174 | |
| 175 - name: Checkout toolchain initializer repository | |
| 176 uses: actions/checkout@v4 | |
| 177 with: | |
| 178 repository: ISNing/kn-toolchain-initializer | |
| 179 path: wrappers/kn/.kn-toolchain-initializer | |
| 180 | |
| 181 - name: Set up JDK | |
| 182 uses: actions/setup-java@v4 | |
| 183 with: | |
| 184 java-version: 17 | |
| 185 distribution: temurin | |
| 186 | |
| 187 - name: Setup Gradle | |
| 188 uses: gradle/actions/setup-gradle@v3 | |
| 189 | |
| 190 - name: Validate Gradle Wrapper | |
| 191 uses: gradle/wrapper-validation-action@v2 | |
| 192 | |
| 193 - name: Initialize Kotlin/Native toolchain | |
| 194 working-directory: wrappers/kn/.kn-toolchain-initializer | |
| 195 run: ./gradlew build -DkotlinVersion=1.9.22 | |
| 196 | |
| 197 - name: Run test for linuxX64 target | |
| 198 run: | | |
| 199 echo -e "konan.dir=$HOME/.konan/kotlin-native-prebuilt-linux-x86_64-1.9.22" > local.properties | |
| 200 ./gradlew linuxX64Test | |
| 201 | |
| 202 build-python: | |
| 203 runs-on: ${{ matrix.os }} | |
| 204 strategy: | |
| 205 matrix: | |
| 206 python-version: ['3.12'] | |
| 207 os: [ubuntu-latest, macos-13, windows-latest] | |
| 208 | |
| 209 steps: | |
| 210 - uses: actions/checkout@v4 | |
| 211 with: | |
| 212 submodules: true | |
| 213 | |
| 214 - name: Set up Python ${{ matrix.python-version }} | |
| 215 uses: actions/setup-python@v5 | |
| 216 with: | |
| 217 python-version: ${{ matrix.python-version }} | |
| 218 | |
| 219 - name: Install dependencies | |
| 220 run: | | |
| 221 python -m pip install --upgrade pip setuptools | |
| 222 python -m pip install numpy pillow | |
| 223 | |
| 224 - name: Build module | |
| 225 working-directory: wrappers/python | |
| 226 run: python -m pip -v install -e . | |
| 227 | |
| 228 - name: Test module | |
| 229 working-directory: wrappers/python | |
| 230 run: python -m unittest -v | |
| 231 | |
| 232 build-rust: | |
| 233 runs-on: ${{ matrix.os }} | |
| 234 strategy: | |
| 235 matrix: | |
| 236 os: [ubuntu-latest, macos-13, windows-latest] | |
| 237 defaults: | |
| 238 run: | |
| 239 working-directory: wrappers/rust | |
| 240 | |
| 241 steps: | |
| 242 - uses: actions/checkout@v4 | |
| 243 with: | |
| 244 submodules: true | |
| 245 | |
| 246 - name: Lint | |
| 247 run: | | |
| 248 cargo fmt --check | |
| 249 cargo clippy -- -Dwarnings | |
| 250 | |
| 251 - name: Build | |
| 252 run: cargo build --release --verbose --all-features --examples | |
| 253 | |
| 254 - name: Test | |
| 255 run: cargo test --release --all-features | |
| 256 | |
| 257 - name: Package | |
| 258 # --allow-dirty is required on the windows build (but not the ubuntu build?!) | |
| 259 run: cargo package --verbose --allow-dirty --all-features | |
| 260 | |
| 261 build-wasm: | |
| 262 runs-on: ubuntu-latest | |
| 263 steps: | |
| 264 - uses: actions/checkout@v4 | |
| 265 - uses: mymindstorm/setup-emsdk@v14 | |
| 266 | |
| 267 - name: Configure | |
| 268 run: emcmake cmake -Swrappers/wasm -Bbuild | |
| 269 | |
| 270 - name: Build | |
| 271 run: cmake --build build -j4 | |
| 272 | |
| 273 # - name: Test | |
| 274 # run: node build/EmGlueTests.js | |
| 275 | |
| 276 - uses: actions/upload-artifact@v4 | |
| 277 with: | |
| 278 name: wasm-artifacts | |
| 279 path: | | |
| 280 build/zxing* | |
| 281 build/demo* | |
| 282 | |
| 283 build-winrt: | |
| 284 runs-on: windows-latest | |
| 285 | |
| 286 steps: | |
| 287 - uses: actions/checkout@v4 | |
| 288 | |
| 289 - name: Configure | |
| 290 shell: cmd # powershell messes up the arguments containing a '.' ?!? | |
| 291 run: > | |
| 292 cmake -S wrappers/winrt -B build -A ARM64 | |
| 293 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_BUILD_TYPE=Release | |
| 294 -DBUILD_WINRT_LIB=ON -DZXING_EXAMPLES=OFF -DZXING_BLACKBOX_TESTS=OFF -DZXING_C_API=OFF | |
| 295 -DEXTENSION_SDK_OUTPUT=dist/UAP/v0.8.0.0/ExtensionSDKs/ZXingWinRT/1.0.0.0 | |
| 296 | |
| 297 - name: Build | |
| 298 run: cmake --build build -j8 --config Release | |
| 299 | |
| 300 - uses: actions/upload-artifact@v4 | |
| 301 with: | |
| 302 name: winrt-ARM64-artifacts | |
| 303 path: build/dist |
