0
0
mirror of https://github.com/signalapp/libsignal.git synced 2024-09-19 19:42:19 +02:00

CI: Test building for iOS devices

This commit is contained in:
Jordan Rose 2024-07-22 16:50:08 -07:00
parent 28b9bf0951
commit a9b0ac2729
4 changed files with 36 additions and 7 deletions

View File

@ -241,23 +241,35 @@ jobs:
- run: brew install protobuf
- name: Build for x86_64-apple-ios
run: swift/build_ffi.sh --release
env:
CARGO_BUILD_TARGET: x86_64-apple-ios
- name: Build for aarch64-apple-ios
run: swift/build_ffi.sh --release
env:
CARGO_BUILD_TARGET: aarch64-apple-ios
# Build the simulator architectures for completeness.
- name: Build for x86_64-apple-ios
run: swift/build_ffi.sh --release
env:
CARGO_BUILD_TARGET: x86_64-apple-ios
- name: Build for aarch64-apple-ios-sim
run: swift/build_ffi.sh --release
env:
CARGO_BUILD_TARGET: aarch64-apple-ios-sim
- name: Run pod lint
run: pod lib lint --verbose --platforms=ios
# The simulator build of the CocoaPod is already tested in regular CI as part of `pod lib lint`.
- name: Set up testing workspace
run: pod install
working-directory: swift/cocoapods-testing
- name: Manually build for device
run: xcodebuild -scheme LibSignalClient -sdk iphoneos build-for-testing
working-directory: swift/cocoapods-testing
- name: Build in Release for device as well
run: xcodebuild -scheme LibSignalClient -sdk iphoneos -configuration Release
working-directory: swift/cocoapods-testing
rust-stable-testing:
name: Rust tests (using latest stable)

3
swift/cocoapods-testing/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
Podfile.lock
Pods/
Testing.xcworkspace

View File

@ -0,0 +1,7 @@
platform :ios, '13'
use_frameworks!
workspace 'Testing'
pod 'LibSignalClient', path: '../../', testspecs: ["Tests"]

View File

@ -0,0 +1,7 @@
This directory exists for the Slow Tests to generate a fake project that depends on LibSignalClient, very similar to what `pod lib lint` does. By doing it manually, we can ensure that we build for device as well as simulator.
```shell
% rm -rf Pods Testing.xcworkspace
% pod install
% xcodebuild -scheme LibSignalClient -sdk iphoneos build-for-testing
```