-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
4 changed files
with
91 additions
and
6 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
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,41 @@ | ||
name: Docker-MacOS | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- 'Stable*' | ||
tags: | ||
- 'v*' | ||
pull_request: | ||
paths: | ||
- '.github/workflows/docker-macos.yml' | ||
- 'deploy/docker/**' | ||
- 'deploy/macos/**' | ||
- 'src/**' | ||
- 'CMakeLists.txt' | ||
- 'cmake/**' | ||
|
||
# concurrency: | ||
# group: ${{ github.workflow }}-${{ github.ref }} | ||
# cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
fetch-tags: true | ||
|
||
- run: chmod a+x ./deploy/docker/run-docker-macos.sh | ||
|
||
- name: Run Docker Build | ||
run: ./deploy/docker/run-docker-macos.sh |
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
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,46 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Set defaults appropriate for macOS. | ||
QT_VERSION="${QT_VERSION:-6.8.1}" | ||
QT_PATH="${QT_PATH:-/opt/Qt}" | ||
QT_HOST="${QT_HOST:-mac}" | ||
QT_TARGET="${QT_TARGET:-desktop}" | ||
QT_ARCH="${QT_ARCH:-mac}" | ||
QT_MODULES="${QT_MODULES:-qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors}" | ||
|
||
set -e | ||
|
||
echo "QT_VERSION: $QT_VERSION" | ||
echo "QT_PATH: $QT_PATH" | ||
echo "QT_HOST: $QT_HOST" | ||
echo "QT_TARGET: $QT_TARGET" | ||
echo "QT_ARCH: $QT_ARCH" | ||
echo "QT_MODULES: $QT_MODULES" | ||
|
||
# Update Homebrew and install Python 3 (if needed) | ||
brew update | ||
brew install python3 | ||
|
||
# Install required Python packages, including aqtinstall. | ||
pip3 install --upgrade setuptools wheel py7zr ninja cmake aqtinstall | ||
|
||
# Use aqtinstall to download and install Qt. | ||
aqt install-qt ${QT_HOST} ${QT_TARGET} ${QT_VERSION} ${QT_ARCH} -O ${QT_PATH} -m ${QT_MODULES} | ||
|
||
# macOS does not support GNU readlink -e. | ||
# We use realpath instead (or substitute with greadlink -f if needed). | ||
# Note: On macOS, dynamic libraries are resolved using DYLD_LIBRARY_PATH. | ||
export PATH="$(realpath ${QT_PATH}/${QT_VERSION}/${QT_ARCH}/bin):$PATH" | ||
export PKG_CONFIG_PATH="$(realpath ${QT_PATH}/${QT_VERSION}/${QT_ARCH}/lib/pkgconfig):$PKG_CONFIG_PATH" | ||
export DYLD_LIBRARY_PATH="$(realpath ${QT_PATH}/${QT_VERSION}/${QT_ARCH}/lib):$DYLD_LIBRARY_PATH" | ||
export QT_ROOT_DIR="$(realpath ${QT_PATH}/${QT_VERSION}/${QT_ARCH})" | ||
export QT_PLUGIN_PATH="$(realpath ${QT_PATH}/${QT_VERSION}/${QT_ARCH}/plugins)" | ||
export QML2_IMPORT_PATH="$(realpath ${QT_PATH}/${QT_VERSION}/${QT_ARCH}/qml)" | ||
|
||
echo "Updated environment variables:" | ||
echo "PATH: $PATH" | ||
echo "PKG_CONFIG_PATH: $PKG_CONFIG_PATH" | ||
echo "DYLD_LIBRARY_PATH: $DYLD_LIBRARY_PATH" | ||
echo "QT_ROOT_DIR: $QT_ROOT_DIR" | ||
echo "QT_PLUGIN_PATH: $QT_PLUGIN_PATH" | ||
echo "QML2_IMPORT_PATH: $QML2_IMPORT_PATH" |