Skip to content

Commit

Permalink
CI: Deployment Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
HTRamsey committed Jan 16, 2025
1 parent b15ec26 commit ba50c25
Show file tree
Hide file tree
Showing 14 changed files with 65 additions and 106 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ docker-compose.yml
# Ignore OS-specific files
.DS_Store
*.swp

CMakeLists.txt.user*
1 change: 1 addition & 0 deletions .github/actions/qt-android/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
11 changes: 5 additions & 6 deletions .github/actions/upload/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 != '' }}
Expand Down
20 changes: 8 additions & 12 deletions .github/workflows/android-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/android-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
17 changes: 5 additions & 12 deletions .github/workflows/custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)
Expand Down
16 changes: 4 additions & 12 deletions .github/workflows/docker-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:

env:
ARTIFACT: QGroundControl.app
PACKAGE: QGroundControl
QT_VERSION: 6.8.1
GST_VERSION: 1.22.12

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
20 changes: 7 additions & 13 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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 }}
28 changes: 14 additions & 14 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -35,6 +27,7 @@ jobs:

env:
ARTIFACT: QGroundControl.dmg
PACKAGE: QGroundControl
QT_VERSION: 6.8.1
GST_VERSION: 1.22.12

Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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 }}
19 changes: 6 additions & 13 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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"
Expand Down Expand Up @@ -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 }}
1 change: 0 additions & 1 deletion cmake/Git.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
9 changes: 2 additions & 7 deletions deploy/docker/Dockerfile-build-macos
Original file line number Diff line number Diff line change
Expand Up @@ -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} \
Expand Down
Loading

0 comments on commit ba50c25

Please sign in to comment.