Skip to content

Commit

Permalink
Update project and installation methods (CocoaPods, and Swift Package…
Browse files Browse the repository at this point in the history
… Manager) to support building and running with Xcode 15.2
  • Loading branch information
Troy Stump committed May 10, 2024
1 parent f856226 commit f9a71ff
Show file tree
Hide file tree
Showing 72 changed files with 1,972 additions and 567 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,39 @@ on:
branches:
- master


env:
# Use Xcode 15.2 or newer to support VisionOS
DEVELOPER_DIR: /Applications/Xcode_15.2.app

jobs:
test:
name: Test
runs-on: macOS-latest
runs-on: macos-latest
strategy:
matrix:
platform: ['iOS Simulator,name=iPhone 8']
platform: ['iOS Simulator,name=iPhone 15']
steps:
- uses: actions/checkout@v2
- name: Test
run: make test
analyze:
name: Analyze
runs-on: macOS-latest
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: analyze
run: make analyze
cocoapods:
name: CocoaPods
runs-on: macOS-latest
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Lint
run: make cocoapods
carthage:
name: Carthage
runs-on: macOS-latest
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: carthage
Expand All @@ -47,14 +52,14 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Verify that PINCache can be build by SPM
- name: Verify that PINCache can be built by SPM
run: make spm
xcode-spm-integration:
name: Build iOS example project
runs-on: macOS-latest
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Check Xcode's spm integration
run: make example
run: make example
5 changes: 5 additions & 0 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
release-type:
description: 'The type of release. Must be major, minor or patch'
required: true

env:
# Use Xcode 15.2 or newer to support VisionOS
DEVELOPER_DIR: /Applications/Xcode_15.2.app

jobs:
create_release:
runs-on: macOS-latest
Expand Down
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "pinterest/PINOperation" ~> 1.2.1
github "pinterest/PINOperation" ~> 1.2.3
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "pinterest/PINOperation" "1.2"
github "pinterest/PINOperation" "1.2.3"
80 changes: 27 additions & 53 deletions Carthage/Checkouts/PINOperation/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,71 +10,45 @@ on:
branches:
- master

env:
# Use Xcode 15.2 or newer to support VisionOS
DEVELOPER_DIR: /Applications/Xcode_15.2.app

jobs:
build:
name: Build
runs-on: macOS-latest
test:
name: Test
runs-on: macos-latest
strategy:
matrix:
platform: ['iOS Simulator,name=iPhone 8']
platform: ['iOS Simulator,name=iPhone 15']
steps:
- uses: actions/checkout@v2
- name: Analyze and Test
run: |
xcodebuild clean analyze test \
-destination "platform=${{ matrix.platform }}" \
-sdk "iphonesimulator" \
-project PINOperation.xcodeproj \
-scheme PINOperation \
ONLY_ACTIVE_ARCH=NO \
CODE_SIGNING_REQUIRED=NO \
CLANG_ANALYZER_OUTPUT=plist-html \
CLANG_ANALYZER_OUTPUT_DIR="$(pwd)/clang" \
| xcpretty
if [[ -n `find $(pwd)/clang -name "*.html"` ]] ; then rm -rf $(pwd)/clang; exit 1; fi
rm -rf $(pwd)/clang
- name: Test
run: make test
analyze:
name: Analyze
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: analyze
run: make analyze
cocoapods:
name: CocoaPods
runs-on: macOS-latest
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Lint
run: pod lib lint
- name: Cocoapods lint
run: make cocoapods
carthage:
name: Carthage
runs-on: macOS-latest
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: carthage build --no-skip-current
spm:
name: Swift Package Manager tests
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
- name: Test
run: swift test
example:
name: Build Example project
runs-on: macOS-latest
strategy:
matrix:
platform: ['iOS Simulator,name=iPhone 8']
- name: carthage
run: make carthage
swift-package-manager:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Install Pods
run: cd Example && pod install
- name: Build
run: |
cd Example && xcodebuild clean analyze \
-destination "platform=${{ matrix.platform }}" \
-sdk "iphonesimulator" \
-workspace PINOperationExample.xcworkspace \
-scheme PINOperationExample \
ONLY_ACTIVE_ARCH=NO \
CODE_SIGNING_REQUIRED=NO \
CLANG_ANALYZER_OUTPUT=plist-html \
CLANG_ANALYZER_OUTPUT_DIR="$(pwd)/clang" \
| xcpretty
if [[ -n `find $(pwd)/clang -name "*.html"` ]] ; then rm -rf $(pwd)/clang; exit 1; fi
rm -rf $(pwd)/clang
- name: Verify that PINOperation can be built by SPM
run: make spm
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Create Release
on:
workflow_dispatch:
inputs:
release-type:
description: 'The type of release. Must be major, minor or patch'
required: true

