diff --git a/.github/actions/upload/action.yml b/.github/actions/upload/action.yml index 93016c4c41bd..9c74741a1c76 100644 --- a/.github/actions/upload/action.yml +++ b/.github/actions/upload/action.yml @@ -11,14 +11,14 @@ inputs: description: 'aws secret access key' required: true source: + description: 'source location' required: false - type: string default: 'package' runs: using: "composite" steps: - name: Save artifact - uses: actions/upload-artifact@master + uses: actions/upload-artifact@v4 with: name: ${{ inputs.artifact_name }} path: ${{ runner.temp }}/shadow_build_dir/${{ inputs.source }}/${{ inputs.artifact_name }} @@ -27,16 +27,16 @@ runs: if: github.event_name == 'push' working-directory: ${{ runner.temp }}/shadow_build_dir/${{ inputs.source }} run: | - aws configure set aws_access_key_id ${{ inputs.aws_key_id }} - aws configure set aws_secret_access_key ${{ inputs.aws_secret_access_key }} - aws s3 cp ${{ inputs.artifact_name }} s3://qgroundcontrol/builds/${{ github.ref_name }}/${{ inputs.artifact_name }} --region us-west-2 --acl public-read + aws configure set aws_access_key_id ${{ inputs.aws_key_id }} + aws configure set aws_secret_access_key ${{ inputs.aws_secret_access_key }} + aws s3 cp ${{ inputs.artifact_name }} s3://qgroundcontrol/builds/${{ github.ref_name }}/${{ inputs.artifact_name }} --region us-west-2 --acl public-read shell: bash - name: Upload tagged stable build to S3 latest Bucket if: github.event_name == 'push' && github.ref_type == 'tag' working-directory: ${{ runner.temp }}/shadow_build_dir/${{ inputs.source }} run: | - aws configure set aws_access_key_id ${{ inputs.aws_key_id }} - aws configure set aws_secret_access_key ${{ inputs.aws_secret_access_key }} - aws s3 cp ${{ inputs.artifact_name }} s3://qgroundcontrol/latest/${{ inputs.artifact_name }} --region us-west-2 --acl public-read + aws configure set aws_access_key_id ${{ inputs.aws_key_id }} + aws configure set aws_secret_access_key ${{ inputs.aws_secret_access_key }} + aws s3 cp ${{ inputs.artifact_name }} s3://qgroundcontrol/latest/${{ inputs.artifact_name }} --region us-west-2 --acl public-read shell: bash diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml new file mode 100644 index 000000000000..585dcc193783 --- /dev/null +++ b/.github/workflows/android.yml @@ -0,0 +1,204 @@ +name: Android 32/64-bit + +on: + push: + branches: + - master + - 'Stable*' + tags: + - 'v*' + paths-ignore: + - 'docs/**' + pull_request: + paths-ignore: + - 'docs/**' + +defaults: + run: + shell: bash + +jobs: + build_debug: + runs-on: ubuntu-latest + + steps: + - name: Checkout repo + uses: actions/checkout@v4 + with: + submodules: recursive + fetch-tags: true + + - name: Setup Java environment + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 17 + + - name: Set up Cache + uses: hendrikmuhs/ccache-action@v1.2 + with: + create-symlink: true + key: ${{ runner.os }}-Android-Debug + restore-keys: ${{ runner.os }}-Android-Debug + max-size: 1G + append-timestamp: false + + - name: Install Qt for Linux + uses: jurplel/install-qt-action@v3 + with: + version: 6.6.* + aqtversion: ==3.1.* + host: linux + target: desktop + dir: ${{ runner.temp }} + modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d + setup-python: true + cache: true + + - name: Install Qt6 for Android (armv7) + uses: jurplel/install-qt-action@v3 + with: + version: 6.6.* + aqtversion: ==3.1.* + host: linux + target: android + arch: android_armv7 + dir: ${{ runner.temp }} + modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d + cache: true + + - name: Install Qt6 for Android (arm64_v8a) + uses: jurplel/install-qt-action@v3 + with: + version: 6.6.* + aqtversion: ==3.1.* + host: linux + target: android + arch: android_arm64_v8a + extra: --autodesktop + dir: ${{ runner.temp }} + modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d + cache: true + + - name: Install dependencies + working-directory: ${{ github.workspace }} + env: + GST_VERSION: 1.18.5 + run: | + sudo apt update + sudo apt install -y ninja-build + wget --quiet https://gstreamer.freedesktop.org/data/pkg/android/${GST_VERSION}/gstreamer-1.0-android-universal-${GST_VERSION}.tar.xz + mkdir gstreamer-1.0-android-universal-${GST_VERSION} + tar xf gstreamer-1.0-android-universal-${GST_VERSION}.tar.xz -C gstreamer-1.0-android-universal-${GST_VERSION} + + - name: Setup env + run: | + echo "QT_HOST_PATH=${Qt6_DIR}/../gcc_64" >> $GITHUB_ENV + chmod a+x ${Qt6_DIR}/bin/qt-cmake + mkdir ${{ runner.temp }}/shadow_build_dir + + - name: Configure + working-directory: ${{ runner.temp }}/shadow_build_dir + env: + STABLE_BUILD: ${{ github.ref_type == 'tag' || contains(github.ref, 'Stable') }} + run: ${Qt6_DIR}/bin/qt-cmake -S ${{ github.workspace }} -B . -G Ninja \ + -DCMAKE_BUILD_TYPE=${{ matrix.BuildType }} \ + -DQT_ANDROID_ABIS="armeabi-v7a;arm64-v8a" \ + -DQT_HOST_PATH=${{ env.QT_HOST_PATH }} \ + -DQT_DEBUG_FIND_PACKAGE=ON \ + -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 + + build_release: + runs-on: ubuntu-latest + + strategy: + matrix: + include: + - eabi: armeabi-v7a + arch: android_armv7 + ARTIFACT: QGroundControl32.apk + - eabi: arm64-v8a + arch: android_arm64_v8a + ARTIFACT: QGroundControl64.apk + + steps: + - name: Checkout repo + uses: actions/checkout@v4 + with: + submodules: recursive + fetch-tags: true + + - name: Setup Java environment + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 17 + + - name: Set up Cache + uses: hendrikmuhs/ccache-action@v1.2 + with: + create-symlink: true + key: ${{ runner.os }}-${{ matrix.arch }}-Release + restore-keys: ${{ runner.os }}-${{ matrix.arch }}-Release + max-size: 1G + append-timestamp: false + + - name: Install Qt for Linux + uses: jurplel/install-qt-action@v3 + with: + version: 6.6.* + aqtversion: ==3.1.* + host: linux + target: desktop + dir: ${{ runner.temp }} + modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d + setup-python: true + cache: true + + - name: Install Qt6 for Android + uses: jurplel/install-qt-action@v3 + with: + version: 6.6.* + aqtversion: ==3.1.* + host: linux + target: android + arch: ${{ matrix.arch }} + extra: --autodesktop + dir: ${{ runner.temp }} + modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d + cache: true + + - name: Install dependencies + working-directory: ${{ github.workspace }} + env: + GST_VERSION: 1.18.5 + run: | + sudo apt update + sudo apt install -y ninja-build + wget --quiet https://gstreamer.freedesktop.org/data/pkg/android/${GST_VERSION}/gstreamer-1.0-android-universal-${GST_VERSION}.tar.xz + mkdir gstreamer-1.0-android-universal-${GST_VERSION} + tar xf gstreamer-1.0-android-universal-${GST_VERSION}.tar.xz -C gstreamer-1.0-android-universal-${GST_VERSION} + + - name: Configure + working-directory: ${{ runner.temp }}/shadow_build_dir + env: + ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} + run: qmake -r ${{ github.workspace }}/qgroundcontrol.pro -spec android-clang \ + ANDROID_ABIS="${{ matrix.eabi }}" \ + CONFIG+=installer \ + CONFIG+=${{ github.ref_type == 'tag' || contains(github.ref, 'Stable') && 'StableBuild' || 'DailyBuild' }} + + - name: Build + working-directory: ${{ runner.temp }}/shadow_build_dir + run: make -j$(nproc) + + - name: Upload Build File + uses: ./.github/actions/upload + with: + artifact_name: ${{ matrix.ARTIFACT }} + aws_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/android_debug.yml b/.github/workflows/android_debug.yml deleted file mode 100644 index 423d14226ae0..000000000000 --- a/.github/workflows/android_debug.yml +++ /dev/null @@ -1,130 +0,0 @@ -# The 32 and 64 bit version of these actions should be kept in sync -name: Android 32/64-bit Debug - -on: - push: - branches: - - 'master' - - 'Stable*' - tags: - - 'v*' - paths-ignore: - - 'docs/**' - pull_request: - branches: - - '*' - paths-ignore: - - 'docs/**' - -defaults: - run: - shell: bash - -env: - SOURCE_DIR: ${{ github.workspace }} - QT_VERSION: 6.6.* - BUILD_TYPE: ${{ fromJSON('["DailyBuild", "StableBuild"]')[ github.ref_type == 'tag' || contains(github.ref, 'Stable_' ) ] }} - -jobs: - build: - runs-on: ubuntu-latest - - strategy: - matrix: - include: - - architecture: 32bits - eabi: armeabi-v7a - arch: android_armv7 - ARTIFACT: QGroundControl32.apk - - architecture: 64bits - eabi: arm64-v8a - arch: android_arm64_v8a - ARTIFACT: QGroundControl64.apk - - steps: - - name: Checkout repo - uses: actions/checkout@v4 - with: - submodules: recursive - - - run: sudo apt update - - - name: ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - create-symlink: true - key: ${{ runner.os }}-${{ matrix.arch }}-Release - restore-keys: ${{ runner.os }}-${{ matrix.arch }}-Release - max-size: "2G" - append-timestamp: false - - - name: Get all tags for correct version determination - working-directory: ${{ github.workspace }} - run: | - git fetch --all --tags -f --depth 1 - - - name: Install Qt for Linux - uses: jurplel/install-qt-action@v3 - with: - version: ${{ env.QT_VERSION }} - aqtversion: ==3.1.* - host: linux - target: desktop - dir: ${{ runner.temp }} - modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d - setup-python: true - cache: false - - - name: Install Qt6 for Android - uses: jurplel/install-qt-action@v3 - with: - version: ${{ env.QT_VERSION }} - aqtversion: ==3.1.* - host: linux - target: android - arch: ${{ matrix.arch }} - extra: --autodesktop - dir: ${{ runner.temp }} - modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d - setup-python: true - cache: true - - - name: Remove Android SDKs to force usage of android-33 only - run: | - ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --uninstall "platforms;android-33-ext5" - ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --uninstall "platforms;android-33-ext4" - ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --uninstall "platforms;android-34" - ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --uninstall "platforms;android-34-ext8" - - - name: Install gstreamer - working-directory: ${{ github.workspace }} - run: | - wget --quiet https://gstreamer.freedesktop.org/data/pkg/android/1.18.5/gstreamer-1.0-android-universal-1.18.5.tar.xz - mkdir gstreamer-1.0-android-universal-1.18.5 - tar xf gstreamer-1.0-android-universal-1.18.5.tar.xz -C gstreamer-1.0-android-universal-1.18.5 - - - name: Update android manifest - if: github.ref_name != 'Stable' - run: ${SOURCE_DIR}/tools/update_android_manifest_package.sh ${{ github.ref_name }} - - - name: Install dependencies - run: sudo apt-get install -y ninja-build - - - name: Setup env - run: echo "QT_HOST_PATH=${Qt6_DIR}/../gcc_64" >> $GITHUB_ENV - - - name: Create build directory - run: mkdir ${{ runner.temp }}/shadow_build_dir - - - name: Build - working-directory: ${{ runner.temp }}/shadow_build_dir - run: | - chmod a+x ${Qt6_DIR}/bin/qt-cmake - ${Qt6_DIR}/bin/qt-cmake -S ${{ env.SOURCE_DIR }} -B ${{ runner.temp }}/shadow_build_dir/ -G Ninja \ - -DCMAKE_BUILD_TYPE=Debug \ - -DANDROID_ABI=${{ matrix.eabi }} \ - -DANDROID_PLATFORM=android-23 \ - -DBUILD_TESTING:BOOL=OFF \ - -DQT_HOST_PATH:PATH=${{ env.QT_HOST_PATH }} \ - -DQT_DEBUG_FIND_PACKAGE=ON - cmake --build ${{ runner.temp }}/shadow_build_dir/ --target all diff --git a/.github/workflows/android_release.yml b/.github/workflows/android_release.yml deleted file mode 100644 index 76f9108f9c11..000000000000 --- a/.github/workflows/android_release.yml +++ /dev/null @@ -1,118 +0,0 @@ -# The 32 and 64 bit version of these actions should be kept in sync -name: Android 32/64-bit Release - -on: - push: - branches: - - 'master' - - 'Stable*' - tags: - - 'v*' - paths-ignore: - - 'docs/**' - pull_request: - branches: - - '*' - paths-ignore: - - 'docs/**' - - '.github/workflows/**' - -defaults: - run: - shell: bash - -env: - SOURCE_DIR: ${{ github.workspace }} - QT_VERSION: 6.6.* - BUILD_TYPE: ${{ fromJSON('["DailyBuild", "StableBuild"]')[ github.ref_type == 'tag' || contains(github.ref, 'Stable_' ) ] }} - -jobs: - build: - runs-on: ubuntu-latest - - strategy: - matrix: - include: - - architecture: 32bits - eabi: armeabi-v7a - arch: android_armv7 - ARTIFACT: QGroundControl32.apk - - architecture: 64bits - eabi: arm64-v8a - arch: android_arm64_v8a - ARTIFACT: QGroundControl64.apk - - steps: - - name: Checkout repo - uses: actions/checkout@v4 - with: - submodules: recursive - - - run: sudo apt update - - - name: ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - create-symlink: true - key: ${{ runner.os }}-${{ matrix.arch }}-Release - restore-keys: ${{ runner.os }}-${{ matrix.arch }}-Release - max-size: "2G" - append-timestamp: false - if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' - - - name: Get all tags for correct version determination - working-directory: ${{ github.workspace }} - run: | - git fetch --all --tags -f --depth 1 - - - name: Install Qt6 for Android - uses: jurplel/install-qt-action@v3 - with: - version: ${{ env.QT_VERSION }} - aqtversion: ==3.1.* - host: linux - target: android - arch: ${{ matrix.arch }} - extra: --autodesktop - dir: ${{ runner.temp }} - modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d - setup-python: true - cache: true - - - name: Remove Android SDKs to force usage of android-33 only - run: | - ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --uninstall "platforms;android-33-ext5" - ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --uninstall "platforms;android-33-ext4" - ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --uninstall "platforms;android-34" - ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --uninstall "platforms;android-34-ext8" - - - name: Create build directory - run: mkdir ${{ runner.temp }}/shadow_build_dir - - - name: Install gstreamer - working-directory: ${{ github.workspace }} - run: | - wget --quiet https://gstreamer.freedesktop.org/data/pkg/android/1.18.5/gstreamer-1.0-android-universal-1.18.5.tar.xz - mkdir gstreamer-1.0-android-universal-1.18.5 - tar xf gstreamer-1.0-android-universal-1.18.5.tar.xz -C gstreamer-1.0-android-universal-1.18.5 - - - name: Update android manifest - if: github.ref_name != 'Stable' - run: | - ${SOURCE_DIR}/tools/update_android_manifest_package.sh ${{ github.ref_name }} - - - name: Build - working-directory: ${{ runner.temp }}/shadow_build_dir - env: - ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} - run: | - ls /home/runner/work/_temp/Qt/${{ env.QT_VERSION }} - qmake -r ${SOURCE_DIR}/qgroundcontrol.pro -spec android-clang CONFIG+=${BUILD_TYPE} CONFIG+=installer ANDROID_ABIS="${{ matrix.eabi }}" - make -j2 - - - name: Upload Build File - uses: ./.github/actions/upload - with: - artifact_name: ${{ matrix.ARTIFACT }} - aws_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/docs_deploy.yml b/.github/workflows/docs.yml similarity index 63% rename from .github/workflows/docs_deploy.yml rename to .github/workflows/docs.yml index b37d8845a434..9ac7b924783e 100644 --- a/.github/workflows/docs_deploy.yml +++ b/.github/workflows/docs.yml @@ -1,48 +1,46 @@ -name: Deploy Docs +name: Docs on: push: branches: - - 'master' + - master - 'Stable*' tags: - 'v*' paths: - - docs/** + - 'docs/**' pull_request: - branches: - - '*' paths: - - docs/** + - 'docs/**' workflow_dispatch: env: - BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + DOCS_DEPLOY: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.merged) }} jobs: - # Build job build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - with: - fetch-depth: 0 # Not needed if lastUpdated is not enabled + - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 cache: npm + - name: Install dependencies run: npm ci + - name: Build with VitePress run: | npm run docs:build touch docs/.vitepress/dist/.nojekyll - name: Upload artifact - if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.merged) }} + if: env.DOCS_DEPLOY uses: actions/upload-artifact@v4 with: name: qgc_docs_build @@ -50,7 +48,7 @@ jobs: retention-days: 1 deploy: - if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.merged) }} + if: env.DOCS_DEPLOY needs: build runs-on: ubuntu-latest @@ -60,20 +58,20 @@ jobs: with: name: qgc_docs_build path: ~/_book - + - name: Deploy + env: + GIT_USER: ${{ secrets.PX4BUILDBOT_USER }} + GIT_PASS: ${{ secrets.PX4BUILDBOT_PASS }} + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} run: | git clone https://${{ secrets.PX4BUILDBOT_USER }}:${{ secrets.PX4BUILDBOT_ACCESSTOKEN }}@github.com/mavlink/docs.qgroundcontrol.com.git - rm -rf docs.qgroundcontrol.com/${BRANCH_NAME} - mkdir -p docs.qgroundcontrol.com/${BRANCH_NAME} - cp -r ~/_book/* docs.qgroundcontrol.com/${BRANCH_NAME}/ + rm -rf docs.qgroundcontrol.com/${{ env.BRANCH_NAME }} + mkdir -p docs.qgroundcontrol.com/${{ env.BRANCH_NAME }} + cp -r ~/_book/* docs.qgroundcontrol.com/${{ env.BRANCH_NAME }}/ cd docs.qgroundcontrol.com git config user.email "bot@px4.io" git config user.name "PX4BuildBot" - git add ${BRANCH_NAME} + git add ${{ env.BRANCH_NAME }} git commit -a -m "QGC docs build update `date`" git push origin master - - env: - GIT_USER: ${{ secrets.PX4BUILDBOT_USER }} - GIT_PASS: ${{ secrets.PX4BUILDBOT_PASS }} diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml new file mode 100644 index 000000000000..95ff8731e719 --- /dev/null +++ b/.github/workflows/linux.yml @@ -0,0 +1,122 @@ +name: Linux + +on: + push: + branches: + - master + - 'Stable*' + tags: + - 'v*' + paths-ignore: + - 'docs/**' + - 'android/**' + pull_request: + paths-ignore: + - 'docs/**' + - 'android/**' + +defaults: + run: + shell: bash + +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 + if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' + uses: hendrikmuhs/ccache-action@v1.2 + 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.* + aqtversion: ==3.1.* + host: linux + target: desktop + dir: ${{ runner.temp }} + modules: qtcharts qtlocation qtpositioning qtspeech qt5compat 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 + env: + STABLE_BUILD: ${{ github.ref_type == 'tag' || contains(github.ref, 'Stable') }} + run: | + if [ ${{ matrix.BuildType }} == Debug ] + then + 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' }} + else + qmake -r ${{ github.workspace }}/qgroundcontrol.pro \ + CONFIG+=installer \ + CONFIG+=${{ github.ref_type == 'tag' || contains(github.ref, 'Stable') && 'StableBuild' || 'DailyBuild' }} + fi + + - name: Build + working-directory: ${{ runner.temp }}/shadow_build_dir + run: | + if [ ${{ matrix.BuildType }} == Debug ] + then + cmake --build . --target all --config ${{ matrix.BuildType }} + else + make -j$(nproc) + fi + + - name: Create AppImage + working-directory: ${{ runner.temp }}/shadow_build_dir + run: | + if [ ${{ matrix.BuildType }} == Debug ] + then + cmake --install . + else + ${{ github.workspace }}/deploy/linux/create_linux_appimage.sh ${{ github.workspace }} ./staging ./package + fi + + - name: Setup 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/ + export QT_FATAL_WARNINGS=1 + + - name: Run unit tests + if: matrix.BuildType == 'Debug' + working-directory: ${{ runner.temp }}/shadow_build_dir + run: xvfb-run -a ./QGroundControl*.AppImage --unittest + + - name: Upload Build File + if: matrix.BuildType == 'Release' + uses: ./.github/actions/upload + with: + artifact_name: QGroundControl.AppImage + aws_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/linux_debug.yml b/.github/workflows/linux_debug.yml deleted file mode 100644 index fc6362cc028d..000000000000 --- a/.github/workflows/linux_debug.yml +++ /dev/null @@ -1,87 +0,0 @@ -name: Linux Debug and Test - -on: - push: - branches: - - 'master' - paths-ignore: - - 'docs/**' - pull_request: - branches: - - '*' - paths-ignore: - - 'docs/**' - -defaults: - run: - shell: bash - -env: - SOURCE_DIR: ${{ github.workspace }} - QT_VERSION: 6.6.* - BUILD_TYPE: ${{ fromJSON('["DailyBuild", "StableBuild"]')[ github.ref_type == 'tag' || contains(github.ref, 'Stable_' ) ] }} - -jobs: - build: - runs-on: ubuntu-20.04 - - steps: - - name: Checkout repo - uses: actions/checkout@v4 - with: - submodules: recursive - - - run: sudo apt update - - - name: ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - create-symlink: true - key: ${{ runner.os }}-Debug - restore-keys: ${{ runner.os }}-Debug - max-size: "2G" - append-timestamp: false - if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' - - - name: Get all tags for correct version determination - working-directory: ${{ github.workspace }} - run: | - git fetch --all --tags -f --depth 1 - - - name: Install Qt - uses: jurplel/install-qt-action@v3 - with: - version: ${{ env.QT_VERSION }} - aqtversion: ==3.1.* - host: linux - target: desktop - dir: ${{ runner.temp }} - modules: qtcharts qtlocation qtpositioning qtspeech qt5compat 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: Build - working-directory: ${{ runner.temp }}/shadow_build_dir - run: | - cmake -S ${{ env.SOURCE_DIR }} -B ${{ runner.temp }}/shadow_build_dir/ -G Ninja -DCMAKE_BUILD_TYPE=Debug - cmake --build ${{ runner.temp }}/shadow_build_dir/ --target all --config Debug - cmake --install ${{ runner.temp }}/shadow_build_dir - - - name: Setup for unit tests - working-directory: ${{ runner.temp }}/shadow_build_dir - run: | - mkdir -p ~/.config/QtProject/ - cp ${SOURCE_DIR}/test/qtlogging.ini ~/.config/QtProject/ - export QT_FATAL_WARNINGS=1 - - - name: Run unit tests - working-directory: ${{ runner.temp }}/shadow_build_dir - run: xvfb-run -a ${{ runner.temp }}/shadow_build_dir/QGroundControl*.AppImage --unittest diff --git a/.github/workflows/linux_release.yml b/.github/workflows/linux_release.yml deleted file mode 100644 index 0c98f4b140df..000000000000 --- a/.github/workflows/linux_release.yml +++ /dev/null @@ -1,90 +0,0 @@ -name: Linux Release - -on: - push: - branches: - - 'master' - - 'Stable*' - tags: - - 'v*' - paths-ignore: - - 'docs/**' - pull_request: - branches: - - '*' - paths-ignore: - - 'docs/**' - -defaults: - run: - shell: bash - -env: - SOURCE_DIR: ${{ github.workspace }} - QT_VERSION: 6.6.* - ARTIFACT: QGroundControl.AppImage - BUILD_TYPE: ${{ fromJSON('["DailyBuild", "StableBuild"]')[ github.ref_type == 'tag' || contains(github.ref, 'Stable_' ) ] }} - -jobs: - build: - runs-on: ubuntu-20.04 - - steps: - - name: Checkout repo - uses: actions/checkout@v4 - with: - submodules: recursive - - - run: sudo apt update - - - name: ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - create-symlink: true - key: ${{ runner.os }}-Release - restore-keys: ${{ runner.os }}-Release - max-size: "2G" - append-timestamp: false - if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' - - - name: Get all tags for correct version determination - working-directory: ${{ github.workspace }} - run: | - git fetch --all --tags -f --depth 1 - - - name: Install Qt - uses: jurplel/install-qt-action@v3 - with: - version: ${{ env.QT_VERSION }} - aqtversion: ==3.1.* - host: linux - target: desktop - dir: ${{ runner.temp }} - modules: qtcharts qtlocation qtpositioning qtspeech qt5compat 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: Build - working-directory: ${{ runner.temp }}/shadow_build_dir - run: | - qmake -r ${SOURCE_DIR}/qgroundcontrol.pro CONFIG+=installer CONFIG+=${BUILD_TYPE} - make -j2 - - - name: Create AppImage - working-directory: ${{ runner.temp }}/shadow_build_dir - run: ${SOURCE_DIR}/deploy/linux/create_linux_appimage.sh ${SOURCE_DIR} ./staging ./package; - - - name: Upload Build File - uses: ./.github/actions/upload - with: - artifact_name: ${{ env.ARTIFACT }} - aws_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 000000000000..0487c819536e --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,108 @@ +name: MacOS + +on: + push: + branches: + - master + - 'Stable*' + tags: + - 'v*' + paths-ignore: + - 'docs/**' + - 'android/**' + pull_request: + paths-ignore: + - 'docs/**' + - 'android/**' + +defaults: + run: + shell: bash + +jobs: + build: + runs-on: macos-latest + + 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/ccache-action@v1.2 + with: + create-symlink: true + key: ${{ runner.os }}-${{ matrix.BuildType }} + restore-keys: ${{ runner.os }}-${{ matrix.BuildType }} + max-size: 2G + append-timestamp: false + + - name: Install Qt + uses: jurplel/install-qt-action@v3 + with: + version: 6.6.* + aqtversion: ==3.1.* + host: mac + target: desktop + dir: ${{ runner.temp }} + modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d + setup-python: true + cache: true + + - name: Install Dependencies + run: | + brew update + brew install ninja SDL2 + + - name: Setup GStreamer + uses: blinemedical/setup-gstreamer@v1 + with: + version: 1.18.6 + + - name: Create build directory + run: mkdir ${{ runner.temp }}/shadow_build_dir + + - name: Configure + working-directory: ${{ runner.temp }}/shadow_build_dir + env: + STABLE_BUILD: ${{ github.ref_type == 'tag' || contains(github.ref, 'Stable') }} + run: | + if [ ${{ matrix.BuildType }} == Debug ] + then + 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' }} + else + qmake -r ${{ github.workspace }}/qgroundcontrol.pro \ + CONFIG+=installer \ + CONFIG+=${{ github.ref_type == 'tag' || contains(github.ref, 'Stable') && 'StableBuild' || 'DailyBuild' }} + fi + + - name: Build + working-directory: ${{ runner.temp }}/shadow_build_dir + run: | + if [ ${{ matrix.BuildType }} == Debug ] + then + cmake --build . --target all --config ${{ matrix.BuildType }} + else + make -j$((`sysctl -n hw.ncpu`+1)) + fi + + - name: Install + if: matrix.BuildType == 'Debug' + working-directory: ${{ runner.temp }}/shadow_build_dir + run: cmake --install . + + - name: Upload Build File + if: matrix.BuildType == 'Release' + uses: ./.github/actions/upload + with: + artifact_name: QGroundControl.dmg + aws_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/macos_debug.yml b/.github/workflows/macos_debug.yml deleted file mode 100644 index fe04f4c77a76..000000000000 --- a/.github/workflows/macos_debug.yml +++ /dev/null @@ -1,89 +0,0 @@ -name: MacOS Debug and Tests - -on: - push: - branches: - - 'master' - - 'Stable*' - tags: - - 'v*' - paths-ignore: - - 'docs/**' - pull_request: - branches: - - '*' - paths-ignore: - - 'docs/**' - -defaults: - run: - shell: bash - -env: - SOURCE_DIR: ${{ github.workspace }} - QT_VERSION: 6.6.* - ARTIFACT: QGroundControl.dmg - BUILD_TYPE: ${{ fromJSON('["DailyBuild", "StableBuild"]')[ github.ref_type == 'tag' || contains(github.ref, 'Stable_' ) ] }} - -jobs: - build: - runs-on: macos-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - create-symlink: true - key: ${{ runner.os }}-Debug - restore-keys: ${{ runner.os }}-Debug - max-size: "2G" - append-timestamp: false - - - name: Get all tags for correct version determination - working-directory: ${{ github.workspace }} - run: | - git fetch --all --tags -f --depth 1 - - - name: Install Qt - uses: jurplel/install-qt-action@v3 - with: - version: ${{ env.QT_VERSION }} - aqtversion: ==3.1.* - host: mac - target: desktop - dir: ${{ runner.temp }} - modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d - setup-python: false - cache: true - - - name: Install Dependencies - run: | - brew install ninja - brew install SDL2 - - - name: Install Gstreamer - run: | - wget https://gstreamer.freedesktop.org/data/pkg/osx/1.18.6/gstreamer-1.0-devel-1.18.6-x86_64.pkg - wget https://gstreamer.freedesktop.org/data/pkg/osx/1.18.6/gstreamer-1.0-1.18.6-x86_64.pkg - for package in *.pkg ; - do sudo installer -verbose -pkg "$package" -target / - done - - - name: Create build directory - run: mkdir ${{ runner.temp }}/shadow_build_dir - - - name: Build - working-directory: ${{ runner.temp }}/shadow_build_dir - run: | - cmake -S ${{ env.SOURCE_DIR }} -B ${{ runner.temp }}/shadow_build_dir/ -G Ninja -DCMAKE_BUILD_TYPE=Debug - cmake --build ${{ runner.temp }}/shadow_build_dir/ --target all --config Debug - cmake --install ${{ runner.temp }}/shadow_build_dir - - # - name: Run unit tests - # working-directory: ${{ runner.temp }}/shadow_build_dir - # run: open ${{ runner.temp }}/shadow_build_dir/staging/QGroundControl.app --args --unittest diff --git a/.github/workflows/macos_release.yml b/.github/workflows/macos_release.yml deleted file mode 100644 index bf9d1b669ea4..000000000000 --- a/.github/workflows/macos_release.yml +++ /dev/null @@ -1,88 +0,0 @@ -name: MacOS Release - -on: - push: - branches: - - 'master' - - 'Stable*' - tags: - - 'v*' - paths-ignore: - - 'docs/**' - pull_request: - branches: - - '*' - paths-ignore: - - 'docs/**' - -defaults: - run: - shell: bash - -env: - SOURCE_DIR: ${{ github.workspace }} - QT_VERSION: 6.6.* - ARTIFACT: QGroundControl.dmg - BUILD_TYPE: ${{ fromJSON('["DailyBuild", "StableBuild"]')[ github.ref_type == 'tag' || contains(github.ref, 'Stable_' ) ] }} - -jobs: - build: - runs-on: macos-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - create-symlink: true - key: ${{ runner.os }}-Release - restore-keys: ${{ runner.os }}-Release - max-size: "2G" - append-timestamp: false - if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' - - - name: Get all tags for correct version determination - working-directory: ${{ github.workspace }} - run: | - git fetch --all --tags -f --depth 1 - - - name: Install Qt - uses: jurplel/install-qt-action@v3 - with: - version: ${{ env.QT_VERSION }} - aqtversion: ==3.1.* - host: mac - target: desktop - dir: ${{ runner.temp }} - modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d - setup-python: false - cache: true - - - name: Install Gstreamer - run: | - wget https://gstreamer.freedesktop.org/data/pkg/osx/1.18.6/gstreamer-1.0-devel-1.18.6-x86_64.pkg - wget https://gstreamer.freedesktop.org/data/pkg/osx/1.18.6/gstreamer-1.0-1.18.6-x86_64.pkg - for package in *.pkg ; - do sudo installer -verbose -pkg "$package" -target / - done - - - name: Create build directory - run: mkdir ${{ runner.temp }}/shadow_build_dir - - - name: Build - working-directory: ${{ runner.temp }}/shadow_build_dir - run: | - export JOBS=$((`sysctl -n hw.ncpu`+1)) - qmake -r ${SOURCE_DIR}/qgroundcontrol.pro CONFIG+=installer CONFIG+=${BUILD_TYPE} - make -j$JOBS - - - name: Upload Build File - uses: ./.github/actions/upload - with: - artifact_name: ${{ env.ARTIFACT }} - aws_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 000000000000..6d13a782f997 --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,109 @@ +name: Windows + +on: + push: + branches: + - master + - 'Stable*' + tags: + - 'v*' + paths-ignore: + - 'docs/**' + - 'android/**' + pull_request: + paths-ignore: + - 'docs/**' + - 'android/**' + +defaults: + run: + shell: cmd + +jobs: + build: + runs-on: windows-latest + + 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/ccache-action@v1.2 + with: + key: ${{ runner.os }}-${{ matrix.BuildType }} + restore-keys: ${{ runner.os }}-${{ matrix.BuildType }} + max-size: 1G + append-timestamp: false + variant: sccache + + - name: Install Qt + uses: jurplel/install-qt-action@v3 + with: + version: 6.6.* + aqtversion: ==3.1.* + host: windows + target: desktop + arch: win64_msvc2019_64 + dir: ${{ runner.temp }} + modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d + setup-python: true + cache: true + + - name: Install Dependencies + run: choco install --no-progress ninja jom -y + + - name: Setup GStreamer + uses: blinemedical/setup-gstreamer@v1 + with: + version: 1.18.6 + + - name: Set up Visual Studio shell + uses: ilammy/msvc-dev-cmd@v1 + + - name: Create build directory + run: mkdir ${{ runner.temp }}\shadow_build_dir + + - name: Configure + working-directory: ${{ runner.temp }}\shadow_build_dir + env: + STABLE_BUILD: ${{ github.ref_type == 'tag' || contains(github.ref, 'Stable') }} + run: | + if ${{ matrix.BuildType }}==Debug ( + 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' }} + ) else ( + qmake -r ${{ github.workspace }}\qgroundcontrol.pro ^ + CONFIG+=installer ^ + CONFIG+=${{ github.ref_type == 'tag' || contains(github.ref, 'Stable') && 'StableBuild' || 'DailyBuild' }} + ) + + - name: Build + working-directory: ${{ runner.temp }}\shadow_build_dir + run: | + if ${{ matrix.BuildType }}==Debug ( + cmake --build . --target all --config ${{ matrix.BuildType }} + ) else ( + jom -j%NUMBER_OF_PROCESSORS% + ) + + - name: Install + if: matrix.BuildType == 'Debug' + working-directory: ${{ runner.temp }}\shadow_build_dir + run: cmake --install . + + - name: Upload Build File + if: matrix.BuildType == 'Release' + uses: ./.github/actions/upload + with: + artifact_name: QGroundControl-installer.exe + aws_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + source: staging diff --git a/.github/workflows/windows_debug.yml b/.github/workflows/windows_debug.yml deleted file mode 100644 index e3b451470929..000000000000 --- a/.github/workflows/windows_debug.yml +++ /dev/null @@ -1,110 +0,0 @@ -name: Windows Debug and Tests - -on: - push: - branches: - - 'master' - - 'Stable*' - tags: - - 'v*' - paths-ignore: - - 'docs/**' - pull_request: - branches: - - '*' - paths-ignore: - - 'docs/**' - -defaults: - run: - shell: cmd - -env: - SOURCE_DIR: ${{ github.workspace }} - QT_VERSION: 6.6.* - ARTIFACT: QGroundControl-installer.exe - BUILD_TYPE: ${{ fromJSON('["DailyBuild", "StableBuild"]')[ github.ref_type == 'tag' || contains(github.ref, 'Stable_' ) ] }} - -jobs: - build: - runs-on: windows-2019 - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - with: - submodules: recursive - - - name: ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - create-symlink: true - key: ${{ runner.os }}-Debug - restore-keys: ${{ runner.os }}-Debug - max-size: "2G" - append-timestamp: false - variant: "sccache" - - - name: Get all tags for correct version determination - working-directory: ${{ github.workspace }} - run: | - git fetch --all --tags -f --depth 1 - - - name: Install Qt - uses: jurplel/install-qt-action@v3 - with: - version: ${{ env.QT_VERSION }} - aqtversion: ==3.1.* - host: windows - target: desktop - arch: win64_msvc2019_64 - dir: ${{ runner.temp }} - modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d - setup-python: true - cache: true - - - name: Download Gstreamer - uses: suisei-cn/actions-download-file@v1.6.0 - with: - url: https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/gstreamer-1.0-msvc-x86_64-1.18.1.msi - target: ${{ runner.temp }}\ - - - name: Download Gstreamer dev - uses: suisei-cn/actions-download-file@v1.6.0 - with: - url: https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/gstreamer-1.0-devel-msvc-x86_64-1.18.1.msi - target: ${{ runner.temp }}\ - - - name: Install Gstreamer - run: | - cmd /c start /wait msiexec /package ${{ runner.temp }}\gstreamer-1.0-msvc-x86_64-1.18.1.msi /passive ADDLOCAL=ALL - cmd /c start /wait msiexec /package ${{ runner.temp }}\gstreamer-1.0-devel-msvc-x86_64-1.18.1.msi /passive ADDLOCAL=ALL - - - name: Install Dependencies - run: | - python -m pip install ninja - - - name: Set up Visual Studio shell - uses: ilammy/msvc-dev-cmd@v1 - with: - arch: x64 - - - name: Create build directory - run: mkdir ${{ runner.temp }}\shadow_build_dir - - - name: Build - working-directory: ${{ runner.temp }}\shadow_build_dir - run: | - cmake -S ${{ env.SOURCE_DIR }} -B ${{ runner.temp }}\shadow_build_dir -G Ninja -DCMAKE_BUILD_TYPE=Debug - cmake --build ${{ runner.temp }}\shadow_build_dir --target all --config Debug - cmake --install ${{ runner.temp }}\shadow_build_dir - - - name: Save PDB artifact - uses: actions/upload-artifact@master - with: - name: qgroundcontrol.pdb - path: ${{ runner.temp }}\shadow_build_dir\staging\qgroundcontrol.pdb - - # - name: Run unit tests - # working-directory: ${{ runner.temp }}\shadow_build_dir - # run: ${{ runner.temp }}\shadow_build_dir\staging\bin\QGroundControl.exe --unittest \ No newline at end of file diff --git a/.github/workflows/windows_release.yml b/.github/workflows/windows_release.yml deleted file mode 100644 index edb217e7d06d..000000000000 --- a/.github/workflows/windows_release.yml +++ /dev/null @@ -1,115 +0,0 @@ -name: Windows Release - -on: - push: - branches: - - 'master' - - 'Stable*' - tags: - - 'v*' - paths-ignore: - - 'docs/**' - pull_request: - branches: - - '*' - paths-ignore: - - 'docs/**' - -defaults: - run: - shell: cmd - -env: - SOURCE_DIR: ${{ github.workspace }} - QT_VERSION: 6.6.* - ARTIFACT: QGroundControl-installer.exe - BUILD_TYPE: ${{ fromJSON('["DailyBuild", "StableBuild"]')[ github.ref_type == 'tag' || contains(github.ref, 'Stable_' ) ] }} - -jobs: - build: - runs-on: windows-2019 - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - with: - submodules: recursive - - - name: ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - create-symlink: true - key: ${{ runner.os }}-Release - restore-keys: ${{ runner.os }}-Release - max-size: "2G" - append-timestamp: false - variant: "sccache" - if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' - - - name: Get all tags for correct version determination - working-directory: ${{ github.workspace }} - run: | - git fetch --all --tags -f --depth 1 - - - name: Install Qt - uses: jurplel/install-qt-action@v3 - with: - version: ${{ env.QT_VERSION }} - aqtversion: ==3.1.* - host: windows - target: desktop - arch: win64_msvc2019_64 - dir: ${{ runner.temp }} - modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d - setup-python: false - cache: true - - - name: Download JOM - uses: suisei-cn/actions-download-file@v1.6.0 - with: - url: http://download.qt.io/official_releases/jom/jom.zip - target: ${{ runner.temp }}\ - - - name: Unzip JOM - working-directory: ${{ runner.temp }} - run: | - 7z x jom.zip -ojom - - - name: Download Gstreamer - uses: suisei-cn/actions-download-file@v1.6.0 - with: - url: https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/gstreamer-1.0-msvc-x86_64-1.18.1.msi - target: ${{ runner.temp }}\ - - - name: Download Gstreamer dev - uses: suisei-cn/actions-download-file@v1.6.0 - with: - url: https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/gstreamer-1.0-devel-msvc-x86_64-1.18.1.msi - target: ${{ runner.temp }}\ - - - name: Install Gstreamer - run: | - cmd /c start /wait msiexec /package ${{ runner.temp }}\gstreamer-1.0-msvc-x86_64-1.18.1.msi /passive ADDLOCAL=ALL - cmd /c start /wait msiexec /package ${{ runner.temp }}\gstreamer-1.0-devel-msvc-x86_64-1.18.1.msi /passive ADDLOCAL=ALL - - - name: Set up Visual Studio shell - uses: ilammy/msvc-dev-cmd@v1 - with: - arch: x64 - - - name: Create build directory - run: mkdir ${{ runner.temp }}\shadow_build_dir - - - name: Build - working-directory: ${{ runner.temp }}\shadow_build_dir - run: | - qmake -r ${{ env.SOURCE_DIR }}\qgroundcontrol.pro CONFIG+=installer CONFIG+=${{ env. BUILD_TYPE }} - ${{ runner.temp }}\jom\jom -j2 - - - name: Upload Build File - uses: ./.github/actions/upload - with: - artifact_name: ${{ env.ARTIFACT }} - aws_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - source: 'staging' diff --git a/CMakeLists.txt b/CMakeLists.txt index 9a845e8601fb..888370936d90 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -220,7 +220,8 @@ elseif(ANDROID) set_target_properties(${PROJECT_NAME} PROPERTIES - QT_ANDROID_ABIS ${ANDROID_ABI} + QT_ANDROID_ABIS "${QT_ANDROID_ABIS}" + QT_ANDROID_BUILD_ALL_ABIS OFF QT_ANDROID_MIN_SDK_VERSION 26 QT_ANDROID_TARGET_SDK_VERSION 33 QT_ANDROID_PACKAGE_SOURCE_DIR ${CMAKE_SOURCE_DIR}/android diff --git a/deploy/linux/create_linux_appimage.sh b/deploy/linux/create_linux_appimage.sh index aa0588f9aed9..a7ace20b38af 100755 --- a/deploy/linux/create_linux_appimage.sh +++ b/deploy/linux/create_linux_appimage.sh @@ -1,7 +1,6 @@ #!/bin/bash -# This is causing master builds to fail. I'll figure it out once I get Stable out. -#set -Eeuxo pipefail # https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/ +set -e if [[ $# -eq 0 ]]; then echo 'create_linux_appimage.sh QGC_SRC_DIR QGC_RELEASE_DIR' @@ -32,10 +31,6 @@ OUTPUT_DIR=${3-`pwd`} OUTPUT_DIR=$(readlink -f $OUTPUT_DIR) echo "Output directory:" ${OUTPUT_DIR} -# Generate AppImage using the binaries currently provided by the project. -# These require at least GLIBC 2.14, which older distributions might not have. -# On the other hand, 2.14 is not that recent so maybe we can just live with it. - APP=${QGC_CUSTOM_BINARY_NAME} TMPDIR=`mktemp -d` @@ -43,19 +38,19 @@ APPDIR=${TMPDIR}/$APP".AppDir" mkdir -p ${APPDIR} cd ${TMPDIR} -wget -c --quiet http://ftp.us.debian.org/debian/pool/main/libs/libsdl2/libsdl2-2.0-0_2.0.2%2bdfsg1-6_amd64.deb +wget -c --quiet http://ftp.us.debian.org/debian/pool/main/libs/libsdl2/libsdl2-2.0-0_2.0.9+dfsg1-1_amd64.deb cd ${APPDIR} find ../ -name *.deb -exec dpkg -x {} . \; -# copy libdirectfb-1.2.so.9 +# copy libdirectfb-1.7.so.7 cd ${TMPDIR} -wget -c --quiet http://ftp.us.debian.org/debian/pool/main/d/directfb/libdirectfb-1.2-9_1.2.10.0-5.1_amd64.deb +wget -c --quiet http://ftp.us.debian.org/debian/pool/main/d/directfb/libdirectfb-1.7-7_1.7.7-9_amd64.deb mkdir libdirectfb -dpkg -x libdirectfb-1.2-9_1.2.10.0-5.1_amd64.deb libdirectfb -cp -L libdirectfb/usr/lib/x86_64-linux-gnu/libdirectfb-1.2.so.9 ${APPDIR}/usr/lib/x86_64-linux-gnu/ -cp -L libdirectfb/usr/lib/x86_64-linux-gnu/libfusion-1.2.so.9 ${APPDIR}/usr/lib/x86_64-linux-gnu/ -cp -L libdirectfb/usr/lib/x86_64-linux-gnu/libdirect-1.2.so.9 ${APPDIR}/usr/lib/x86_64-linux-gnu/ +dpkg -x libdirectfb-1.7-7_1.7.7-9_amd64.deb libdirectfb +cp -L libdirectfb/usr/lib/x86_64-linux-gnu/libdirectfb-1.7.so.7 ${APPDIR}/usr/lib/x86_64-linux-gnu/ +cp -L libdirectfb/usr/lib/x86_64-linux-gnu/libfusion-1.7.so.7 ${APPDIR}/usr/lib/x86_64-linux-gnu/ +cp -L libdirectfb/usr/lib/x86_64-linux-gnu/libdirect-1.7.so.7 ${APPDIR}/usr/lib/x86_64-linux-gnu/ # copy QGroundControl release into appimage rsync -av --exclude=*.cpp --exclude=*.h --exclude=*.o --exclude="CMake*" --exclude="*.cmake" ${QGC_RELEASE_DIR}/* ${APPDIR}/ @@ -83,7 +78,7 @@ echo ${QGC_CUSTOM_APP_NAME} Version: ${VERSION} # Go out of AppImage cd ${TMPDIR} -wget -c --quiet "https://github.com/AppImage/AppImageKit/releases/download/12/appimagetool-x86_64.AppImage" +wget -c --quiet "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage" chmod a+x ./appimagetool-x86_64.AppImage ./appimagetool-x86_64.AppImage ./$APP.AppDir/ ${TMPDIR}/$APP".AppImage"