Bump wikidocs #1158
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: BWIPP CI | |
| on: | |
| push: | |
| branches: | |
| - "*" | |
| tags: | |
| - "*" | |
| pull_request: | |
| branches: | |
| - "*" | |
| permissions: | |
| contents: read | |
| jobs: | |
| # | |
| # PostScript resource CI | |
| # | |
| ci: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Fix PATH for CI | |
| run: sed -i "s|/usr/local/bin:||" build/make_resource.pl | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends ghostscript | |
| - name: Build | |
| run: make -j "$(nproc)" | |
| - name: Test | |
| run: make test | |
| - name: Create CRLF copy of barcode.ps | |
| run: sed 's/$/\r/' build/monolithic/barcode.ps > build/monolithic/barcode_crlf.ps | |
| - name: Store monolithic barcode.ps | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: monolithic-barcode-ps | |
| path: | | |
| build/monolithic/barcode.ps | |
| build/monolithic/barcode_crlf.ps | |
| retention-days: 1 | |
| # | |
| # C library CI | |
| # | |
| ci-clang: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: clang CI (with sanitizers) | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get -y --no-install-recommends install llvm | |
| make -C libs/c -j "$(nproc)" test \ | |
| CC=clang SANITIZE=yes | |
| - name: clang shared library | |
| run: | | |
| make -C libs/c -j "$(nproc)" lib \ | |
| CC=clang SANITIZE=yes | |
| ci-gcc: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: gcc CI (with analyzer) | |
| run: | | |
| make -C libs/c -j "$(nproc)" test \ | |
| CC=gcc ANALYZER=yes | |
| - name: gcc shared library | |
| run: | | |
| make -C libs/c -j "$(nproc)" lib \ | |
| CC=gcc ANALYZER=yes | |
| ci-valgrind: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Valgrind memcheck CI | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get -y --no-install-recommends install valgrind | |
| make -C libs/c -j "$(nproc)" test CC=gcc | |
| make -C libs/c test-valgrind | |
| ci-macos: | |
| needs: ci | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Load barcode.ps | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: monolithic-barcode-ps | |
| path: build/monolithic | |
| - name: clang CI (with sanitizers) | |
| run: | | |
| make -C libs/c \ | |
| -j "$(sysctl -n hw.logicalcpu)" \ | |
| test SANITIZE=yes | |
| - name: Test with CRLF barcode.ps | |
| run: | | |
| cp build/monolithic/barcode_crlf.ps build/monolithic/barcode.ps | |
| make -C libs/c \ | |
| -j "$(sysctl -n hw.logicalcpu)" \ | |
| test-static SANITIZE=yes | |
| - name: clang shared library | |
| run: | | |
| make -C libs/c \ | |
| -j "$(sysctl -n hw.logicalcpu)" \ | |
| lib SANITIZE=yes | |
| ci-windows: | |
| needs: ci | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: x64 | |
| - name: Load barcode.ps | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: monolithic-barcode-ps | |
| path: build/monolithic | |
| - name: MSVC build | |
| working-directory: libs/c | |
| run: | | |
| cl /W4 /WX /Od /Zi ` | |
| /D_CRT_SECURE_NO_WARNINGS ` | |
| postscriptbarcode.c ` | |
| postscriptbarcode_test.c ` | |
| /Fe:postscriptbarcode_test.exe | |
| - name: Test with LF barcode.ps | |
| working-directory: libs/c | |
| run: ./postscriptbarcode_test.exe | |
| - name: Test with CRLF barcode.ps | |
| working-directory: libs/c | |
| run: | | |
| Copy-Item ..\..\build\monolithic\barcode_crlf.ps ..\..\build\monolithic\barcode.ps | |
| ./postscriptbarcode_test.exe | |
| ci-scan-build: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: clang static analyzer CI | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get -y --no-install-recommends install clang-tools cppcheck | |
| scan-build -o plist \ | |
| make -C libs/c -j "$(nproc)" lib CC=clang | |
| [ "$(find plist/ -name '*.html')" = '' ]; | |
| - name: "clang static analyzer: Store assets on failure" | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: clang-scan.tgz | |
| path: plist/**/*.html | |
| retention-days: 30 | |
| if: ${{ failure() }} | |
| - name: cppcheck | |
| working-directory: libs/c | |
| run: | | |
| cppcheck --enable=all --force \ | |
| --error-exitcode=1 \ | |
| --check-level=exhaustive \ | |
| --inline-suppr \ | |
| --suppress=missingIncludeSystem \ | |
| --suppress='*:acutest.h' \ | |
| -i postscriptbarcode_fuzzer.c \ | |
| -i postscriptbarcode_fuzzer_load.c \ | |
| . | |
| # | |
| # Language bindings CI | |
| # | |
| ci-bindings: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Fix PATH for CI | |
| run: sed -i "s|/usr/local/bin:||" build/make_resource.pl | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends ghostscript \ | |
| swig python3-dev ruby-dev default-jdk-headless libperl-dev ant | |
| - name: Build PS resources | |
| run: make -j "$(nproc)" | |
| - name: Build C library | |
| run: make -C libs/c | |
| - name: Build bindings | |
| run: make -C libs/bindings | |
| - name: Test bindings | |
| run: make -C libs/bindings test | |
| docs: | |
| if: github.repository == 'bwipp/postscriptbarcode' | |
| runs-on: ubuntu-24.04 | |
| container: pandoc/latex:2.9 | |
| steps: | |
| - name: Install dependencies | |
| run: apk add --no-cache git make | |
| - name: Checkout | |
| uses: actions/checkout@v4 # v6 requires Node 24 which is incompatible with Alpine musl | |
| with: | |
| persist-credentials: false | |
| submodules: true | |
| - name: Build docs | |
| run: make -C wikidocs -f __pandoc/Makefile all scribus-docs adoc-docs | |
| - name: Store PDF docs | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: docs-pdf | |
| path: wikidocs/__pandoc/barcodewriter.pdf | |
| - name: Store HTML docs | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: docs-html | |
| path: wikidocs/__pandoc/barcodewriter.html | |
| - name: Store Scribus docs | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: docs-scribus | |
| path: | | |
| wikidocs/__pandoc/scribus/bwipp-symbologies.html | |
| wikidocs/__pandoc/scribus/bwipp-gs1ai.html | |
| wikidocs/__pandoc/scribus/bwipp-options.html | |
| - name: Store AsciiDoc docs | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: docs-adoc | |
| path: | | |
| wikidocs/__pandoc/adoc/bwipp-symbologies.adoc | |
| wikidocs/__pandoc/adoc/bwipp-options.adoc | |
| release: | |
| if: startsWith(github.ref, 'refs/tags/') | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: write | |
| needs: | |
| - ci | |
| - ci-clang | |
| - ci-gcc | |
| - ci-macos | |
| - ci-windows | |
| - ci-valgrind | |
| - ci-scan-build | |
| - ci-bindings | |
| - docs | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Fix PATH for CI | |
| run: sed -i "s|/usr/local/bin:||" build/make_resource.pl | |
| - name: Check version matches CHANGES | |
| run: | | |
| [ "$VERSION" == "$(head -1 CHANGES)" ] || exit 1 | |
| env: | |
| VERSION: ${{ github.ref_name }} | |
| - name: Make assets | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends ghostscript | |
| make -j "$(nproc)" release | |
| - name: Load PDF docs | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: docs-pdf | |
| - name: Load HTML docs | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: docs-html | |
| - name: Load Scribus docs | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: docs-scribus | |
| path: wikidocs/__pandoc/scribus | |
| - name: Load AsciiDoc docs | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: docs-adoc | |
| path: wikidocs/__pandoc/adoc | |
| - name: Deploy Scribus and AsciiDoc docs to gh-pages | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" | |
| git fetch origin gh-pages | |
| git worktree add gh-pages-wt origin/gh-pages | |
| mkdir -p gh-pages-wt/scribus gh-pages-wt/adoc | |
| cp wikidocs/__pandoc/scribus/bwipp-symbologies.html wikidocs/__pandoc/scribus/bwipp-gs1ai.html wikidocs/__pandoc/scribus/bwipp-options.html gh-pages-wt/scribus/ | |
| cp wikidocs/__pandoc/adoc/bwipp-symbologies.adoc wikidocs/__pandoc/adoc/bwipp-options.adoc gh-pages-wt/adoc/ | |
| printf 'User-agent: *\nDisallow: /scribus/\nDisallow: /adoc/\n' > gh-pages-wt/robots.txt | |
| cd gh-pages-wt | |
| git add scribus/ adoc/ robots.txt | |
| git diff --cached --quiet || git commit -m "Update Scribus and AsciiDoc docs for $VERSION" | |
| git push origin HEAD:gh-pages | |
| cd .. | |
| git worktree remove gh-pages-wt | |
| env: | |
| VERSION: ${{ github.ref_name }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Rename docs for release | |
| run: | | |
| mv barcodewriter.pdf postscriptbarcode-manual.pdf | |
| mv barcodewriter.html postscriptbarcode-manual.html | |
| - name: Create GitHub release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: ${{ github.ref_name }} | |
| draft: false | |
| prerelease: false | |
| files: | | |
| build/release/postscriptbarcode-monolithic-${{ github.ref_name }}.tgz | |
| build/release/postscriptbarcode-monolithic-${{ github.ref_name }}.zip | |
| build/release/postscriptbarcode-monolithic-package-${{ github.ref_name }}.tgz | |
| build/release/postscriptbarcode-monolithic-package-${{ github.ref_name }}.zip | |
| build/release/postscriptbarcode-packaged-resource-${{ github.ref_name }}.tgz | |
| build/release/postscriptbarcode-packaged-resource-${{ github.ref_name }}.zip | |
| build/release/postscriptbarcode-resource-${{ github.ref_name }}.tgz | |
| build/release/postscriptbarcode-resource-${{ github.ref_name }}.zip | |
| postscriptbarcode-manual.pdf | |
| postscriptbarcode-manual.html | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |