Skip to content

Commit

Permalink
CI: add macOS (M1) runners
Browse files Browse the repository at this point in the history
And bump all macos runners from 12 to 13.

Signed-off-by: Julian Oes <[email protected]>
  • Loading branch information
julianoes committed Apr 24, 2024
1 parent 7b9655e commit 990afe8
Showing 1 changed file with 32 additions and 10 deletions.
42 changes: 32 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -393,20 +393,31 @@ jobs:

macOS:
name: ${{ matrix.name }}
runs-on: macos-12
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include:
- name: macOS
- name: macOS x64
build-framework: OFF
- name: macOS-framework
runner: macos-13
architecture: 'x64'
- name: macOS arm64
build-framework: OFF
runner: macos-14
architecture: 'arm64'
- name: macOS framework x64
build-framework: ON
runner: macos-13
architecture: 'x64'
- name: macOS framework arm64
build-framework: ON
runner: macos-14
architecture: 'arm64'
steps:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
architecture: 'x64'
- uses: actions/checkout@v4
with:
submodules: recursive
Expand Down Expand Up @@ -435,22 +446,29 @@ jobs:
if: ${{ matrix.build-framework == 'ON' }}
uses: actions/upload-artifact@v4
with:
name: mavsdk_server_macos.framework
name: mavsdk_server_macos_${{ matrix.architecture }}.framework
path: ./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@v4
with:
name: mavsdk_server_${{ matrix.architecture }}
path: 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: 'build/macos/install/bin/mavsdk_server'
asset_name: 'mavsdk_server_macos'
file: build/macos/install/bin/mavsdk_server
asset_name: mavsdk_server_macos_${{ matrix.architecture }}
tag: ${{ github.ref }}
overwrite: true

iOS:
name: ${{ matrix.name }}
runs-on: macos-12
runs-on: macos-13
strategy:
matrix:
include:
Expand Down Expand Up @@ -499,7 +517,7 @@ jobs:
iOS-XCFramework:
name: iOS XCFramework
needs: [macOS, iOS]
runs-on: macos-12
runs-on: macos-13
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -515,7 +533,11 @@ jobs:
- uses: actions/download-artifact@v4
with:
name: mavsdk_server_macos.framework
path: ./build/macos/src/mavsdk_server/src/mavsdk_server.framework
path: ./build/macos/src/mavsdk_server/src/mavsdk_server_x64.framework
- uses: actions/download-artifact@v4
with:
name: mavsdk_server_macos.framework
path: ./build/macos/src/mavsdk_server/src/mavsdk_server_arm64.framework
- name: Package
run: bash ./src/mavsdk_server/tools/package_mavsdk_server_framework.bash
- uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 990afe8

Please sign in to comment.