multi-stage CI setup, build qt too #12
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: build | |
on: [push, pull_request] | |
env: | |
CACHE_VERSION: 2 | |
PAWPAW_SKIP_LTO: 1 | |
jobs: | |
macos: | |
runs-on: macos-11 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Set up cache | |
id: cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/PawPawBuilds | |
key: macos-v${{ env.CACHE_VERSION }} | |
- name: Set sha8 | |
id: slug | |
run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" | |
- name: Set up dependencies | |
run: | | |
brew install meson | |
- name: Build dependencies | |
run: | | |
./PawPaw/bootstrap-mod.sh macos-universal-10.15 && ./PawPaw/.cleanup.sh macos-universal-10.15 | |
- name: Build | |
if: steps.cache.outputs.cache-hit == 'true' | |
run: | | |
make PAWPAW_TARGET=macos-universal-10.15 | |
- name: Pack | |
if: steps.cache.outputs.cache-hit == 'true' | |
run: | | |
mv build mod-app-macOS-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} | |
tar chzf mod-app-macOS-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.tar.gz mod-app-macOS-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ github.event.repository.name }}-macOS-${{ matrix.target }}-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} | |
path: | | |
*.tar.gz | |
windows: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Set up cache | |
id: cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/PawPawBuilds | |
key: ${{ matrix.target }}-v${{ env.CACHE_VERSION }} | |
- name: Set sha8 | |
id: slug | |
run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" | |
- name: Fix GitHub's mess | |
run: | | |
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list | |
sudo dpkg --add-architecture i386 | |
sudo apt-get update -qq | |
- name: Set up dependencies | |
run: | | |
sudo apt-get install -yqq --allow-downgrades autopoint binutils-mingw-w64-x86-64 libc6:i386 libgcc-s1:i386 libstdc++6:i386 g++-mingw-w64-x86-64 gperf meson mingw-w64 wine-stable | |
- name: Build dependencies | |
run: | | |
./PawPaw/bootstrap-mod.sh win64 && ./PawPaw/.cleanup.sh win64 | |
- name: Build | |
if: steps.cache.outputs.cache-hit == 'true' | |
run: | | |
make PAWPAW_TARGET=win64 | |
- name: Pack | |
if: steps.cache.outputs.cache-hit == 'true' | |
run: | | |
mv build mod-app-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} | |
zip -r -9 mod-app-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}.zip mod-app-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ github.event.repository.name }}-${{ matrix.target }}-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} | |
path: | | |
*.zip |