MSYS2 PKGBUILD #16
This file contains 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: MSYS2 PKGBUILD | |
on: | |
push: | |
tags: | |
- "v*" | |
workflow_dispatch: | |
jobs: | |
win-makepkg: | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- { sys: mingw64, env: x86_64, renderer: poppler, poppler: ON, mupdf: OFF, qt: 6, icon: 'π¦' } | |
- { sys: mingw64, env: x86_64, renderer: mupdf, poppler: OFF, mupdf: ON, qt: 6, icon: 'π¦' } | |
- { sys: ucrt64, env: ucrt-x86_64, renderer: poppler, poppler: ON, mupdf: OFF, qt: 6, icon: 'π¨' } | |
- { sys: ucrt64, env: ucrt-x86_64, renderer: mupdf, poppler: OFF, mupdf: ON, qt: 6, icon: 'π¨' } | |
- { sys: clang64, env: clang-x86_64, renderer: poppler, poppler: ON, mupdf: OFF, qt: 6, icon: 'π§' } | |
- { sys: clang64, env: clang-x86_64, renderer: mupdf, poppler: OFF, mupdf: ON, qt: 6, icon: 'π§' } | |
name: π§${{ matrix.icon }} ${{ matrix.sys }} ${{ matrix.renderer }} qt${{ matrix.qt }} | makepkg | |
defaults: | |
run: | |
shell: msys2 {0} | |
env: | |
MINGW_ARCH: ${{ matrix.sys }} | |
_use_poppler: ${{ matrix.poppler }} | |
_use_mupdf: ${{ matrix.mupdf }} | |
_qt_version_major: ${{ matrix.qt }} | |
steps: | |
- name: 'π§° Checkout' | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: '${{ matrix.icon }} Setup MSYS2' | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: ${{ matrix.sys }} | |
update: true | |
install: git base-devel tree | |
- name: 'π§ Build package' | |
run: | | |
cp packaging/PKGBUILD_MSYS2_git . | |
dos2unix PKGBUILD_MSYS2_git | |
if [ ${{ matrix.sys }} != clang64 ]; then pacman -S --noconfirm --noprogressbar mingw-w64-${{ matrix.env }}-gcc; else pacman -S --noconfirm --noprogressbar mingw-w64-${{ matrix.env }}-clang; fi | |
makepkg-mingw --noconfirm --noprogressbar -sCLfp PKGBUILD_MSYS2_git | |
- name: 'π€ Upload artifact: package' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.sys }}-BeamerPresenter-${{ matrix.renderer }}-qt${{ matrix.qt }} | |
path: ${{ github.workspace }}\mingw-w64-${{ matrix.env }}-beamerpresenter-${{ matrix.renderer }}-qt${{ matrix.qt }}-git-*.pkg.tar.zst | |
- name: 'π οΈ Install package' | |
run: pacman -U --noconfirm --noprogressbar mingw-w64-${{ matrix.env }}-beamerpresenter-${{ matrix.renderer }}-qt${{ matrix.qt }}-git-*.pkg.tar.zst | |
- name: 'π¦ Test package' | |
run: | | |
which beamerpresenter | |
beamerpresenter --version | |
dos2unix tests/minimal.pdf | |
dos2unix tests/minimal.xml | |
timeout 20 beamerpresenter --test --platform minimal tests/minimal.pdf | |
timeout 20 beamerpresenter --test --platform minimal tests/minimal.xml |