maplibre-rs/.github/workflows/library-apple.yml
2022-10-23 15:07:38 +02:00

52 lines
1.7 KiB
YAML

name: Build apple library
on:
workflow_call:
jobs:
library-apple:
name: Build
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- name: Setup binstall
uses: ./.github/actions/setup-binstall
- name: Install just
uses: ./.github/actions/cargo-install
with:
name: just
- name: Install toolchain
shell: bash
run: |
just stable-toolchain
just stable-targets x86_64-apple-darwin aarch64-apple-darwin x86_64-apple-ios aarch64-apple-ios aarch64-apple-ios-sim
- uses: Swatinem/rust-cache@v2
- name: Build
shell: bash
run: just xcodebuild-xcframework
- name: Check x86_64 darwin
shell: bash
run: just check apple x86_64-apple-darwin
- name: Check x86_64 darwin
shell: bash
# TODO: Additional clippy checks for different targets (iOS)
run: just check apple x86_64-apple-darwin
- name: Test x86_64 darwin
shell: bash
# TODO: Additional test runs for different targets (Different targets might require emulation)
run: just test apple x86_64-apple-darwin
- name: Build Example
shell: bash
run: cd apple/xcode && xcodebuild -scheme "example (iOS)" -arch arm64 -sdk iphoneos build CODE_SIGNING_ALLOWED=NO
- name: Swift Version
shell: bash
run: swift --version
- name: Build Swift Package (arm64)
shell: bash
run: cd apple/MapLibreRs && rm -rf .build && swift build -v --arch=arm64
- name: Build Swift Package (x86_64)
shell: bash
run: cd apple/MapLibreRs && rm -rf .build && swift build -v --arch=x86_64