Skip to content

Automated Builds

Automated Builds #73

Workflow file for this run

name: Automated Builds
env:
QT_VERSION: '6.7.3'
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:
branches: [ "master" ]
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-22.04
- os: ubuntu-22.04-arm64-2core
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- name: Download source codes
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y build-essential ninja-build patchelf libfuse2 libglib2.0-dev
pip install aqtinstall
mkdir executables
- name: Install Qt
if: matrix.os == 'ubuntu-22.04'
run: |
python3 -m aqt install-qt linux desktop $QT_VERSION linux_gcc_64 -O /tmp/qt
- name: Install Qt
if: matrix.os == 'ubuntu-22.04-arm64-2core'
run: |
python3 -m aqt install-qt linux_arm64 desktop $QT_VERSION linux_gcc_arm64 -O /tmp/qt
- name: Build for amd64
if: matrix.os == 'ubuntu-22.04'
run: |
chmod +x /tmp/qt/$QT_VERSION/gcc_64/bin/qt-cmake
/tmp/qt/$QT_VERSION/gcc_64/bin/qt-cmake \
-S . \
-B build-amd64 \
-G Ninja \
-D CMAKE_BUILD_TYPE=Release
cmake --build build-amd64 --parallel --config Release
cp build-amd64/deploy/*.AppImage executables
- name: Build for Linux arm64
if: matrix.os == 'ubuntu-22.04-arm64-2core'
run: |
chmod +x /tmp/qt/$QT_VERSION/gcc_arm64/bin/qt-cmake
/tmp/qt/$QT_VERSION/gcc_arm64/bin/qt-cmake \
-S . \
-B build-arm64 \
-G Ninja \
-D CMAKE_BUILD_TYPE=Release
cmake --build build-arm64 --parallel --config Release
cp build-arm64/deploy/*.AppImage executables
- name: Cache executables for publication
uses: actions/cache/save@v4
with:
enableCrossOsArchive: true
key: ${{ matrix.os }}-${{ github.run_id }}-${{ github.run_attempt }}
path: executables
publish:
name: Publish
needs: build
runs-on: ubuntu-22.04
permissions: write-all
steps:
- name: Restore Linux amd64 executables
uses: actions/cache/restore@v4
with:
fail-on-cache-miss: true
key: ubuntu-22.04-${{ github.run_id }}-${{ github.run_attempt }}
path: executables
- name: Restore Linux arm64 executables
uses: actions/cache/restore@v4
with:
fail-on-cache-miss: true
key: ubuntu-22.04-arm64-2core-${{ github.run_id }}-${{ github.run_attempt }}
path: executables
- name: Publish executables
uses: marvinpinto/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: latest
title: latest
prerelease: false
files: |
executables/*.AppImage