-
-
Notifications
You must be signed in to change notification settings - Fork 5
73 lines (64 loc) · 2.36 KB
/
Copy pathci.yml
File metadata and controls
73 lines (64 loc) · 2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: swift-android-native ci
on:
push:
branches: [main]
workflow_dispatch:
pull_request:
branches:
- '*'
schedule:
- cron: '45 2,13 * * *'
jobs:
ci:
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
# macOS testing isn't strictly necessary
# os: ['macos-15-intel', 'ubuntu-latest']
os: ['ubuntu-latest']
# swift: ['nightly-6.3', 'nightly-main']
swift: ['nightly-6.3']
# android-api: ['28', '36']
android-api: ['28']
android-ndk: ['r27d', 'r30-beta1']
# android-ndk: ['r27d']
runs-on: ${{ matrix.os }}
steps:
- name: "Setup Homebrew"
uses: Homebrew/actions/setup-homebrew@main
- name: "Build Swift Package for Android (Skip)"
run: |
brew install skiptools/skip/skip || (brew update && brew install skiptools/skip/skip)
- name: "Install Host Toolchain prerequisites"
if: runner.os == 'Linux'
run: |
sudo apt-get -y install libcurl4-openssl-dev || (sudo apt-get update && sudo apt-get -y install libcurl4-openssl-dev)
- name: "Install Swift SDK for Android"
run: |
# need swiftly init on Linux
swiftly init --assume-yes --no-modify-profile --skip-install
skip android sdk install --verbose --version ${{ matrix.swift }} --ndk-version ${{ matrix.android-ndk }}
# https://github.com/swiftlang/swift-driver/pull/1879
echo "ANDROID_NDK_ROOT=" >> $GITHUB_ENV
- uses: actions/checkout@v6
- name: "Build package for Android"
run: skip android build --build-tests
- name: "Test Swift Package on Android"
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.android-api }}
arch: x86_64
script: skip android test --apk --verbose
- name: "Test Swift Package on host OS"
run: swift test
- name: "Test Swift Package on iOS"
if: runner.os == 'macOS'
run: xcodebuild test -sdk "iphonesimulator" -destination "platform=iOS Simulator,name=iPhone 17" -scheme swift-android-native-Package
soundness:
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
with:
# Not API stable package (yet)
api_breakage_check_enabled: false
format_check_enabled: true
docs_check_enabled: true