Files
qyouvideo/.gitea/workflows/build-git.yaml
Workflow config file is invalid. Please check your config file: yaml: line 18: did not find expected key
Dark Steveneq e66cf1b137 Reapply "dwjakld"
This reverts commit e091c97305.
2025-10-18 23:34:54 +02:00

127 lines
4.0 KiB
YAML

name: CI
on:
workflow_dispatch
push # when to trigger this. Here, on every push
jobs:
build_linux:
name: "Build and test"
runs-on: ubuntu-latest
steps:
- name: Install dependencies (linux)
run: sudo apt install ninja-build
if: matrix.os == 'ubuntu-latest' # conditional, runs this step only on the Ubuntu runner
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: '6.9.3'
- uses: https://github.com/actions/checkout@v3
- name: Build
# We don't need to set up the environment variable for CMake to see Qt because the install-qt-action
# sets up the necessary variables automatically
run: cmake -S . -B build -G "Ninja Multi-Config" && cmake --build build --config Release
#
# Create the AppImage
#
- name: Create AppImage
run: |
make INSTALL_ROOT=appdir install
wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" -O linuxdeployqt
chmod a+x linuxdeployqt
./linuxdeployqt appdir/usr/share/applications/*.desktop -appimage -bundle-non-qt-libs -extra-plugins=imageformats/libqsvg.so -qmldir="${{env.QML_DIR_NIX}}"
#
# Rename AppImage to match "%AppName%-%Version%-Linux.AppImage" format
#
- name: Rename AppImage
run: mv *.AppImage ${{env.EXECUTABLE}}-${{env.VERSION}}-Linux.AppImage
#
# Upload AppImage to build artifacts
#
- name: Upload AppImage
uses: actions/upload-artifact@v2
with:
name: ${{env.EXECUTABLE}}-${{env.VERSION}}-Linux.AppImage
path: ${{env.EXECUTABLE}}-${{env.VERSION}}-Linux.AppImage
#
# Windows build
#
build-windows:
runs-on: windows-latest
steps:
#
# Checkout the repository
#
- name: Checkout repository and submodules
uses: actions/checkout@v2
with:
submodules: recursive
#
# Configure MSVC
#
- name: Configure MSVC
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
spectre: true
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
aqtversion: '==3.1.*'
version: '6.8.0'
host: 'windows'
target: 'desktop'
arch: 'win64_msvc2022_64'
archives: 'qtdeclarative qtbase opengl32sw d3dcompiler_47'
#
# Install NSIS
#
- name: Install NSIS
run: |
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
scoop bucket add extras
scoop install nsis
#
# Compile application
#
- name: Compile
run: |
qmake ${{env.QMAKE_PROJECT}} CONFIG+=release
nmake
#
# Copy Qt DLLs, compiler runtime & application icon
#
- name: Deploy
run: |
mkdir bin
move release/${{env.EXECUTABLE}}.exe bin
windeployqt bin/${{env.EXECUTABLE}}.exe -qmldir="${{env.QML_DIR_WIN}}" --compiler-runtime
mkdir "${{env.APPLICATION}}"
move bin "${{env.APPLICATION}}"
xcopy deploy\windows\resources\icon.ico "${{env.APPLICATION}}"
#
# Create NSIS installer
#
- name: Make NSIS installer
run: |
move "${{env.APPLICATION}}" deploy\windows\nsis\
cd deploy\windows\nsis
makensis /X"SetCompressor /FINAL lzma" setup.nsi
ren *.exe ${{env.EXECUTABLE}}-${{env.VERSION}}-Windows.exe
#
# Upload installer to build artifacts
#
- name: Upload NSIS installer
uses: actions/upload-artifact@v2
with:
name: ${{env.EXECUTABLE}}-${{env.VERSION}}-Windows.exe
path: deploy/windows/nsis/${{env.EXECUTABLE}}-${{env.VERSION}}-Windows.exe