Skip to content

Commit

Permalink
Xcode 16 (#99)
Browse files Browse the repository at this point in the history
* CircleCI - Use `Xcode 16`
* CircleCI - Update job reference
* CircleCI - Fix indentation and bump `Xcode`
* CircleCI - Add missing parameter definitions
* CircleCI - Use `SCAN_DESTINATION` instead of `SCAN_DEVICE`
* CircleCI - Use `xcodebuild` instead of `fastlane scan`
* CircleCI - Update `iOS` simulator versions
* CircleCI - Add missing parameter definitions for `test_example_project`
* Update `Package` files to use `Flow` at `1.12.1`
* Update `README` to reference `Xcode 16.0.0`
* Update `CHANGELOG` to bump the version
* Update project to use `Flow` at version `1.12.1`
* Update `CircleCI` to use `Xcode 16`,`iOS 18`, `iPhone 16`

---------

Co-authored-by: bartszczepaniak <[email protected]>
  • Loading branch information
astenvall and bartszczepaniak authored Sep 26, 2024
1 parent 83608f2 commit 6e231aa
Show file tree
Hide file tree
Showing 7 changed files with 94 additions and 58 deletions.
85 changes: 59 additions & 26 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
version: 2.1

anchors:
- &test_device "iPhone 15"
- &test_device "iPhone 16"
- &test_device_os "18.0"
- &clean_before_build true
- &test_output_folder test_output
- &default_executor
macos:
xcode: "15.0.0"
xcode: "16.0.0"

env:
global:
Expand All @@ -28,16 +29,31 @@ commands:
pod install --verbose
test_main_project:
parameters:
simulator:
type: string
default: *test_device
os_version:
type: string
default: *test_device_os
steps:
- checkout
- test_project_and_store_results:
project: "Presentation.xcodeproj"
scheme: "Presentation"
simulator: <<parameters.simulator>>
os_version: <<parameters.os_version>>

test_example_project:
parameters:
path: # We need to pass a path here because the example projects are in a sub folder of the project
type: string
simulator:
type: string
default: *test_device
os_version:
type: string
default: *test_device_os
steps:
- checkout
- pod-install:
Expand All @@ -47,7 +63,8 @@ commands:
scheme: "Example"
path: <<parameters.path>>
test_output_folder: *test_output_folder
simulator: "iPhone 14"
simulator: <<parameters.simulator>>
os_version: <<parameters.os_version>>

# We introduced two separate commands for projects and workspaces because we didnt find a generic and non-confusing way to introduce
# a condition to only pass either the project or the workspace environment argument to the fastlane scan
Expand All @@ -58,14 +75,21 @@ commands:
type: string
scheme:
type: string
simulator:
type: string
default: *test_device
os_version:
type: string
default: *test_device_os
steps:
- run:
command: fastlane scan
environment:
SCAN_PROJECT: <<parameters.project>>
SCAN_SCHEME: <<parameters.scheme>>
SCAN_DEVICE: *test_device
SCAN_CLEAN: *clean_before_build
name: Run tests on iOS <<parameters.os_version>>
command: |
xcodebuild -scheme <<parameters.scheme>> \
-project <<parameters.project>> \
-destination "platform=iOS Simulator,OS=<<parameters.os_version>>,name=<<parameters.simulator>>" \
clean build test \
| xcpretty --report junit --output 'test_output/report.junit'
- store_artifacts: # This will by default store an html and junit file as artifacts (See "Artifacts" tab in CircleCI report)
path: *test_output_folder # test_output is the default temporary folder for fastlane scan output
destination: *test_output_folder # This will create a sub structure in the artifacts section in CircleCI
Expand All @@ -86,16 +110,19 @@ commands:
simulator:
type: string
default: *test_device
os_version:
type: string
default: *test_device_os
steps:
- run:
command: |
name: Run tests on iOS <<parameters.os_version>>
command: |
cd <<parameters.path>>
fastlane scan
environment:
SCAN_WORKSPACE: <<parameters.workspace>>
SCAN_SCHEME: <<parameters.scheme>>
SCAN_DEVICE: <<parameters.simulator>>
SCAN_CLEAN: *clean_before_build
xcodebuild -scheme <<parameters.scheme>> \
-workspace <<parameters.workspace>> \
-destination "platform=iOS Simulator,OS=<<parameters.os_version>>,name=<<parameters.simulator>>" \
clean build test \
| xcpretty --report junit --output '<<parameters.path>>/<<parameters.test_output_folder>>/report.junit'
- store_artifacts: # This will by default store an html and junit file as artifacts (See "Artifacts" tab in CircleCI report)
path: <<parameters.path>>/<<parameters.test_output_folder>> # test_output is the default temporary folder for fastlane scan output
destination: <<parameters.test_output_folder>> # This will create a sub structure in the artifacts section in CircleCI
Expand Down Expand Up @@ -128,38 +155,44 @@ jobs:
- store_test_results:
path: swiftlint.html

test-xcode14-ios16:
macos:
xcode: "14.0.0"
steps:
- test_main_project

test-xcode15-ios17:
test-xcode16-ios18:
<<: *default_executor
steps:
- test_main_project

test-xcode15-ios17:
macos:
xcode: "15.4.0"
steps:
- test_main_project:
simulator: "iPhone 15"
os_version: "17.5"

test-example-messages:
macos:
xcode: "14.0.0"
xcode: "16.0.0"
steps:
- test_example_project:
path: Examples/Messages
simulator: "iPhone 16"
os_version: "18.0"

test-example-styles-and-options:
macos:
xcode: "14.0.0"
xcode: "16.0.0"
steps:
- test_example_project:
path: Examples/StylesAndOptions
simulator: "iPhone 16"
os_version: "18.0"

workflows:
version: 2.1
build-and-test:
jobs:
- swiftlint:
version: 0.52.2
- test-xcode14-ios16
- test-xcode16-ios18
- test-xcode15-ios17
- test-example-messages
# Temporary disabled need to be addressed, there are issues in Flow that might fix this thouh example failiure bellow
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 1.18.0
- Support `Xcode 16`

# 1.17.0
- Save `json` files with `UIViewController` memory leak name

Expand Down
24 changes: 11 additions & 13 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
{
"object": {
"pins": [
{
"package": "Flow",
"repositoryURL": "https://github.com/izettle/Flow.git",
"state": {
"branch": null,
"revision": "ad38c734f16a404de8895236424bc4acc5355a3d",
"version": "1.10.1"
}
"pins" : [
{
"identity" : "flow",
"kind" : "remoteSourceControl",
"location" : "https://github.com/iZettle/Flow.git",
"state" : {
"revision" : "c3e69f924f046207487948dcad55826343a122d5",
"version" : "1.12.1"
}
]
},
"version": 1
}
],
"version" : 2
}
9 changes: 6 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
// swift-tools-version:5.1
// swift-tools-version:5.7

import PackageDescription

let package = Package(
name: "Presentation",
platforms: [
.iOS(.v10)
.iOS(.v12)
],
products: [
.library(
name: "Presentation",
targets: ["Presentation"]),
],
dependencies: [
.package(url: "https://github.com/izettle/Flow.git", .upToNextMajor(from: "1.10.0"))
.package(
url: "https://github.com/iZettle/Flow.git",
.upToNextMajor(from: "1.12.1")
)
],
targets: [
.target(
Expand Down
4 changes: 2 additions & 2 deletions Presentation.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 52;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -593,7 +593,7 @@
repositoryURL = "https://github.com/iZettle/Flow.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 1.10.1;
minimumVersion = 1.12.1;
};
};
/* End XCRemoteSwiftPackageReference section */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
{
"object": {
"pins": [
{
"package": "Flow",
"repositoryURL": "https://github.com/iZettle/Flow.git",
"state": {
"branch": null,
"revision": "ad38c734f16a404de8895236424bc4acc5355a3d",
"version": "1.10.1"
}
"originHash" : "af8820cba803a4990a87c58fd7afcb8f3aaf40249a6881c2c5b1e0a7921389a5",
"pins" : [
{
"identity" : "flow",
"kind" : "remoteSourceControl",
"location" : "https://github.com/iZettle/Flow.git",
"state" : {
"revision" : "c3e69f924f046207487948dcad55826343a122d5",
"version" : "1.12.1"
}
]
},
"version": 1
}
],
"version" : 3
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Build Status](https://travis-ci.org/iZettle/Presentation.svg?branch=master)](https://travis-ci.org/iZettle/Presentation)
[![Platforms](https://img.shields.io/badge/platform-%20iOS-gray.svg)](https://img.shields.io/badge/platform-%20iOS-gray.svg)
[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
![Xcode version](https://img.shields.io/badge/Xcode-13.2.0-green)
![Xcode version](https://img.shields.io/badge/Xcode-16.0.0-green)

Presentation is an iOS Swift library for working with UI presentations in a more structured way with a focus on:

Expand Down

0 comments on commit 6e231aa

Please sign in to comment.