Update CMakeLists.txt #181
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
name: Compile on iOS | |
on: | |
push: | |
branches: [ develop ] | |
paths-ignore: | |
- ".gitignore" | |
- "README.md" | |
# ignore CI for other platforms | |
- ".github/workflows/android.yml" | |
- ".github/workflows/api.yml" | |
- ".github/workflows/linux.yml" | |
- ".github/workflows/macos.yml" | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout Enroute | |
uses: actions/checkout@v4 | |
with: | |
path: enroute | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Checkout Enroute Dependencies | |
uses: actions/checkout@v4 | |
with: | |
path: enrouteDependencies | |
repository: Akaflieg-Freiburg/enrouteDependencies | |
submodules: recursive | |
- name: Set up macOS | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
- name: Install Ninja | |
run: brew install ninja | |
- name: Install Qt for Desktop | |
uses: jurplel/install-qt-action@v4 | |
with: | |
cache: 'true' | |
cache-key-prefix: 'install-qt-action-macOS-host' | |
version: '6.8.*' | |
modules: 'qt5compat qtconnectivity qthttpserver qtimageformats qtlocation qtmultimedia qtpositioning qtshadertools qtspeech qtwebsockets qtwebview' | |
- name: Set QT_HOST_PATH | |
run: | | |
echo QT_HOST_PATH=$QT_ROOT_DIR >> $GITHUB_ENV | |
- name: Install Qt for iOS | |
uses: jurplel/install-qt-action@v4 | |
with: | |
cache: 'true' | |
cache-key-prefix: 'install-qt-action-iOS' | |
target: 'ios' | |
version: '6.8.*' | |
modules: 'qt5compat qtconnectivity qthttpserver qtimageformats qtlocation qtmultimedia qtpositioning qtshadertools qtsensors qtspeech qtwebsockets qtwebview' | |
- name: ccache | |
uses: hendrikmuhs/[email protected] | |
with: | |
key: macos | |
- name: Compile and Install bzip2 | |
run: | | |
$QT_ROOT_DIR/bin/qt-cmake \ | |
-G Ninja \ | |
-S enrouteDependencies/bzip2 \ | |
-B build-bzip2-iOS \ | |
-DENABLE_APP=OFF \ | |
-DENABLE_DOCS=OFF \ | |
-DENABLE_SHARED_LIB=OFF \ | |
-DENABLE_STATIC_LIB=ON \ | |
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \ | |
-DCMAKE_INSTALL_PREFIX=$QT_ROOT_DIR | |
cmake --build build-bzip2-iOS | |
cmake --install build-bzip2-iOS | |
- name: Compile and Install zlib | |
run: | | |
$QT_ROOT_DIR/bin/qt-cmake \ | |
-G Ninja \ | |
-S enrouteDependencies/zlib \ | |
-B build-zlib-iOS \ | |
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \ | |
-DCMAKE_INSTALL_PREFIX=$QT_ROOT_DIR | |
cmake --build build-zlib-iOS | |
cmake --install build-zlib-iOS | |
- name: Compile and Install libzip | |
run: | | |
$QT_ROOT_DIR/bin/qt-cmake \ | |
-S enrouteDependencies/libzip \ | |
-B build-libzip \ | |
-G Ninja \ | |
-DBUILD_DOC=OFF \ | |
-DBUILD_EXAMPLES=OFF \ | |
-DBUILD_REGRESS=OFF \ | |
-DBUILD_SHARED_LIBS=OFF \ | |
-DBUILD_TOOLS=OFF \ | |
-DENABLE_BZIP2=OFF \ | |
-DENABLE_LZMA=OFF \ | |
-DENABLE_ZSTD=OFF \ | |
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \ | |
-DCMAKE_INSTALL_PREFIX=$QT_ROOT_DIR | |
cmake --build build-libzip | |
cmake --install build-libzip | |
- name: Compile and Install maplibre-native-qt | |
run: | | |
$QT_ROOT_DIR/bin/qt-cmake \ | |
-S enrouteDependencies/maplibre-native-qt \ | |
-B build-maplibre-native-qt \ | |
-G Ninja \ | |
-DBUILD_TESTING=OFF \ | |
-DCMAKE_C_COMPILER_LAUNCHER="ccache" \ | |
-DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \ | |
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \ | |
-DCMAKE_PREFIX_PATH=$QT_ROOT_DIR \ | |
-DCMAKE_INSTALL_PREFIX=$QT_ROOT_DIR | |
cmake --build build-maplibre-native-qt | |
cmake --install build-maplibre-native-qt | |
- name: Compile Enroute Flight Navigation | |
run: | | |
$QT_ROOT_DIR/bin/qt-cmake \ | |
-B build-enroute \ | |
-S enroute \ | |
-DCMAKE_BUILD_TYPE=Debug \ | |
-DCMAKE_C_COMPILER_LAUNCHER="ccache" \ | |
-DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \ | |
-DCMAKE_INSTALL_PREFIX=. | |
cmake --build build-enroute -- -sdk iphonesimulator | |
- name: Package | |
run: | | |
brew install create-dmg | |
create-dmg enroute-iphonesimulator.dmg build-enroute/src/Debug-iphonesimulator | |
- name: Upload to developerBuilds | |
run: | | |
gh release upload --clobber developerBuilds ../enroute-iphonesimulator.dmg | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
working-directory: enroute |