diff --git a/.dockerignore b/.dockerignore index e2a1739156b..724cfc15826 100644 --- a/.dockerignore +++ b/.dockerignore @@ -13,3 +13,5 @@ docker-compose.yml # Ignore OS-specific files .DS_Store *.swp + +CMakeLists.txt.user* diff --git a/.github/actions/qt-android/action.yml b/.github/actions/qt-android/action.yml index 00dcbab4f6f..e2e9990f449 100644 --- a/.github/actions/qt-android/action.yml +++ b/.github/actions/qt-android/action.yml @@ -56,6 +56,7 @@ runs: key: ${{ runner.os }}-Android-${{ matrix.BuildType }} max-size: 1G save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + verbose: 1 evict-old-files: 'job' - name: Install Qt for ${{ runner.os }} diff --git a/.github/actions/upload/action.yml b/.github/actions/upload/action.yml index a8ce9d9a974..13b3498cfb0 100644 --- a/.github/actions/upload/action.yml +++ b/.github/actions/upload/action.yml @@ -4,16 +4,15 @@ inputs: artifact_name: description: Artifact name required: true + package_name: + description: Package name + required: true aws_key_id: description: AWS access key ID required: false aws_secret_access_key: description: AWS secret access key required: false - source: - description: Source location - required: false - default: package github_token: description: GitHub Token required: false @@ -24,8 +23,8 @@ runs: - name: Save artifact uses: actions/upload-artifact@v4 with: - name: ${{ inputs.artifact_name }} - path: ${{ runner.temp }}/shadow_build_dir/${{ inputs.source }}/${{ inputs.artifact_name }} + name: ${{ inputs.package_name }} + path: ${{ runner.temp }}/shadow_build_dir/${{ inputs.artifact_name }} - name: Configure AWS Credentials if: ${{ github.event_name == 'push' && !github.event.pull_request.head.repo.fork && inputs.aws_key_id != '' && inputs.aws_secret_access_key != '' }} diff --git a/.github/workflows/android-linux.yml b/.github/workflows/android-linux.yml index 64ade02b724..75a8794d93b 100644 --- a/.github/workflows/android-linux.yml +++ b/.github/workflows/android-linux.yml @@ -7,17 +7,11 @@ on: - 'Stable*' tags: - 'v*' - paths-ignore: - - 'deploy/**' - - 'docs/**' pull_request: - paths-ignore: - - 'deploy/**' - - 'docs/**' - - '.github/workflows/docs_deploy.yml' - - '.github/workflows/linux.yml' - - '.github/workflows/macos.yml' - - '.github/workflows/windows.yml' + paths: + - '.github/workflows/android-linux.yml' + - 'deploy/android/**' + - 'src/**' jobs: build: @@ -33,6 +27,7 @@ jobs: env: ARTIFACT: QGroundControl.apk + PACKAGE: QGroundControl QT_VERSION: 6.8.1 GST_VERSION: 1.22.12 QT_ANDROID_KEYSTORE_PATH: ${{ github.workspace }}/deploy/android/android_release.keystore @@ -45,7 +40,8 @@ jobs: - name: Free Disk Space (Ubuntu) uses: jlumbroso/free-disk-space@main with: - android: 'false' + android: false + large-packages: false continue-on-error: true - name: Checkout repo @@ -97,9 +93,9 @@ jobs: uses: ./.github/actions/upload with: artifact_name: ${{ env.ARTIFACT }} + package_name: ${{ env.PACKAGE }} aws_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - source: '' github_token: ${{ secrets.GITHUB_TOKEN }} # - name: Deploy to Play Store diff --git a/.github/workflows/android-windows.yml b/.github/workflows/android-windows.yml index 01bb551375d..174a9bbc04b 100644 --- a/.github/workflows/android-windows.yml +++ b/.github/workflows/android-windows.yml @@ -7,17 +7,11 @@ on: - 'Stable*' tags: - 'v*' - paths-ignore: - - 'deploy/**' - - 'docs/**' pull_request: - paths-ignore: - - 'deploy/**' - - 'docs/**' - - '.github/workflows/docs_deploy.yml' - - '.github/workflows/linux.yml' - - '.github/workflows/macos.yml' - - '.github/workflows/windows.yml' + paths: + - '.github/workflows/android-windows.yml' + - 'deploy/android/**' + - 'src/**' jobs: build: diff --git a/.github/workflows/custom.yml b/.github/workflows/custom.yml index 7ce2482e6a0..5bdc0455f29 100644 --- a/.github/workflows/custom.yml +++ b/.github/workflows/custom.yml @@ -7,19 +7,11 @@ on: - 'Stable*' tags: - 'v*' - paths-ignore: - - 'android/**' - - 'deploy/**' - - 'docs/**' pull_request: - paths-ignore: - - 'android/**' - - 'deploy/**' - - 'docs/**' - - '.github/workflows/docs_deploy.yml' - - '.github/workflows/android.yml' - - '.github/workflows/linux.yml' - - '.github/workflows/macos.yml' + paths: + - 'src/**' + - 'custom-example/**' + - 'deploy/windows/**' jobs: build: @@ -84,6 +76,7 @@ jobs: max-size: 1G variant: sccache save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + verbose: 1 evict-old-files: 'job' - name: Install Qt for Windows (x64) diff --git a/.github/workflows/docker-linux.yml b/.github/workflows/docker-linux.yml index 0ebabcacbff..a2f3b27f095 100644 --- a/.github/workflows/docker-linux.yml +++ b/.github/workflows/docker-linux.yml @@ -7,19 +7,11 @@ on: - 'Stable*' tags: - 'v*' - paths-ignore: - - 'android/**' - - 'deploy/**' - - 'docs/**' pull_request: - paths-ignore: - - 'android/**' - - 'deploy/**' - - 'docs/**' - - '.github/workflows/docs_deploy.yml' - - '.github/workflows/android.yml' - - '.github/workflows/macos.yml' - - '.github/workflows/windows.yml' + paths: + - 'src/**' + - 'deploy/docker/**' + - 'deploy/linux/**' jobs: build: diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index eaef8e962a2..7920897fcf9 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -17,6 +17,7 @@ jobs: env: ARTIFACT: QGroundControl.app + PACKAGE: QGroundControl QT_VERSION: 6.8.1 GST_VERSION: 1.22.12 @@ -28,10 +29,7 @@ jobs: brew uninstall google-chrome sudo rm -rf /Users/runner/Library/Android sudo rm -rf /Applications/Xcode_14* - sudo rm -rf /Applications/Xcode_15.0* - sudo rm -rf /Applications/Xcode_15.1* - sudo rm -rf /Applications/Xcode_15.2* - sudo rm -rf /Applications/Xcode_15.3* + sudo rm -rf /Applications/Xcode_15* ls /Applications df -h @@ -60,9 +58,11 @@ jobs: - name: Set Up Cache uses: hendrikmuhs/ccache-action@main with: + create-symlink: true key: ${{ runner.os }}-iOS-${{ matrix.BuildType }} max-size: 1G save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + verbose: 1 evict-old-files: 'job' - name: Install Qt for MacOS @@ -106,5 +106,5 @@ jobs: - name: Save App uses: actions/upload-artifact@v4 with: - name: ${{ env.ARTIFACT }} + name: ${{ env.PACKAGE }} path: ${{ runner.temp }}/shadow_build_dir/*.app diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index be4dd0feb25..10e2c66c637 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -7,19 +7,11 @@ on: - 'Stable*' tags: - 'v*' - paths-ignore: - - 'android/**' - - 'deploy/**' - - 'docs/**' pull_request: - paths-ignore: - - 'android/**' - - 'deploy/**' - - 'docs/**' - - '.github/workflows/docs_deploy.yml' - - '.github/workflows/android.yml' - - '.github/workflows/macos.yml' - - '.github/workflows/windows.yml' + paths: + - '.github/workflows/linux.yml' + - 'deploy/linux/**' + - 'src/**' jobs: build: @@ -35,6 +27,7 @@ jobs: env: ARTIFACT: QGroundControl-x86_64.AppImage + PACKAGE: QGroundControl-x86_64 QT_VERSION: 6.8.1 GST_VERSION: 1.22.12 @@ -86,6 +79,7 @@ jobs: key: ${{ runner.os }}-${{ matrix.BuildType }} max-size: 1G save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + verbose: 1 evict-old-files: 'job' - name: Install Qt for Linux (x64) @@ -133,7 +127,7 @@ jobs: uses: ./.github/actions/upload with: artifact_name: ${{ env.ARTIFACT }} + package_name: ${{ env.PACKAGE }} aws_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - source: '' github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index bff5653d5e4..864c4484a12 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -7,19 +7,11 @@ on: - 'Stable*' tags: - 'v*' - paths-ignore: - - 'android/**' - - 'deploy/**' - - 'docs/**' pull_request: - paths-ignore: - - 'android/**' - - 'deploy/**' - - 'docs/**' - - '.github/workflows/docs_deploy.yml' - - '.github/workflows/android.yml' - - '.github/workflows/linux.yml' - - '.github/workflows/windows.yml' + paths: + - '.github/workflows/macos.yml' + - 'deploy/macos/**' + - 'src/**' jobs: build: @@ -35,6 +27,7 @@ jobs: env: ARTIFACT: QGroundControl.dmg + PACKAGE: QGroundControl QT_VERSION: 6.8.1 GST_VERSION: 1.22.12 @@ -60,7 +53,7 @@ jobs: - uses: lukka/get-cmake@latest - uses: seanmiddleditch/gha-setup-ninja@v5 - - name: Install Gstreamer + - name: Install GStreamer run: | wget --quiet https://gstreamer.freedesktop.org/data/pkg/osx/${{ env.GST_VERSION }}/gstreamer-1.0-devel-${{ env.GST_VERSION }}-universal.pkg wget --quiet https://gstreamer.freedesktop.org/data/pkg/osx/${{ env.GST_VERSION }}/gstreamer-1.0-${{ env.GST_VERSION }}-universal.pkg @@ -75,6 +68,7 @@ jobs: key: ${{ runner.os }}-${{ matrix.BuildType }} max-size: 1G save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + verbose: 1 evict-old-files: 'job' - name: Install Qt @@ -89,6 +83,12 @@ jobs: modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors cache: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + # - name: Import Code Signing Certificate + # uses: apple-actions/import-codesign-certs@v3 + # with: + # p12-file-base64: ${{ secrets.MACOS_SIGNING_CERTS_P12 }} + # p12-password: ${{ secrets.MACOS_SIGNING_CERTS_PASS }} + - run: mkdir ${{ runner.temp }}/shadow_build_dir - name: Configure @@ -111,7 +111,7 @@ jobs: uses: ./.github/actions/upload with: artifact_name: ${{ env.ARTIFACT }} + package_name: ${{ env.PACKAGE }} aws_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - source: '' github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 965daae8b96..8b2cf3720cc 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -7,19 +7,11 @@ on: - 'Stable*' tags: - 'v*' - paths-ignore: - - 'android/**' - - 'deploy/**' - - 'docs/**' pull_request: - paths-ignore: - - 'android/**' - - 'deploy/**' - - 'docs/**' - - '.github/workflows/docs_deploy.yml' - - '.github/workflows/android.yml' - - '.github/workflows/linux.yml' - - '.github/workflows/macos.yml' + paths: + - '.github/workflows/windows.yml' + - 'deploy/windows/**' + - 'src/**' jobs: build: @@ -36,6 +28,7 @@ jobs: env: ARTIFACT: QGroundControl-installer.exe + PACKAGE: QGroundControl-installer QT_VERSION: 6.8.1 GST_VERSION: 1.22.12 SCCACHE_GHA_ENABLED: "true" @@ -134,7 +127,7 @@ jobs: uses: ./.github/actions/upload with: artifact_name: ${{ env.ARTIFACT }} + package_name: ${{ env.PACKAGE }} aws_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - source: '' github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/cmake/Git.cmake b/cmake/Git.cmake index 2fd9ed7ec57..a4a716ab91c 100644 --- a/cmake/Git.cmake +++ b/cmake/Git.cmake @@ -62,7 +62,6 @@ execute_process( cmake_print_variables(QGC_APP_DATE) string(FIND ${QGC_APP_VERSION} "v" QGC_APP_VERSION_VALID) -cmake_print_variables(QGC_APP_VERSION_VALID) if(QGC_APP_VERSION_VALID GREATER -1) string(REPLACE "v" "" QGC_APP_VERSION ${QGC_APP_VERSION}) else() diff --git a/deploy/docker/Dockerfile-build-macos b/deploy/docker/Dockerfile-build-macos index c857ef28d77..31d269656c2 100644 --- a/deploy/docker/Dockerfile-build-macos +++ b/deploy/docker/Dockerfile-build-macos @@ -8,13 +8,8 @@ ENV QT_DESKTOP=$QT_PATH/${QT_VERSION}/clang_64 ENV PATH=$QT_DESKTOP/bin:/usr/local/bin:$PATH -# Install Homebrew (if not already installed) -RUN /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" \ - && eval "$(/usr/local/bin/brew shellenv)" \ - && brew update - -# Install necessary dependencies via Homebrew -RUN brew install cmake ninja git +COPY tools/setup/macos-dependencies.sh /tmp/qt/ +RUN /tmp/qt/macos-dependencies.sh # Install Qt using Homebrew RUN brew install qt@${QT_VERSION} \ diff --git a/tools/setup/macos-dependencies.sh b/tools/setup/macos-dependencies.sh index 2dfd9434b73..8539e4fac07 100644 --- a/tools/setup/macos-dependencies.sh +++ b/tools/setup/macos-dependencies.sh @@ -4,7 +4,8 @@ if ! command -v brew &> /dev/null then # install Homebrew if not installed yet /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" + eval "$(/usr/local/bin/brew shellenv)" fi brew update -brew install cmake ninja ccache geographiclib SDL2 exiv2 expat zlib shapelib pkgconf create-dmg \ No newline at end of file +brew install cmake ninja ccache geographiclib git SDL2 exiv2 expat zlib shapelib pkgconf create-dmg