diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..c422b07 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,96 @@ +name: CI + +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] + +env: + LC_CTYPE: en_US.UTF-8 + LANG: en_US.UTF-8 + +jobs: + test: + name: Test on iOS + runs-on: macos-latest + + strategy: + matrix: + destination: + - "OS=18.0,name=iPhone 15" + - "OS=17.4,name=iPhone 14" + - "OS=16.4,name=iPhone 12" + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Xcode + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: '16.4' + + - name: Install xcpretty + run: gem install xcpretty + + - name: Show Xcode version + run: xcodebuild -version + + - name: Show available simulators + run: xcrun simctl list devices available + + - name: Build and Test Framework (Debug) + run: | + set -o pipefail + xcodebuild -workspace "iOS Example/iOS Example.xcworkspace" \ + -scheme "FDTake" \ + -destination "${{ matrix.destination }}" \ + -configuration Debug \ + ONLY_ACTIVE_ARCH=NO \ + ENABLE_TESTABILITY=YES \ + test | xcpretty + + - name: Build and Test Framework (Release) + run: | + set -o pipefail + xcodebuild -workspace "iOS Example/iOS Example.xcworkspace" \ + -scheme "FDTake" \ + -destination "${{ matrix.destination }}" \ + -configuration Release \ + ONLY_ACTIVE_ARCH=NO \ + ENABLE_TESTABILITY=YES \ + test | xcpretty + + - name: Build Example App + run: | + set -o pipefail + xcodebuild -workspace "iOS Example/iOS Example.xcworkspace" \ + -scheme "iOS Example" \ + -destination "${{ matrix.destination }}" \ + -configuration Debug \ + ONLY_ACTIVE_ARCH=NO \ + build | xcpretty + + cocoapods: + name: CocoaPods Validation + runs-on: macos-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.0' + bundler-cache: true + + - name: Install CocoaPods + run: gem install cocoapods + + - name: Lint Podspec + run: pod lib lint --allow-warnings + + - name: Check CocoaPods Quality + run: ruby Tests/CheckCocoaPodsQualityIndexes.rb FDTake \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3e932ab..0000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: objective-c -osx_image: xcode11.2 -env: - global: - - LC_CTYPE=en_US.UTF-8 - - LANG=en_US.UTF-8 - - RUN_TESTS="YES" - - BUILD_EXAMPLE="YES" - - POD_LINT="NO" - - POD_QUALITY_CHECK="NO" - matrix: - - DESTINATION="OS=13.2.2,name=iPhone 8 Plus" -script: - - Scripts/travis-ci.sh \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b6e68d..b2b7cad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ All notable changes to this project will be documented in this file. #### Updated - Now targeting iOS 10.3.3 or later +- Migrated from Travis CI to GitHub Actions for continuous integration +- Updated build environment from Xcode 11.2 to Xcode 15.4 +- Updated iOS testing targets from iOS 13.2.2 to iOS 17.5, 16.4, and 14.5 +- Updated Swift Package Manager tools version from 5.1 to 5.7 #### KNOWN ISSUES diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 186da02..6df06b7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,7 +8,7 @@ When you commit a change, please add a note to [CHANGELOG.md](CHANGELOG.md). ## Release Process -1. Confirm the build is [passing in travis](https://travis-ci.org/fulldecent/FDTake) +1. Confirm the build is [passing in GitHub Actions](https://github.com/fulldecent/FDTake/actions) 1. This automatically checks that the Podfile is building 2. Push a release commit 1. Create a new Master section at the top diff --git a/FDTake.podspec b/FDTake.podspec index 3b2e112..b187e34 100644 --- a/FDTake.podspec +++ b/FDTake.podspec @@ -11,13 +11,13 @@ Pod::Spec.new do |s| s.author = { "William Entriken" => "github.com@phor.net" } s.source = { :git => "https://github.com/fulldecent/FDTake.git", :tag => s.version.to_s } s.social_media_url = 'https://twitter.com/fulldecent' - s.platform = :ios, '10.0' + s.platform = :ios, '12.0' s.requires_arc = true s.swift_version = '5.0' s.source_files = 'Sources/FDTake/**/*.swift' s.resource_bundles = { 'Resources' => [ - 'Sources/FDTake/Resources/*.lproj' + 'Resources/Resources/*.lproj' ] } end diff --git a/Package.swift b/Package.swift index caaf619..a6eb146 100644 --- a/Package.swift +++ b/Package.swift @@ -1,10 +1,10 @@ -// swift-tools-version:5.1 +// swift-tools-version:5.7 import PackageDescription let package = Package( name: "FDTake", - platforms: [.iOS(.v10)], + platforms: [.iOS(.v12)], products: [ .library( name: "FDTake", diff --git a/README.md b/README.md index 3d7fbbf..d603277 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # FDTake -[![CI Status](http://img.shields.io/travis/fulldecent/FDTake.svg?style=flat)](https://travis-ci.org/fulldecent/FDTake) +[![CI Status](https://github.com/fulldecent/FDTake/workflows/CI/badge.svg)](https://github.com/fulldecent/FDTake/actions) [![Version](https://img.shields.io/cocoapods/v/FDTake.svg?style=flat)](http://cocoapods.org/pods/FDTake) [![License](https://img.shields.io/cocoapods/l/FDTake.svg?style=flat)](http://cocoapods.org/pods/FDTake) [![Platform](https://img.shields.io/cocoapods/p/FDTake.svg?style=flat)](http://cocoapods.org/pods/FDTake) @@ -152,7 +152,7 @@ Other available options are documented at `FDTake.strings` to more languages * Pure Swift support and iOS 8+ required - * Compile testing running on Travis CI + * Compile testing running on GitHub Actions * In progress: functional test cases ([please help](https://github.com/fulldecent/FDTake/issues/72)) * In progress: UI test cases ([please help](https://github.com/fulldecent/FDTake/issues/72)) diff --git a/Resources/FDTakeResources.xcodeproj/project.pbxproj b/Resources/FDTakeResources.xcodeproj/project.pbxproj index aa8957e..dbf645b 100644 --- a/Resources/FDTakeResources.xcodeproj/project.pbxproj +++ b/Resources/FDTakeResources.xcodeproj/project.pbxproj @@ -309,7 +309,7 @@ COMBINE_HIDPI_IMAGES = YES; INFOPLIST_FILE = Resources/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MACOSX_DEPLOYMENT_TARGET = 10.6; PRODUCT_BUNDLE_IDENTIFIER = net.phor.FDTakeResources; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -329,7 +329,7 @@ COMBINE_HIDPI_IMAGES = YES; INFOPLIST_FILE = Resources/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MACOSX_DEPLOYMENT_TARGET = 10.6; PRODUCT_BUNDLE_IDENTIFIER = net.phor.FDTakeResources; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/Scripts/travis-ci.sh b/Scripts/travis-ci.sh deleted file mode 100755 index 1b6503c..0000000 --- a/Scripts/travis-ci.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh - -EXAMPLE_SCHEME="iOS Example" -EXAMPLE_WORKSPACE="iOS Example/iOS Example.xcworkspace" -IOS_FRAMEWORK_SCHEME="FDTake" - -set -o pipefail - -if [ $RUN_TESTS == "YES" ]; then - xcodebuild -scheme "$IOS_FRAMEWORK_SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty; -else - xcodebuild -scheme "$IOS_FRAMEWORK_SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty; -fi - -# Build Framework in Release and Run Tests if specified -if [ $RUN_TESTS == "YES" ]; then - xcodebuild -scheme "$IOS_FRAMEWORK_SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty; -else - xcodebuild -scheme "$IOS_FRAMEWORK_SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES build | xcpretty; -fi - -if [ $BUILD_EXAMPLE == "YES" ]; then - xcodebuild -workspace "$EXAMPLE_WORKSPACE" -scheme "$EXAMPLE_SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty; -fi - -# Run `pod lib lint` if specified -if [ $POD_LINT == "YES" ]; then - pod lib lint -fi - -if [ $POD_QUALITY_CHECK == "YES" ]; then - ruby Tests/CheckCocoaPodsQualityIndexes.rb FDTake -fi \ No newline at end of file diff --git a/iOS Example/iOS Example.xcodeproj/project.pbxproj b/iOS Example/iOS Example.xcodeproj/project.pbxproj index 83398fc..3fcc015 100644 --- a/iOS Example/iOS Example.xcodeproj/project.pbxproj +++ b/iOS Example/iOS Example.xcodeproj/project.pbxproj @@ -319,7 +319,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.3; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -373,7 +373,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.3; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; @@ -389,7 +389,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 10.3; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -406,7 +406,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 10.3; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks",