Bump wikidocs #1094
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 | |
| # | |
| # 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-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@v4 | |
| 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 \ | |
| . | |
| # | |
| # 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 | |
| - 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 | |
| release: | |
| if: startsWith(github.ref, 'refs/tags/') | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: write | |
| needs: | |
| - ci | |
| - ci-clang | |
| - ci-gcc | |
| - 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@v4 | |
| with: | |
| name: docs-pdf | |
| - name: Load HTML docs | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: docs-html | |
| - name: Load Scribus docs | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: docs-scribus | |
| path: wikidocs/__pandoc/scribus | |
| - name: Deploy Scribus 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 | |
| cp wikidocs/__pandoc/scribus/bwipp-symbologies.html wikidocs/__pandoc/scribus/bwipp-gs1ai.html wikidocs/__pandoc/scribus/bwipp-options.html gh-pages-wt/scribus/ | |
| printf 'User-agent: *\nDisallow: /scribus/\n' > gh-pages-wt/robots.txt | |
| cd gh-pages-wt | |
| git add scribus/ robots.txt | |
| git diff --cached --quiet || git commit -m "Update Scribus 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 }} |