Ensure we report malformed paths / walks properly. #75
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-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: | |
runs-on: ubuntu-20.04 | |
name: '🐧 Ubuntu 20.04' | |
steps: | |
- id: commit | |
uses: pr-mpt/actions-commit-hash@v3 | |
- name: '🧰 Checkout' | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: '⚙️ Grab cmake & ninja' | |
uses: lukka/get-cmake@latest | |
- 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 -G Ninja | |
- name: '🚧 Build' | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
- name: '⚙️ Make AppDir' | |
working-directory: ${{github.workspace}}/build | |
run: DESTDIR=AppDir cmake --install ${{github.workspace}}/build | |
- 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@v4 | |
with: | |
name: BandageNG-Linux-${{steps.commit.outputs.short}}.AppImage | |
path: ${{github.workspace}}/build/BandageNG*.AppImage | |
build-mac: | |
runs-on: macos-latest | |
name: '🍎 macOS' | |
steps: | |
- id: commit | |
uses: pr-mpt/actions-commit-hash@v3 | |
- name: '🧰 Checkout' | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: '⚙️ Grab cmake & ninja' | |
uses: lukka/get-cmake@latest | |
- 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 -G Ninja | |
- name: '🚧 Build' | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
- 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@v4 | |
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@v3 | |
- name: '🧰 Checkout' | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: '⚙️ Grab cmake & ninja' | |
uses: lukka/get-cmake@latest | |
- name: '⚙️ Configure MSVC' | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: x64 | |
- 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_INSTALL_PREFIX=/usr -G Ninja | |
- name: '🚧 Build' | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
- name: '📦 Make package' | |
working-directory: ${{github.workspace}}/build | |
run: | | |
mkdir BandageNG | |
cp BandageNG.exe BandageNG/ | |
windeployqt BandageNG --release --compiler-runtime | |
7z a BandageNG-win-${{steps.commit.outputs.short}}.zip BandageNG -r | |
- name: '📤 Upload artifact: ZIP' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: BandageNG-win-${{steps.commit.outputs.short}}.zip | |
path: ${{github.workspace}}/build/BandageNG*.zip | |
# Upload continuous build | |
upload: | |
name: '🗂 Create release and upload artifacts' | |
needs: | |
- build-linux | |
- build-mac | |
- build-windows | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: '⚙️ Install dependencies' | |
run: sudo apt-get install -y libfuse2 | |
- name: '📥 Download artifacts' | |
uses: actions/download-artifact@v4 | |
- 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 | |
./pyuploadtool-x86_64.AppImage **/BandageNG-win-*.zip |