2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-11-04 20:37:50 +00:00
qpdf/.github/workflows/main.yml

133 lines
3.6 KiB
YAML

name: QPDF Build
env:
QTEST_COLOR: 1
on:
push:
branches:
- main
- build
- build/*
paths-ignore:
- 'ChangeLog'
- 'README*'
- 'TODO'
pull_request:
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'
jobs:
Prebuild:
# Run steps that are needed by the Windows build but are easier to
# build on Linux. Also create the documentation distribution.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: 'Run pre-build steps'
run: build-scripts/prebuild
- name: 'Upload documentation for later build steps'
uses: actions/upload-artifact@v1
with:
name: doc
path: doc.zip
- name: 'Upload external libs'
uses: actions/upload-artifact@v1
with:
name: external-libs
path: external-libs-dist
- name: 'Upload doc distribution'
uses: actions/upload-artifact@v1
with:
name: distribution
path: distribution
Linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: 'Generate, build, and test'
run: build-scripts/build-linux
- name: Upload distribution
uses: actions/upload-artifact@v1
with:
name: distribution
path: distribution
Windows:
runs-on: windows-latest
needs: Prebuild
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
- uses: actions/checkout@v2
- name: 'Download documentation'
uses: actions/download-artifact@v2
with:
name: doc
path: .
- name: 'Download external libs'
uses: actions/download-artifact@v2
with:
name: external-libs
path: .
- name: 'Build, test, generate binary distributions'
shell: cmd
run: build-scripts/build-windows.bat ${{ matrix.wordsize }} ${{ matrix.tool }}
- name: 'Upload binary distributions'
uses: actions/upload-artifact@v1
with:
name: distribution
path: distribution
macOS:
runs-on: macos-latest
needs: Prebuild
steps:
- uses: actions/checkout@v2
- name: 'Download external libs'
uses: actions/download-artifact@v2
with:
name: external-libs
path: .
- name: 'Mac build and test'
run: build-scripts/build-mac
AppImage:
runs-on: ubuntu-latest
needs: Prebuild
steps:
- uses: actions/checkout@v2
- name: 'Build AppImage'
run: build-scripts/build-appimage
- name: 'Upload AppImage'
uses: actions/upload-artifact@v1
with:
name: distribution
path: distribution
Linux32:
runs-on: ubuntu-latest
needs: Prebuild
steps:
- uses: actions/checkout@v2
- name: 'Linux 32-bit'
run: build-scripts/build-linux32
Fuzzers:
runs-on: ubuntu-latest
needs: Prebuild
steps:
- uses: actions/checkout@v2
- name: 'Build Fuzzer'
run: build-scripts/build-fuzzer
Sanitizers:
runs-on: ubuntu-latest
needs: Prebuild
steps:
- uses: actions/checkout@v2
- name: 'Sanitizer Tests'
run: build-scripts/test-sanitizers