Skip to content

Replaced LXQt build tools with simplified version #19

Replaced LXQt build tools with simplified version

Replaced LXQt build tools with simplified version #19

Workflow file for this run

name: Build
on:
push:
branches:
- '*'
tags:
- '[0-9]*'
pull_request:
branches:
- '*'
defaults:
run:
shell: bash
env:
BUILD_TYPE: Release
APP_NAME: magnifiqus
jobs:
linux:
name: Linux
runs-on: ubuntu-latest
strategy:
matrix:
config:
- { name: "GCC", cc: gcc, cxx: g++ }
- { name: "clang", cc: clang, cxx: clang++ }
env:
cc: ${{ matrix.config.cc }}
cxx: ${{ matrix.config.cxx }}
steps:
- name: Set Archive Name
if: ${{ matrix.config.cc == 'gcc' }}
run: echo "ARCHIVE_NAME=$APP_NAME-$GITHUB_REF_NAME-linux" >> "$GITHUB_ENV"
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Update Packages
run: sudo apt-get update
- name: Install Dependencies
run: |
packages=(
qtbase5-dev
qttools5-dev
libqt5svg5-dev
libqt5x11extras5-dev
)
sudo apt-get install ${packages[@]}
- name: Configure
run: |
options=(
-D CMAKE_INSTALL_PREFIX="/usr"
-D CMAKE_BUILD_TYPE="$BUILD_TYPE"
-B ${{ runner.workspace }}/build
)
cmake ${options[@]}
- name: Build
run: cmake --build ${{ runner.workspace }}/build --config "$BUILD_TYPE"
- name: Create package
if: ${{ github.ref_type == 'tag' && matrix.config.cc == 'gcc' }}
working-directory: ${{ runner.workspace }}/build
run: |
DESTDIR="$(pwd)/$ARCHIVE_NAME" \
cmake --build . --config "$BUILD_TYPE" --target install
tar czvf "$ARCHIVE_NAME".tar.gz "$ARCHIVE_NAME"
- name: Upload Artifacts
if: ${{ github.ref_type == 'tag' && matrix.config.cc == 'gcc' }}
uses: actions/upload-artifact@v3
with:
name: Linux Artifacts
path: ${{ runner.workspace }}/build/${{ env.ARCHIVE_NAME }}.tar.gz
deploy:
name: Deployment
if: ${{ github.ref_type == 'tag' }}
runs-on: ubuntu-latest
needs:
- linux
steps:
- name: Linux download
uses: actions/download-artifact@v3
with:
name: Linux Artifacts
- name: Display File Information
run: ls -lR
- name: Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
draft: false
prerelease: false
files: |
${{ env.APP_NAME }}-${{ github.ref_name }}-*
${{ env.APP_NAME }}-${{ github.ref_name }}.*