-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
111 additions
and
380 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
name: Linux Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- 'Stable*' | ||
tags: | ||
- 'v*' | ||
paths-ignore: | ||
- 'docs/**' | ||
- 'android/**' | ||
pull_request: | ||
paths-ignore: | ||
- 'docs/**' | ||
- 'android/**' | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
env: | ||
ARTIFACT: QGroundControl-x86_64.AppImage | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
|
||
strategy: | ||
matrix: | ||
BuildType: [Debug, Release] | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
fetch-tags: true | ||
|
||
- name: Set up Cache | ||
uses: hendrikmuhs/[email protected] | ||
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' | ||
with: | ||
create-symlink: true | ||
key: ${{ runner.os }}-${{ matrix.BuildType }} | ||
restore-keys: ${{ runner.os }}-${{ matrix.BuildType }} | ||
max-size: 1G | ||
append-timestamp: false | ||
|
||
- name: Install Qt | ||
uses: jurplel/install-qt-action@v3 | ||
with: | ||
version: 6.6.3 | ||
aqtversion: ==3.1.* | ||
host: linux | ||
target: desktop | ||
dir: ${{ runner.temp }} | ||
modules: qtcharts qtlocation qtpositioning qtspeech qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d | ||
setup-python: true | ||
cache: true | ||
|
||
- name: Install Dependencies | ||
run: | | ||
chmod a+x ./tools/setup/ubuntu.sh | ||
./tools/setup/ubuntu.sh | ||
- name: Create build directory | ||
run: mkdir ${{ runner.temp }}/shadow_build_dir | ||
|
||
- name: Configure | ||
working-directory: ${{ runner.temp }}/shadow_build_dir | ||
run: cmake -S ${{ github.workspace }} -B . -G Ninja \ | ||
-DCMAKE_BUILD_TYPE=${{ matrix.BuildType }} \ | ||
-DQGC_STABLE_BUILD=${{ github.ref_type == 'tag' || contains(github.ref, 'Stable') && 'ON' || 'OFF' }} | ||
|
||
- name: Build | ||
working-directory: ${{ runner.temp }}/shadow_build_dir | ||
run: cmake --build . --target all --config ${{ matrix.BuildType }} | ||
|
||
- name: Create AppImage | ||
working-directory: ${{ runner.temp }}/shadow_build_dir | ||
run: cmake --install . | ||
|
||
- name: Run unit tests | ||
if: matrix.BuildType == 'Debug' | ||
working-directory: ${{ runner.temp }}/shadow_build_dir | ||
run: | | ||
mkdir -p ~/.config/QtProject/ | ||
cp ${{ github.workspace }}/test/qtlogging.ini ~/.config/QtProject/ | ||
xvfb-run -a ./${{ env.ARTIFACT }} --unittest | ||
- name: Upload Build File | ||
uses: ./.github/actions/upload | ||
if: matrix.BuildType == 'Release' | ||
with: | ||
artifact_name: ${{ env.ARTIFACT }} | ||
aws_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
source: '.' |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,21 @@ | ||
message(STATUS Creating AppImage) | ||
|
||
set(APPDIR_PATH "${CMAKE_BINARY_DIR}/AppDir") | ||
# set(AIT_PATH "${CMAKE_BINARY_DIR}/appimagetool-x86_64.AppImage") | ||
set(LD_PATH "${CMAKE_BINARY_DIR}/linuxdeploy-x86_64.AppImage") | ||
#set(LD_QTPLUGIN_PATH "${CMAKE_BINARY_DIR}/linuxdeploy-plugin-qt-x86_64.AppImage") | ||
set(LD_APPIMAGEPLUGIN_PATH "${CMAKE_BINARY_DIR}/linuxdeploy-plugin-appimage-x86_64.AppImage") | ||
set(LD_QTPLUGIN_PATH "${CMAKE_BINARY_DIR}/linuxdeploy-plugin-qt-x86_64.AppImage") | ||
|
||
# if(NOT EXISTS "${AIT_PATH}") | ||
# file(DOWNLOAD https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage "${AIT_PATH}") | ||
# execute_process(COMMAND chmod a+x "${AIT_PATH}") | ||
# endif() | ||
if(NOT EXISTS "${LD_PATH}") | ||
file(DOWNLOAD https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20240109-1/linuxdeploy-x86_64.AppImage "${LD_PATH}") | ||
file(DOWNLOAD https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage "${LD_PATH}") | ||
execute_process(COMMAND chmod a+x "${LD_PATH}") | ||
endif() | ||
# if(NOT EXISTS "${LD_QTPLUGIN_PATH}") | ||
# file(DOWNLOAD https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/1-alpha-20240109-1/linuxdeploy-plugin-qt-x86_64.AppImage "${LD_QTPLUGIN_PATH}") | ||
# execute_process(COMMAND chmod a+x "${LD_QTPLUGIN_PATH}") | ||
# endif() | ||
|
||
# execute_process(COMMAND chmod a+x "${APPDIR_PATH}/AppRun") | ||
if(NOT EXISTS "${LD_APPIMAGEPLUGIN_PATH}") | ||
file(DOWNLOAD https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage "${LD_APPIMAGEPLUGIN_PATH}") | ||
execute_process(COMMAND chmod a+x "${LD_APPIMAGEPLUGIN_PATH}") | ||
endif() | ||
if(NOT EXISTS "${LD_QTPLUGIN_PATH}") | ||
file(DOWNLOAD https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage "${LD_QTPLUGIN_PATH}") | ||
execute_process(COMMAND chmod a+x "${LD_QTPLUGIN_PATH}") | ||
endif() | ||
|
||
# execute_process(COMMAND ${AIT_PATH} --appdir ${APPDIR_PATH} --output appimage) | ||
# execute_process(COMMAND ${LDQT_PATH} ${APPDIR_PATH}/usr/share/applications/org.mavlink.qgroundcontrol.desktop -unsupported-allow-new-glibc -verbose=2 -appimage) | ||
execute_process(COMMAND ${LD_PATH} --appdir ${APPDIR_PATH} --output appimage) | ||
execute_process(COMMAND ${LD_PATH} --appdir ${APPDIR_PATH} --output appimage) # --plugin qt |
Oops, something went wrong.