Skip to content

Update Github Action scripts for Swift 5.7 #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: CI Test

on: [pull_request]

jobs:

android-x86_64:
runs-on: macos-13

steps:
- uses: actions/checkout@v1
- name: Select XCode 14.2
run: sudo xcode-select --switch /Applications/Xcode_14.2.app
- name: Install NDK
run: $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install "ndk;25.2.9519653"
- name: Install Swift Android Toolchain
run: wget https://github.com/readdle/swift-android-toolchain/releases/latest/download/swift-android.zip;
unzip swift-android.zip;
swift-android/bin/swift-android tools --update;
- name: Install Android Emulator
run: $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install "system-images;android-29;google_apis;x86_64"
- name: Create Android Emulator
run: $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n ci-test -k "system-images;android-29;google_apis;x86_64" -d "pixel" --force
- name: Start Android Emulator
run: $ANDROID_HOME/emulator/emulator -no-window -avd ci-test -noaudio > /dev/null &
- name: Run connected android tests
run: export ANDROID_NDK_HOME=$ANDROID_HOME/ndk/25.2.9519653;
export SWIFT_ANDROID_HOME=$(pwd)/swift-android;
export PATH=$ANDROID_NDK_HOME:$PATH;
export PATH=$SWIFT_ANDROID_HOME/bin:$SWIFT_ANDROID_HOME/build-tools/current:$PATH;
adb wait-for-device;
./gradlew sample:cAT

# It looks like macos-13-arm64 is quite busy on Gtihub CI, skip for now

# android-arm64-v8a:
# runs-on: macos-13-arm64

# steps:
# - uses: actions/checkout@v1
# - name: Select XCode 14.2
# run: sudo xcode-select --switch /Applications/Xcode_14.2.app
# - name: Install NDK
# run: $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install "ndk;25.2.9519653"
# - name: Install Swift Android Toolchain
# run: wget https://github.com/readdle/swift-android-toolchain/releases/latest/download/swift-android.zip;
# unzip swift-android.zip;
# swift-android/bin/swift-android tools --update;
# - name: Accept Android SDK licenses
# run: yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses
# - name: Install Android Emulator
# run: $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install "system-images;android-29;google_apis;arm64-v8a"
# - name: Create Android Emulator
# run: $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n ci-test -k "system-images;android-29;google_apis;arm64-v8a" -d "pixel" --force
# - name: Start Android Emulator
# run: $ANDROID_HOME/emulator/emulator -no-window -avd ci-test -noaudio > /dev/null &
# - name: Run connected android tests
# run: export ANDROID_NDK_HOME=$ANDROID_HOME/ndk/25.2.9519653;
# export SWIFT_ANDROID_HOME=$(pwd)/swift-android;
# export PATH=$ANDROID_NDK_HOME:$PATH;
# export PATH=$SWIFT_ANDROID_HOME/bin:$SWIFT_ANDROID_HOME/build-tools/current:$PATH;
# adb wait-for-device;
# ./gradlew sample:cAT
41 changes: 0 additions & 41 deletions .github/workflows/android_x86.yml

This file was deleted.

41 changes: 0 additions & 41 deletions .github/workflows/android_x86_64.yml

This file was deleted.

2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ buildscript {

dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath "com.readdle.android.swift:gradle:1.4.4"
classpath "com.readdle.android.swift:gradle:1.4.5"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
classpath 'io.github.gradle-nexus:publish-plugin:1.1.0'
Expand Down
2 changes: 1 addition & 1 deletion sample/src/main/swift/Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.