2020-10-16 21:33:12 +00:00
|
|
|
name: QPDF Build
|
|
|
|
env:
|
|
|
|
QTEST_COLOR: 1
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- build
|
2020-10-16 22:07:23 +00:00
|
|
|
- build/*
|
2020-10-20 21:28:44 +00:00
|
|
|
paths-ignore:
|
|
|
|
- 'ChangeLog'
|
|
|
|
- 'README*'
|
2024-01-07 13:42:24 +00:00
|
|
|
- 'TODO*'
|
2020-10-16 21:33:12 +00:00
|
|
|
pull_request:
|
2020-10-21 18:07:49 +00:00
|
|
|
schedule:
|
|
|
|
# Building regularly with cron makes it safe for us to use
|
|
|
|
# *-latest with runs-on. If a new version of tools or agents comes
|
|
|
|
# out, we'll find out fast if our builds break on it because we
|
|
|
|
# have reliable testing.
|
|
|
|
- cron: '12 4 * * 5'
|
2020-10-16 21:33:12 +00:00
|
|
|
jobs:
|
2021-12-18 16:19:20 +00:00
|
|
|
Prebuild:
|
|
|
|
# Run steps that are needed by the Windows build but are easier to
|
2021-12-21 14:23:20 +00:00
|
|
|
# build on Linux. Also create the documentation distribution.
|
2020-10-16 21:33:12 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-02-17 23:34:38 +00:00
|
|
|
- uses: actions/checkout@v4
|
2021-12-18 16:19:20 +00:00
|
|
|
- name: 'Run pre-build steps'
|
2022-12-31 20:05:48 +00:00
|
|
|
run: build-scripts/prebuild ${{ secrets.GITHUB_TOKEN }}
|
2021-12-21 14:23:20 +00:00
|
|
|
- name: 'Upload documentation for later build steps'
|
2024-02-17 23:52:08 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2020-10-16 21:33:12 +00:00
|
|
|
with:
|
2021-12-18 16:19:20 +00:00
|
|
|
name: doc
|
|
|
|
path: doc.zip
|
2020-10-24 23:31:09 +00:00
|
|
|
- name: 'Upload external libs'
|
2024-02-17 23:52:08 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2020-10-24 23:31:09 +00:00
|
|
|
with:
|
|
|
|
name: external-libs
|
|
|
|
path: external-libs-dist
|
2021-12-21 14:23:20 +00:00
|
|
|
- name: 'Upload doc distribution'
|
2024-02-17 23:52:08 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2021-12-21 14:23:20 +00:00
|
|
|
with:
|
2024-02-17 23:52:08 +00:00
|
|
|
name: distribution-prebuild
|
2021-12-21 14:23:20 +00:00
|
|
|
path: distribution
|
2020-10-16 21:33:12 +00:00
|
|
|
Linux:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-02-17 23:34:38 +00:00
|
|
|
- uses: actions/checkout@v4
|
2020-10-16 21:33:12 +00:00
|
|
|
- name: 'Generate, build, and test'
|
|
|
|
run: build-scripts/build-linux
|
|
|
|
- name: Upload distribution
|
2024-02-17 23:52:08 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2020-10-16 21:33:12 +00:00
|
|
|
with:
|
2024-02-17 23:52:08 +00:00
|
|
|
name: distribution-linux
|
2020-10-16 21:33:12 +00:00
|
|
|
path: distribution
|
|
|
|
Windows:
|
2022-03-08 14:26:40 +00:00
|
|
|
runs-on: windows-latest
|
2021-12-18 16:19:20 +00:00
|
|
|
needs: Prebuild
|
2020-10-16 21:33:12 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
max-parallel: 4
|
|
|
|
matrix:
|
|
|
|
tool: [msvc, mingw]
|
|
|
|
wordsize: [64, 32]
|
|
|
|
steps:
|
|
|
|
- name: 'Disable git autocrlf'
|
|
|
|
shell: bash
|
|
|
|
run: git config --global core.autocrlf input
|
2024-02-17 23:34:38 +00:00
|
|
|
- uses: actions/checkout@v4
|
2021-12-18 16:19:20 +00:00
|
|
|
- name: 'Download documentation'
|
2024-02-17 23:52:08 +00:00
|
|
|
uses: actions/download-artifact@v4
|
2020-10-16 21:33:12 +00:00
|
|
|
with:
|
2021-12-18 16:19:20 +00:00
|
|
|
name: doc
|
2021-05-08 13:12:16 +00:00
|
|
|
path: .
|
2020-10-24 23:31:09 +00:00
|
|
|
- name: 'Download external libs'
|
2024-02-17 23:52:08 +00:00
|
|
|
uses: actions/download-artifact@v4
|
2020-10-24 23:31:09 +00:00
|
|
|
with:
|
|
|
|
name: external-libs
|
|
|
|
path: .
|
2020-10-16 21:33:12 +00:00
|
|
|
- name: 'Build, test, generate binary distributions'
|
|
|
|
shell: cmd
|
|
|
|
run: build-scripts/build-windows.bat ${{ matrix.wordsize }} ${{ matrix.tool }}
|
|
|
|
- name: 'Upload binary distributions'
|
2024-02-17 23:52:08 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2020-10-16 21:33:12 +00:00
|
|
|
with:
|
2024-02-17 23:52:08 +00:00
|
|
|
name: distribution-windows-${{ matrix.wordsize }}-${{ matrix.tool }}
|
2020-10-16 21:33:12 +00:00
|
|
|
path: distribution
|
|
|
|
macOS:
|
2020-10-21 18:07:49 +00:00
|
|
|
runs-on: macos-latest
|
2021-12-18 16:19:20 +00:00
|
|
|
needs: Prebuild
|
2020-10-16 21:33:12 +00:00
|
|
|
steps:
|
2024-02-17 23:34:38 +00:00
|
|
|
- uses: actions/checkout@v4
|
2020-10-16 21:33:12 +00:00
|
|
|
- name: 'Mac build and test'
|
|
|
|
run: build-scripts/build-mac
|
|
|
|
AppImage:
|
|
|
|
runs-on: ubuntu-latest
|
2021-12-18 16:19:20 +00:00
|
|
|
needs: Prebuild
|
2020-10-16 21:33:12 +00:00
|
|
|
steps:
|
2024-02-17 23:34:38 +00:00
|
|
|
- uses: actions/checkout@v4
|
2020-10-16 21:33:12 +00:00
|
|
|
- name: 'Build AppImage'
|
|
|
|
run: build-scripts/build-appimage
|
|
|
|
- name: 'Upload AppImage'
|
2024-02-17 23:52:08 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2020-10-16 21:33:12 +00:00
|
|
|
with:
|
2024-02-17 23:52:08 +00:00
|
|
|
name: distribution-appimage
|
2020-10-16 21:33:12 +00:00
|
|
|
path: distribution
|
2023-02-25 21:05:14 +00:00
|
|
|
pikepdf:
|
2023-12-19 14:18:54 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
max-parallel: 1
|
|
|
|
matrix:
|
|
|
|
future: ['', 'future']
|
2023-02-25 21:05:14 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: Prebuild
|
|
|
|
steps:
|
2024-02-17 23:34:38 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-02-25 21:05:14 +00:00
|
|
|
- name: 'pikepdf'
|
2023-12-19 14:18:54 +00:00
|
|
|
run: build-scripts/test-pikepdf ${{ matrix.future }}
|
2020-10-16 21:33:12 +00:00
|
|
|
Sanitizers:
|
|
|
|
runs-on: ubuntu-latest
|
2021-12-18 16:19:20 +00:00
|
|
|
needs: Prebuild
|
2020-10-16 21:33:12 +00:00
|
|
|
steps:
|
2024-02-17 23:34:38 +00:00
|
|
|
- uses: actions/checkout@v4
|
2020-10-16 21:33:12 +00:00
|
|
|
- name: 'Sanitizer Tests'
|
|
|
|
run: build-scripts/test-sanitizers
|
2024-02-17 23:34:30 +00:00
|
|
|
CodeCov:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: Prebuild
|
|
|
|
steps:
|
2024-02-17 23:34:38 +00:00
|
|
|
- uses: actions/checkout@v4
|
2024-02-17 23:34:30 +00:00
|
|
|
- name: 'Code Coverage'
|
|
|
|
run: build-scripts/test-coverage
|
2024-02-18 14:22:27 +00:00
|
|
|
- id: set_branch
|
|
|
|
run: |
|
|
|
|
if [ "${{ github.event_name }}" = "push" ]; then
|
|
|
|
echo "override_branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
|
|
|
|
else
|
|
|
|
echo "override_branch=" >> $GITHUB_OUTPUT
|
|
|
|
fi
|
2024-02-17 23:34:30 +00:00
|
|
|
- name: Upload coverage reports to Codecov
|
|
|
|
uses: codecov/codecov-action@v4
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
2024-02-18 14:22:27 +00:00
|
|
|
override_branch: ${{ steps.set_branch.outputs.override_branch }}
|
2023-12-19 14:18:54 +00:00
|
|
|
QuickJobs:
|
2022-09-23 21:24:46 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: Prebuild
|
2023-12-19 14:18:54 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
max-parallel: 3
|
|
|
|
matrix:
|
|
|
|
script:
|
|
|
|
- build-fuzzer
|
2023-12-23 15:41:55 +00:00
|
|
|
- pkg-test
|
2023-12-19 14:18:54 +00:00
|
|
|
- build-linux32
|
2023-12-19 13:46:56 +00:00
|
|
|
- test-alt-zlib
|
2023-12-19 14:18:54 +00:00
|
|
|
- test-unsigned-char
|
|
|
|
- test-c++-next
|
2022-09-23 21:24:46 +00:00
|
|
|
steps:
|
2024-02-17 23:34:38 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-12-19 14:18:54 +00:00
|
|
|
- name: ${{ matrix.script }}
|
|
|
|
run: build-scripts/${{ matrix.script }}
|
2024-02-17 23:52:08 +00:00
|
|
|
MergeArtifacts:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs:
|
|
|
|
- Prebuild
|
|
|
|
- Linux
|
|
|
|
- Windows
|
|
|
|
- AppImage
|
|
|
|
steps:
|
|
|
|
- name: Merge Artifacts
|
|
|
|
uses: actions/upload-artifact/merge@v4
|
|
|
|
with:
|
|
|
|
name: distribution
|
|
|
|
pattern: distribution-*
|