Add upload_mission_with_progress_async for mission_raw class #1081
Workflow file for this run
This file contains hidden or 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: macOS Build and Test | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| tags: | |
| - 'v*' | |
| paths-ignore: | |
| - 'cpp/docs/**' | |
| pull_request: | |
| branches: | |
| - '*' | |
| paths-ignore: | |
| - 'cpp/docs/**' | |
| - '.github/workflows/docs_deploy.yml' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| defaults: | |
| run: | |
| working-directory: cpp | |
| jobs: | |
| macOS: | |
| name: ${{ matrix.name }} | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: macOS 15 x64 | |
| build-framework: OFF | |
| runner: macos-15-intel | |
| architecture: 'x64' | |
| python_plat_name: macosx_15_0_x86_64 | |
| - name: macOS 15 arm64 | |
| build-framework: OFF | |
| runner: macos-15 | |
| architecture: 'arm64' | |
| python_plat_name: macosx_15_0_arm64 | |
| - name: macOS 15 framework x64 | |
| build-framework: ON | |
| runner: macos-15-intel | |
| architecture: 'x64' | |
| - name: macOS 15 framework arm64 | |
| build-framework: ON | |
| runner: macos-15 | |
| architecture: 'arm64' | |
| steps: | |
| - name: Install Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.11' | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - uses: actions/cache@v5 | |
| id: cache | |
| with: | |
| path: ./cpp/build/macos/third_party/install | |
| key: ${{ github.job }}-${{ matrix.name }}-${{ hashFiles('./cpp/third_party/**') }}-3 | |
| - name: disable superbuild on cache hit | |
| if: steps.cache.outputs.cache-hit == 'true' | |
| run: | | |
| echo "superbuild=-DSUPERBUILD=OFF" >> $GITHUB_ENV | |
| echo "cmake_prefix_path=-DCMAKE_PREFIX_PATH=$(pwd)/build/macos/third_party/install" >> $GITHUB_ENV | |
| - name: set SDKROOT value | |
| run: echo "SDKROOT=$(xcrun --sdk macosx --show-sdk-path)" >> $GITHUB_ENV | |
| - name: configure | |
| run: cmake $superbuild $cmake_prefix_path -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=build/macos/install -DBUILD_MAVSDK_SERVER=ON -DBUILD_SHARED_LIBS=OFF -DMACOS_FRAMEWORK=${{ matrix.build-framework }} -DWERROR=ON -DENABLE_CPPTRACE=On -Bbuild/macos -H. | |
| - name: build | |
| run: cmake --build build/macos -j$(sysctl -n hw.ncpu) --target install | |
| - name: unit tests | |
| run: ./build/macos/src/unit_tests/unit_tests_runner | |
| - name: system tests | |
| run: ./build/macos/src/system_tests/system_tests_runner | |
| timeout-minutes: 10 | |
| - name: test (mavsdk_server) | |
| run: ./build/macos/src/mavsdk_server/test/unit_tests_mavsdk_server | |
| - name: build C wrapper | |
| working-directory: ./c | |
| run: | | |
| cmake -DCMAKE_INSTALL_PREFIX=build/install -DCMAKE_PREFIX_PATH="$(pwd)/../cpp/build/macos/install;$(pwd)/../cpp/build/macos/third_party/install" -DBUILD_SHARED_LIBS=ON -Bbuild -S. | |
| cmake --build build --target install | |
| - name: Upload framework as artefact | |
| if: ${{ matrix.build-framework == 'ON' }} | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: mavsdk_server_macos_${{ matrix.architecture }}.framework | |
| path: ./cpp/build/macos/src/mavsdk_server/src/mavsdk_server.framework | |
| retention-days: 2 | |
| - name: Upload binary as artefact | |
| if: ${{ matrix.build-framework == 'OFF' }} | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: mavsdk_server_macos_${{ matrix.architecture }} | |
| path: cpp/build/macos/install/bin/mavsdk_server | |
| retention-days: 2 | |
| - name: Publish mavsdk_server_macos to github release | |
| if: ${{ startsWith(github.ref, 'refs/tags/v') && matrix.build-framework == 'OFF' }} | |
| uses: svenstaro/upload-release-action@v1-release | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: cpp/build/macos/install/bin/mavsdk_server | |
| asset_name: mavsdk_server_macos_${{ matrix.architecture }} | |
| tag: ${{ github.ref }} | |
| overwrite: true | |
| - name: build mavsdk wheel | |
| if: ${{ matrix.build-framework == 'OFF' }} | |
| working-directory: . | |
| run: | | |
| pip install -r py/requirements-dev.txt delocate | |
| mkdir -p py/mavsdk/mavsdk/lib | |
| cp c/build/install/lib/libcmavsdk.dylib py/mavsdk/mavsdk/lib/libcmavsdk.dylib | |
| cd py/mavsdk | |
| python3 setup.py bdist_wheel --plat-name ${{ matrix.python_plat_name }} | |
| delocate-wheel -w wheelhouse dist/mavsdk4-*-macosx_*.whl | |
| - name: upload mavsdk wheel | |
| if: ${{ matrix.build-framework == 'OFF' }} | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: mavsdk_wheel_macos_${{ matrix.architecture }} | |
| path: py/mavsdk/wheelhouse/*.whl | |
| retention-days: 2 | |
| iOS: | |
| name: ${{ matrix.name }} | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: ios | |
| platform: OS64 | |
| sdk: iphoneos | |
| runner: macos-15 | |
| - name: ios_simulator_x64 | |
| platform: SIMULATOR64 | |
| sdk: iphonesimulator | |
| runner: macos-15-intel | |
| - name: ios_simulator_arm64 | |
| platform: SIMULATORARM64 | |
| sdk: iphonesimulator | |
| runner: macos-15 | |
| steps: | |
| - name: Install Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.11' | |
| architecture: 'x64' | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - uses: actions/cache@v5 | |
| id: cache | |
| with: | |
| path: ./cpp/build/${{ matrix.name }}/third_party/install | |
| key: ${{ github.job }}-${{ matrix.name }}-${{ hashFiles('./cpp/third_party/**', './cpp/cmake/ios.toolchain.cmake') }}-3 | |
| - name: disable superbuild on cache hit | |
| if: steps.cache.outputs.cache-hit == 'true' | |
| run: | | |
| echo "superbuild=-DSUPERBUILD=OFF" >> $GITHUB_ENV | |
| echo "cmake_prefix_path=-DCMAKE_PREFIX_PATH=$(pwd)/build/${{ matrix.name }}/third_party/install" >> $GITHUB_ENV | |
| - name: set SDK-related environment variables (for non-cmake deps) | |
| run: | | |
| echo "SDKROOT=$(xcrun --sdk ${{ matrix.sdk }} --show-sdk-path)" >> $GITHUB_ENV | |
| - name: install pymavlink dependencies | |
| run: | | |
| python3 -m pip install --upgrade pip | |
| python3 -m pip install wheel | |
| python3 -m pip install future | |
| - name: configure | |
| run: cmake $superbuild $cmake_prefix_path -DENABLE_STRICT_TRY_COMPILE=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_TOOLCHAIN_FILE=$(pwd)/cmake/ios.toolchain.cmake -DENABLE_BITCODE=Off -DPLATFORM=${{ matrix.platform }} -DDEPLOYMENT_TARGET=14.0 -DBUILD_MAVSDK_SERVER=ON -DBUILD_SHARED_LIBS=OFF -DWERROR=ON -Bbuild/${{ matrix.name }} -H. | |
| - name: build | |
| run: cmake --build build/${{ matrix.name }} -j$(sysctl -n hw.ncpu) | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: mavsdk_server_${{ matrix.name }}.framework | |
| path: ./cpp/build/${{ matrix.name }}/src/mavsdk_server/src/mavsdk_server.framework | |
| retention-days: 2 | |
| iOS-XCFramework: | |
| name: iOS XCFramework | |
| needs: [macOS, iOS] | |
| runs-on: macos-15 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: mavsdk_server_ios.framework | |
| path: ./cpp/build/ios/src/mavsdk_server/src/mavsdk_server.framework | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: mavsdk_server_ios_simulator_x64.framework | |
| path: ./cpp/build/ios_simulator_x64/src/mavsdk_server/src/mavsdk_server.framework | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: mavsdk_server_ios_simulator_arm64.framework | |
| path: ./cpp/build/ios_simulator_arm64/src/mavsdk_server/src/mavsdk_server.framework | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: mavsdk_server_macos_x64.framework | |
| path: ./cpp/build/macos_x64/src/mavsdk_server/src/mavsdk_server.framework | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: mavsdk_server_macos_arm64.framework | |
| path: ./cpp/build/macos_arm64/src/mavsdk_server/src/mavsdk_server.framework | |
| - name: Install tree | |
| run: brew install tree | |
| - name: Package | |
| run: bash ./src/mavsdk_server/tools/package_mavsdk_server_framework.bash | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: mavsdk_server.xcframework | |
| path: ./cpp/build/mavsdk_server.xcframework | |
| retention-days: 2 | |
| - name: Publish xcframework | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| uses: svenstaro/upload-release-action@v1-release | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: 'cpp/build/mavsdk_server.xcframework.zip' | |
| asset_name: 'mavsdk_server.xcframework.zip' | |
| tag: ${{ github.ref }} | |
| overwrite: true | |
| - name: Publish xcframework checksum | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| uses: svenstaro/upload-release-action@v1-release | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: 'cpp/build/mavsdk_server.xcframework.zip.sha256' | |
| asset_name: 'mavsdk_server.xcframework.zip.sha256' | |
| tag: ${{ github.ref }} | |
| overwrite: true |