Commit 92635d120316dc3d3b603649c8713b50a753d32d
1 parent
1019ed57
Add GitHub Actions workflow
Showing
3 changed files
with
122 additions
and
0 deletions
.github/workflows/main.yml
0 → 100644
| 1 | +name: QPDF Build | |
| 2 | +env: | |
| 3 | + QTEST_COLOR: 1 | |
| 4 | +on: | |
| 5 | + push: | |
| 6 | + branches: | |
| 7 | + - main | |
| 8 | + - master | |
| 9 | + - build | |
| 10 | + pull_request: | |
| 11 | +jobs: | |
| 12 | + Distfiles: | |
| 13 | + # Generate distfiles.zip, which is a prerequisite for the mac and | |
| 14 | + # Windows builds. Only the mac and Windows builds actually "need" | |
| 15 | + # it, but declaring all the jobs to need it forces it to run | |
| 16 | + # first. | |
| 17 | + runs-on: ubuntu-latest | |
| 18 | + steps: | |
| 19 | + - uses: actions/checkout@v2 | |
| 20 | + - name: 'Create distfiles.zip' | |
| 21 | + run: build-scripts/make-distfiles | |
| 22 | + - name: 'Upload extra distribution files' | |
| 23 | + uses: actions/upload-artifact@v1 | |
| 24 | + with: | |
| 25 | + name: distfiles | |
| 26 | + path: distfiles.zip | |
| 27 | + Linux: | |
| 28 | + runs-on: ubuntu-latest | |
| 29 | + steps: | |
| 30 | + - uses: actions/checkout@v2 | |
| 31 | + - name: 'Generate, build, and test' | |
| 32 | + run: build-scripts/build-linux | |
| 33 | + - name: Upload distribution | |
| 34 | + uses: actions/upload-artifact@v1 | |
| 35 | + with: | |
| 36 | + name: distribution | |
| 37 | + path: distribution | |
| 38 | + Windows: | |
| 39 | + # If updating this, see note in TODO about MSVC wildcard expansion. | |
| 40 | + runs-on: windows-2019 | |
| 41 | + needs: Distfiles | |
| 42 | + strategy: | |
| 43 | + fail-fast: false | |
| 44 | + max-parallel: 4 | |
| 45 | + matrix: | |
| 46 | + tool: [msvc, mingw] | |
| 47 | + wordsize: [64, 32] | |
| 48 | + steps: | |
| 49 | + - name: 'Disable git autocrlf' | |
| 50 | + shell: bash | |
| 51 | + run: git config --global core.autocrlf input | |
| 52 | + - uses: actions/checkout@v2 | |
| 53 | + - name: 'Download distribution files' | |
| 54 | + uses: actions/download-artifact@v2 | |
| 55 | + with: | |
| 56 | + name: distfiles | |
| 57 | + - name: 'Build, test, generate binary distributions' | |
| 58 | + shell: cmd | |
| 59 | + run: build-scripts/build-windows.bat ${{ matrix.wordsize }} ${{ matrix.tool }} | |
| 60 | + - name: 'Upload binary distributions' | |
| 61 | + uses: actions/upload-artifact@v1 | |
| 62 | + with: | |
| 63 | + name: distribution | |
| 64 | + path: distribution | |
| 65 | + macOS: | |
| 66 | + runs-on: macos-10.15 | |
| 67 | + needs: Distfiles | |
| 68 | + steps: | |
| 69 | + - uses: actions/checkout@v2 | |
| 70 | + - name: 'Download distribution files' | |
| 71 | + uses: actions/download-artifact@v2 | |
| 72 | + with: | |
| 73 | + name: distfiles | |
| 74 | + - name: 'Mac build and test' | |
| 75 | + run: build-scripts/build-mac | |
| 76 | + AppImage: | |
| 77 | + runs-on: ubuntu-latest | |
| 78 | + needs: Distfiles | |
| 79 | + steps: | |
| 80 | + - uses: actions/checkout@v2 | |
| 81 | + - name: 'Build AppImage' | |
| 82 | + run: build-scripts/build-appimage | |
| 83 | + - name: 'Upload AppImage' | |
| 84 | + uses: actions/upload-artifact@v1 | |
| 85 | + with: | |
| 86 | + name: distribution | |
| 87 | + path: distribution | |
| 88 | + Linux32: | |
| 89 | + runs-on: ubuntu-latest | |
| 90 | + needs: Distfiles | |
| 91 | + steps: | |
| 92 | + - uses: actions/checkout@v2 | |
| 93 | + - name: 'Linux 32-bit' | |
| 94 | + run: build-scripts/build-linux32 | |
| 95 | + Fuzzers: | |
| 96 | + runs-on: ubuntu-latest | |
| 97 | + needs: Distfiles | |
| 98 | + steps: | |
| 99 | + - uses: actions/checkout@v2 | |
| 100 | + - name: 'Build Fuzzer' | |
| 101 | + run: build-scripts/build-fuzzer | |
| 102 | + Sanitizers: | |
| 103 | + runs-on: ubuntu-latest | |
| 104 | + needs: Distfiles | |
| 105 | + steps: | |
| 106 | + - uses: actions/checkout@v2 | |
| 107 | + - name: 'Sanitizer Tests' | |
| 108 | + run: build-scripts/test-sanitizers | ... | ... |
README.md
| ... | ... | @@ -2,6 +2,7 @@ |
| 2 | 2 | |
| 3 | 3 | [](http://qpdf.sourceforge.net) |
| 4 | 4 | |
| 5 | +[](https://github.com/qpdf/qpdf/actions) | |
| 5 | 6 | [](https://dev.azure.com/qpdf/qpdf/_build/latest?definitionId=5) [](https://lgtm.com/projects/g/qpdf/qpdf/alerts/) |
| 6 | 7 | [](https://lgtm.com/projects/g/qpdf/qpdf/context:cpp) |
| 7 | 8 | ... | ... |
TODO
| ... | ... | @@ -91,6 +91,19 @@ Fuzz Errors |
| 91 | 91 | 18745, 20391, 23581 |
| 92 | 92 | * Timeout: 15471, 17630 |
| 93 | 93 | |
| 94 | +GitHub Actions | |
| 95 | +============== | |
| 96 | + | |
| 97 | +* Actions are triggered on push to main and master. When we eventually | |
| 98 | + rename master to main, make sure the reference to master is removed | |
| 99 | + from .github/workflows/*.yml. | |
| 100 | + | |
| 101 | +* At the time of migrating from Azure Pipelines to GitHub Actions | |
| 102 | + (2020-10), there was no standard test result publisher (to replace | |
| 103 | + the PublishTestResults@2 task). There are some third-party actions, | |
| 104 | + but I'd rather not depend on them. Keep an eye open for this coming | |
| 105 | + to GitHub Actions. | |
| 106 | + | |
| 94 | 107 | Windows Build |
| 95 | 108 | ============= |
| 96 | 109 | ... | ... |