rework CI deps #150
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_LINUX: 1 | |
CACHE_VERSION_MACOS: 1 | |
CACHE_VERSION_WIN64: 1 | |
jobs: | |
linux-x86_64: | |
runs-on: ubuntu-latest | |
container: | |
image: ubuntu:22.04 | |
steps: | |
- run: apt-get update -qq && apt-get install -yqq git | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Set up cache | |
id: cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/PawPawBuilds | |
key: linux-x86_64-v${{ env.CACHE_VERSION_LINUX }} | |
- name: Set up dependencies | |
run: | | |
./src/PawPaw/.github/workflows/bootstrap-deps.sh linux-x86_64 | |
sudo apt-get install -yqq libqt5svg5-dev qtbase5-dev qtbase5-dev-tools xdg-user-dirs | |
- name: Build dependencies | |
run: | | |
./src/PawPaw/bootstrap-mod.sh linux-x86_64 && ./src/PawPaw/.cleanup.sh linux-x86_64 | |
- name: Build | |
if: steps.cache.outputs.cache-hit == 'true' | |
run: | | |
make | |
- name: Validate plugins | |
if: steps.cache.outputs.cache-hit == 'true' | |
run: | | |
./utils/plugin-builder/validate-plugins.sh | |
# FIXME dirty carla leaves temp folders around | |
rm -rf *.tmp | |
- name: Set sha8 | |
run: | | |
echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV | |
- name: Pack | |
if: steps.cache.outputs.cache-hit == 'true' | |
run: | | |
mkdir mod-app-${{ github.event.pull_request.number || env.SHA8 }}-linux-x86_64 | |
mv build mod-app-${{ github.event.pull_request.number || env.SHA8 }}-linux-x86_64/mod-app | |
cp utils/linux/mod-app.* mod-app-${{ github.event.pull_request.number || env.SHA8 }}-linux-x86_64/ | |
tar chJf mod-app-${{ github.event.pull_request.number || env.SHA8 }}-linux-x86_64.tar.xz mod-app-${{ github.event.pull_request.number || env.SHA8 }}-linux-x86_64 | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: mod-app-${{ github.event.pull_request.number || env.SHA8 }}-linux-x86_64 | |
path: | | |
*.tar.xz | |
- uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
tag_name: ${{ github.ref_name }} | |
name: ${{ github.ref_name }} | |
draft: false | |
prerelease: false | |
files: | | |
*.tar.xz | |
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_MACOS }} | |
- name: Set up dependencies | |
run: | | |
./src/PawPaw/.github/workflows/bootstrap-deps.sh macos-universal-10.15 | |
- name: Build dependencies | |
run: | | |
./src/PawPaw/bootstrap-mod.sh macos-universal-10.15 && ./src/PawPaw/.cleanup.sh macos-universal-10.15 | |
- name: Build | |
if: steps.cache.outputs.cache-hit == 'true' | |
run: | | |
make macos | |
- name: Validate plugins | |
if: steps.cache.outputs.cache-hit == 'true' | |
run: | | |
./utils/plugin-builder/validate-plugins.sh | |
# FIXME dirty carla leaves temp folders around | |
rm -rf *.tmp | |
- name: Set sha8 | |
run: | | |
echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV | |
- name: Pack | |
if: steps.cache.outputs.cache-hit == 'true' | |
run: | | |
./utils/macos/macos-dmg.sh | |
mv mod-app-*.dmg mod-app-${{ github.event.pull_request.number || env.SHA8 }}-macOS.dmg | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: mod-app-${{ github.event.pull_request.number || env.SHA8 }}-macOS | |
path: | | |
*.dmg | |
- uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
tag_name: ${{ github.ref_name }} | |
name: ${{ github.ref_name }} | |
draft: false | |
prerelease: false | |
files: | | |
*.dmg | |
win64: | |
runs-on: ubuntu-latest | |
container: | |
image: ubuntu:22.04 | |
steps: | |
- run: apt-get update -qq && apt-get install -yqq git | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Set up cache | |
id: cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/PawPawBuilds | |
key: win64-v${{ env.CACHE_VERSION_WIN64 }} | |
- name: Set up dependencies | |
run: | | |
./src/PawPaw/.github/workflows/bootstrap-deps.sh win64 | |
sudo apt-get install -yqq xdg-user-dirs xvfb | |
- name: Build dependencies | |
run: | | |
./src/PawPaw/bootstrap-mod.sh win64 && ./src/PawPaw/.cleanup.sh win64 | |
- name: Build | |
if: steps.cache.outputs.cache-hit == 'true' | |
run: | | |
make win64 | |
- name: Validate plugins | |
if: steps.cache.outputs.cache-hit == 'true' | |
run: | | |
./utils/plugin-builder/validate-plugins.sh | |
# FIXME dirty carla leaves temp folders around | |
rm -rf *.tmp | |
- name: Set sha8 | |
run: | | |
echo "SHA8=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV | |
- name: Pack | |
if: steps.cache.outputs.cache-hit == 'true' | |
run: | | |
xvfb-run ./utils/win64/win64-installer.sh | |
mv mod-app-*.exe mod-app-${{ github.event.pull_request.number || env.SHA8 }}-win64.exe | |
rm -rf build/innosetup-* | |
mv build mod-app-${{ github.event.pull_request.number || env.SHA8 }}-win64 | |
zip -r -9 mod-app-${{ github.event.pull_request.number || env.SHA8 }}-win64.zip mod-app-${{ github.event.pull_request.number || env.SHA8 }}-win64 | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: mod-app-${{ github.event.pull_request.number || env.SHA8 }}-win64 | |
path: | | |
*.exe | |
*.zip | |
- uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
tag_name: ${{ github.ref_name }} | |
name: ${{ github.ref_name }} | |
draft: false | |
prerelease: false | |
files: | | |
*.exe |