Skip to content

build-snapshots

build-snapshots #49

Workflow file for this run

name: build-snapshots
on:
workflow_dispatch:
push:
tags:
- "v*.*"
branches: [ dev ]
env:
BUILD_TYPE: Release
QT_QPA_PLATFORM: offscreen
XDG_RUNTIME_DIR: '/tmp/runtime-runner'
QT_VERSION: 6.2.*
jobs:
build-linux:
if: ${{ false }} # disable for now
runs-on: ubuntu-20.04
name: '🐧 Ubuntu 20.04'
steps:
- id: commit
uses: pr-mpt/actions-commit-hash@v2
- name: '🧰 Checkout'
uses: actions/checkout@v3
with:
submodules: recursive
- name: '⚙️ Install Qt'
uses: jurplel/install-qt-action@v3
with:
cache: true
cache-key-prefix: ${{ runner.os }}-QtCache
version: ${{env.QT_VERSION}}
- name: '⚙️ Install dependencies'
run: sudo apt-get install -y appstream
- name: '⚙️ Configure CMake'
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=/usr
- name: '🚧 Build'
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j8
- name: '⚙️ Make AppDir'
working-directory: ${{github.workspace}}/build
run: make install DESTDIR=AppDir
- name: '⚙️ Install Linuxdeploy'
working-directory: ${{github.workspace}}/build
run: |
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
chmod +x linuxdeploy*.AppImage
- name: '📦 Make AppImage'
working-directory: ${{github.workspace}}/build
run: |
export EXTRA_PLATFORM_PLUGINS="libqoffscreen.so;libqminimal.so"
./linuxdeploy-x86_64.AppImage --appdir AppDir --plugin qt --output appimage
mv BandageNG*.AppImage BandageNG-Linux-${{steps.commit.outputs.short}}.AppImage
shell: bash
- name: '📤 Upload artifact: AppImage'
uses: actions/upload-artifact@v3
with:
name: BandageNG-Linux-${{steps.commit.outputs.short}}.AppImage
path: ${{github.workspace}}/build/BandageNG*.AppImage
build-mac:
if: ${{ false }} # disable for now
runs-on: macos-latest
name: '🍎 macOS'
steps:
- id: commit
uses: pr-mpt/actions-commit-hash@v2
- name: '🧰 Checkout'
uses: actions/checkout@v3
with:
submodules: recursive
- name: '⚙️ Install Qt'
uses: jurplel/install-qt-action@v3
with:
cache: true
cache-key-prefix: ${{ runner.os }}-QtCache
version: ${{env.QT_VERSION}}
- name: '⚙️ Configure CMake'
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DCMAKE_INSTALL_PREFIX=/usr
- name: '🚧 Build'
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j8
- name: '📦 Make DMG'
working-directory: ${{github.workspace}}/build
run: |
macdeployqt BandageNG.app -dmg
mv *.dmg BandageNG-macOS-${{steps.commit.outputs.short}}.dmg
- name: '📤 Upload artifact: DMG'
uses: actions/upload-artifact@v3
with:
name: BandageNG-macOS-${{steps.commit.outputs.short}}.dmg
path: ${{github.workspace}}/build/BandageNG*.dmg
build-windows:
runs-on: windows-latest
name: '🧊 Windows'
steps:
- id: commit
uses: pr-mpt/actions-commit-hash@v2
- name: '🧰 Checkout'
uses: actions/checkout@v3
with:
submodules: recursive
- name: '⚙️ Configure MSVC'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
spectre: true
- name: '⚙️ Install Qt'
uses: jurplel/install-qt-action@v3
with:
cache: true
cache-key-prefix: ${{ runner.os }}-QtCache
version: ${{env.QT_VERSION}}
- name: '⚙️ Install Zlib'
run: |
C:\msys64\usr\bin\pacman -S zlib-devel --noconfirm
- name: '⚙️ Configure CMake'
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_LIBRARY_PATH=C:\msys64\usr\lib
- name: '🚧 Build'
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j8
# Upload continuous build
upload:
if: ${{ false }} # disable for now
name: '🗂 Create release and upload artifacts'
needs:
- build-linux
- build-mac
runs-on: ubuntu-20.04
steps:
- name: '⚙️ Install dependencies'
run: sudo apt-get install -y libfuse2
- name: '📥 Download artifacts'
uses: actions/download-artifact@v3
- name: '🗂 Inspect directory after downloading artifacts'
run: ls -alFR
- name: '🚀 Create release and upload artifacts'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
wget -q https://github.com/TheAssassin/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage
chmod +x pyuploadtool-x86_64.AppImage
./pyuploadtool-x86_64.AppImage **/BandageNG-Linux-*.AppImage
./pyuploadtool-x86_64.AppImage **/BandageNG-macOS-*.dmg