Linux deploy #49
Workflow file for this run
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: Linux deploy | |
on: [workflow_dispatch] | |
env: | |
BUILD_TYPE: Release # Change build type here. | |
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" | |
VCPKG_ROOT: '${{ github.workspace }}/vcpkg' | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 # Update Ubuntu version here (might be the oldest LTS for AppImage creation). | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Export GitHub Actions cache environment variables | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); | |
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | |
# Since VCPKG take a lot of space for Qt install, we run out of free disk space on Ubuntu 20.04 | |
# This will remove some unused runner image dependencies | |
- name: Free Disk Space (Ubuntu) | |
uses: jlumbroso/free-disk-space@main | |
with: | |
# this might remove tools that are actually needed, | |
# if set to "true" but frees about 6 GB | |
tool-cache: false | |
# all of these default to true, but feel free to set to | |
# "false" if necessary for your workflow | |
android: true | |
dotnet: true | |
haskell: true | |
large-packages: true | |
docker-images: true | |
swap-storage: true | |
- name: Prepare dependencies | |
shell: bash | |
run: | | |
./vcpkg/bootstrap-vcpkg.sh -disableMetrics | |
sudo apt-get install -y '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev libegl1-mesa-dev | |
sudo apt-get install -y libxi-dev libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev libxrandr-dev libxxf86vm-dev | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v4 | |
with: | |
version: 6.2.4 # Update Qt version here. | |
aqtversion: '>=0.9.7' | |
modules: 'qtimageformats' | |
tools: 'tools_ifw' | |
- name: Build | |
shell: bash | |
run: | | |
cd build | |
cmake .. | |
cmake --build . --config $BUILD_TYPE --target Degate | |
- name: Prepare Degate AppImage | |
shell: bash | |
run: | | |
cd etc | |
mkdir linux_deploy | |
sudo chown -R $USER:$USER linux_deploy | |
cd linux_deploy | |
mv ../../build/out/bin/Degate ./ | |
cp ../degate.desktop ./degate.desktop | |
cp ../degate.png ./degate.png | |
sudo apt-get install libxcb-* | |
- name: Create Degate AppImage | |
shell: bash | |
run: | | |
cd etc/ | |
wget https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage | |
chmod a+x linuxdeployqt-continuous-x86_64.AppImage | |
./linuxdeployqt-continuous-x86_64.AppImage ./linux_deploy/Degate -appimage -extra-plugins=iconengines,platformthemes/libqgtk3.so | |
cd linux_deploy/ | |
rm AppRun | |
cp -R . ../installer/packages/Degate/data | |
rm ../installer/packages/Degate/data/.keepme | |
- name: Upload Degate appimage | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Degate_appimage_Linux_x64 | |
path: etc/Degate*.AppImage | |
- name: Upload Degate binaries | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Degate_binaries_Linux_x64 | |
path: etc/linux_deploy/ | |
- name: Create Degate installer | |
shell: bash | |
# Update the Qt Installer Framework (ifw) version here (by providing the exe download link and changing the exe name/path). | |
run: | | |
cd etc/installer | |
binarycreator --offline-only -c config/config.xml -p packages "Degate_offline_installer_Linux_x64" | |
binarycreator --online-only -c config/config.xml -p packages "Degate_online_installer_Linux_x64" | |
- name: Upload Degate offline installer | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Degate_offline_installer_Linux_x64 | |
path: etc/installer/Degate_offline_installer_Linux_x64 | |
- name: Upload Degate online installer | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Degate_online_installer_Linux_x64 | |
path: etc/installer/Degate_online_installer_Linux_x64 | |
- name: Create Degate update | |
shell: bash | |
run: | | |
cd etc/installer | |
repogen -p packages repository | |
- name: Upload Degate update | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Degate_update_Linux_x64 | |
path: etc/installer/repository | |
- name: Upload vcpkg build logs | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: 'vcpkg-buildlogs-${{ matrix.triplet }}' | |
path: ${{ env.VCPKG_ROOT }}/buildtrees/**/*.log |