Update .gitea/workflows/build-git.yaml
This commit is contained in:
@@ -1,72 +1,28 @@
|
|||||||
#--------------------------------------------------------------------------------
|
name: CI
|
||||||
# Workflow configuration
|
|
||||||
#--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
name: Build
|
|
||||||
on:
|
on:
|
||||||
push: # Run on push
|
workflow_dispatch
|
||||||
pull_request: # Run on pull-request
|
push # when to trigger this. Here, on every push
|
||||||
|
|
||||||
#--------------------------------------------------------------------------------
|
|
||||||
# Define application name & version
|
|
||||||
#--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
env:
|
|
||||||
VERSION: "1.0.0"
|
|
||||||
EXECUTABLE: "appqyouradio"
|
|
||||||
APPLICATION: "QYouRadio"
|
|
||||||
QML_DIR_NIX: "assets/qml"
|
|
||||||
QML_DIR_WIN: "assets\\qml"
|
|
||||||
|
|
||||||
#--------------------------------------------------------------------------------
|
|
||||||
# Workflow jobs (GNU/Linux, macOS & Windows)
|
|
||||||
#--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
#
|
build_linux
|
||||||
# GNU/Linux build (we run on Ubuntu 16.04 to generate AppImage)
|
name: "Build and test"
|
||||||
#
|
|
||||||
build-linux:
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
#
|
- name: Install dependencies (linux)
|
||||||
# Checkout the repository
|
run: sudo apt install ninja-build
|
||||||
#
|
if: matrix.os == 'ubuntu-latest' # conditional, runs this step only on the Ubuntu runner
|
||||||
- name: Checkout repository and submodules
|
- name: Install Qt
|
||||||
uses: actions/checkout@v2
|
uses: jurplel/install-qt-action@v3
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
version: '6.9.3'
|
||||||
|
- uses: actions/checkout@v3 # Actually check out the sources. GH Actions can run for events that may not require
|
||||||
|
# sources (e.g. when someone comments on an issue)
|
||||||
|
|
||||||
- name: Install Qt
|
# Here we call CMake manually, there are solutions for that in the Marketplace: https://github.com/marketplace/actions/run-cmake
|
||||||
uses: jurplel/install-qt-action@v3
|
- name: Build
|
||||||
with:
|
# We don't need to set up the environment variable for CMake to see Qt because the install-qt-action
|
||||||
aqtversion: '==3.1.*'
|
# sets up the necessary variables automatically
|
||||||
version: '6.10.0'
|
run: cmake -S . -B build -G "Ninja Multi-Config" && cmake --build build --config Release
|
||||||
host: 'linux'
|
|
||||||
target: 'desktop'
|
|
||||||
arch: 'linux_gcc_64'
|
|
||||||
modules: 'qtmultimedia'
|
|
||||||
archives: 'qtwayland qtdeclarative qtbase'
|
|
||||||
|
|
||||||
#
|
|
||||||
# Install additional dependencies, stolen from:
|
|
||||||
# https://github.com/mapeditor/tiled/blob/master/.github/workflows/packages.yml
|
|
||||||
#
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install libgl1-mesa-dev libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 libzstd-dev cmake
|
|
||||||
|
|
||||||
#
|
|
||||||
# Compile the application
|
|
||||||
#
|
|
||||||
- name: Compile
|
|
||||||
run: |
|
|
||||||
mkdir build/
|
|
||||||
cd build
|
|
||||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
|
|
||||||
make -j8
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Create the AppImage
|
# Create the AppImage
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user