env:
# Use Xcode 15.2 or newer to support VisionOS
DEVELOPER_DIR: /Applications/Xcode_15.2.app

jobs:
create_release:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
# Make sure we can lint before creating the release.
- name: Cocoapods lint
run: make cocoapods
- name: Create Release Commit
env:
GITHUB_CHANGELOG_API_KEY: ${{ secrets.GITHUB_TOKEN }}
OSS_PROJECT: PINOperation
run: |
gem install github_changelog_generator
Scripts/release.sh --${{ github.event.inputs.release-type }}
git push origin HEAD
- name: Tag Release
run: Scripts/tag-release-branch.sh
- name: Publish Release
uses: actions/create-release@v1
env:
GITHUB_CHANGELOG_API_KEY: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.RELEASE_TAG }}
release_name: ${{ env.RELEASE_TAG }}
body_path: RELEASE_NOTES.md
draft: false
- name: Push to Cocoapods
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
run: pod trunk push
4 changes: 2 additions & 2 deletions Carthage/Checkouts/PINOperation/.github_changelog_generator
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
issues=false
since-tag=1.1.1
future-release=1.2
since-tag=1.2.1
future-release=1.2.2
32 changes: 32 additions & 0 deletions Carthage/Checkouts/PINOperation/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
# Changelog

## [1.2.3](https://github.com/Pinterest/PINOperation/tree/1.2.3) (TBD)

[Full Changelog](https://github.com/Pinterest/PINOperation/compare/1.2.2...1.2.3)


- Update project to build and run using Xcode 15
- Update CocoaPods Podspec to include Privacy Manifest file
- Bump minimum deployment targets to iOS 12, tvOS 12, watchOS 4, and macOS 10.13

## [1.2.2](https://github.com/Pinterest/PINOperation/tree/1.2.2) (2022-11-28)

[Full Changelog](https://github.com/Pinterest/PINOperation/compare/1.2.1...1.2.2)


- Update CI to modern xcode and fix Carthage [\#47](https://github.com/pinterest/PINOperation/pull/47) ([garrettmoon](https://github.com/garrettmoon))
- Disable asserts in release builds when using Swift Package Manager [\#44](https://github.com/pinterest/PINOperation/pull/44) ([rcancro](https://github.com/rcancro))
- Carthage is busted on Xcode 12 [\#41](https://github.com/pinterest/PINOperation/pull/41) ([garrettmoon](https://github.com/garrettmoon))
- Latest release script [\#40](https://github.com/pinterest/PINOperation/pull/40) ([garrettmoon](https://github.com/garrettmoon))
- Fixes for automated release process [\#39](https://github.com/pinterest/PINOperation/pull/39) ([garrettmoon](https://github.com/garrettmoon))

## [1.2.1](https://github.com/Pinterest/PINOperation/tree/1.2.1) (2020-10-22)

[Full Changelog](https://github.com/Pinterest/PINOperation/compare/1.2...1.2.1)


- Add release script [\#38](https://github.com/pinterest/PINOperation/pull/38) ([garrettmoon](https://github.com/garrettmoon))
- Only use @import for SPM [\#36](https://github.com/pinterest/PINOperation/pull/36) ([garrettmoon](https://github.com/garrettmoon))
- Add SPM Test [\#35](https://github.com/pinterest/PINOperation/pull/35) ([garrettmoon](https://github.com/garrettmoon))
- Remove BUCK target [\#34](https://github.com/pinterest/PINOperation/pull/34) ([adlerj](https://github.com/adlerj))

## [1.2](https://github.com/Pinterest/PINOperation/tree/1.2) (2020-06-30)

[Full Changelog](https://github.com/Pinterest/PINOperation/compare/1.1.2...1.2)
Expand Down
Loading

0 comments on commit f9a71ff

Please sign in to comment.