Fix build, try to guess target type #5
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: 1 | |
jobs: | |
macos: | |
runs-on: macos-11 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Set up cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/PawPawBuilds | |
key: macos-universal-v${{ env.CACHE_VERSION }} | |
- name: Set up dependencies | |
run: | | |
brew install meson | |
- name: Build | |
run: | | |
make PAWPAW_TARGET=macos-universal | |
- name: Pack | |
run: | | |
mv build mod-app-macOS-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} | |
tar chz 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 }} | |
- name: Set sha8 | |
id: slug | |
run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" | |
- 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 | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/PawPawBuilds | |
key: ${{ matrix.target }}-v${{ env.CACHE_VERSION }} | |
- 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 | |
run: | | |
make PAWPAW_TARGET=win64 | |
- name: Pack | |
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 }} | |
- name: Set sha8 | |
id: slug | |
run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ github.event.repository.name }}-${{ matrix.target }}-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }} | |
path: | | |
*.zip |