Skip to content
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

Modernize the CI settings #216

Merged
merged 7 commits into from
Oct 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
24 changes: 12 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ on: [push, pull_request]
jobs:
test_sdk:
name: Test LINE SDK
runs-on: macos-13
runs-on: macos-14
strategy:
matrix:
swift-version: ["5.0", "4.2"]
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
Expand All @@ -27,13 +27,13 @@ jobs:
run: bundle exec fastlane sdk_tests
lint_pod:
name: Lint CocoaPods
runs-on: macos-13
runs-on: macos-14
strategy:
matrix:
swift-version: ["5.0", "4.2"]
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
Expand All @@ -49,10 +49,10 @@ jobs:
run: bundle exec fastlane lint_pod
lint_spm:
name: Lint Swift Package Manager
runs-on: macos-13
runs-on: macos-14
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
Expand All @@ -66,10 +66,10 @@ jobs:
run: bundle exec fastlane lint_spm
xcframework:
name: Build XCFramework
runs-on: macos-13
runs-on: macos-14
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
Expand Down
50 changes: 27 additions & 23 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ GEM
base64
nkf
rexml
activesupport (7.2.1)
activesupport (7.2.1.2)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
Expand All @@ -24,29 +24,29 @@ GEM
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.979.0)
aws-sdk-core (3.209.1)
aws-partitions (1.998.0)
aws-sdk-core (3.211.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.94.0)
aws-sdk-core (~> 3, >= 3.207.0)
aws-sdk-kms (1.95.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.166.0)
aws-sdk-core (~> 3, >= 3.207.0)
aws-sdk-s3 (1.169.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.10.0)
aws-sigv4 (1.10.1)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
base64 (0.2.0)
bigdecimal (3.1.8)
claide (1.1.0)
cocoapods (1.15.2)
cocoapods (1.16.1)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.15.2)
cocoapods-core (= 1.16.1)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 2.1, < 3.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
Expand All @@ -60,8 +60,8 @@ GEM
molinillo (~> 0.8.0)
nap (~> 1.0)
ruby-macho (>= 2.3.0, < 3.0)
xcodeproj (>= 1.23.0, < 2.0)
cocoapods-core (1.15.2)
xcodeproj (>= 1.26.0, < 2.0)
cocoapods-core (1.16.1)
activesupport (>= 5.0, < 8)
addressable (~> 2.8)
algoliasearch (~> 1.0)
Expand Down Expand Up @@ -96,7 +96,7 @@ GEM
escape (0.0.4)
ethon (0.16.0)
ffi (>= 1.15.0)
excon (0.111.0)
excon (0.112.0)
faraday (1.10.4)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
Expand Down Expand Up @@ -126,7 +126,7 @@ GEM
faraday_middleware (1.2.1)
faraday (~> 1.0)
fastimage (2.3.1)
fastlane (2.222.0)
fastlane (2.225.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
Expand All @@ -142,6 +142,7 @@ GEM
faraday-cookie_jar (~> 0.0.6)
faraday_middleware (~> 1.0)
fastimage (>= 2.1.0, < 3.0.0)
fastlane-sirp (>= 1.0.0)
gh_inspector (>= 1.1.2, < 2.0.0)
google-apis-androidpublisher_v3 (~> 0.3)
google-apis-playcustomapp_v1 (~> 0.1)
Expand Down Expand Up @@ -169,6 +170,8 @@ GEM
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
fastlane-plugin-changelog (0.16.0)
fastlane-plugin-create_xcframework (1.1.2)
fastlane-sirp (1.0.0)
sysrandom (~> 1.0)
ffi (1.17.0-arm64-darwin)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
Expand Down Expand Up @@ -215,7 +218,7 @@ GEM
httpclient (2.8.3)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
jazzy (0.15.2)
jazzy (0.15.3)
cocoapods (~> 1.5)
mustache (~> 1.1)
open4 (~> 1.3)
Expand All @@ -226,8 +229,8 @@ GEM
sqlite3 (~> 1.3)
xcinvoke (~> 0.3.0)
jmespath (1.6.2)
json (2.7.2)
jwt (2.9.1)
json (2.7.4)
jwt (2.9.3)
base64
liferaft (0.0.6)
logger (1.6.1)
Expand All @@ -238,7 +241,7 @@ GEM
multi_json (1.15.0)
multipart-post (2.4.1)
mustache (1.1.1)
nanaimo (0.3.0)
nanaimo (0.4.0)
nap (1.1.0)
naturally (2.2.1)
netrc (0.11.0)
Expand All @@ -255,7 +258,7 @@ GEM
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rexml (3.3.7)
rexml (3.3.9)
rouge (2.0.7)
ruby-macho (2.5.1)
ruby2_keywords (0.0.5)
Expand All @@ -273,6 +276,7 @@ GEM
CFPropertyList
naturally
sqlite3 (1.7.3-arm64-darwin)
sysrandom (1.0.5)
terminal-notifier (2.0.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
Expand All @@ -293,13 +297,13 @@ GEM
xcode-install (2.8.1)
claide (>= 0.9.1)
fastlane (>= 2.1.0, < 3.0.0)
xcodeproj (1.25.0)
xcodeproj (1.26.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (>= 3.3.2, < 4.0)
nanaimo (~> 0.4.0)
rexml (>= 3.3.6, < 4.0)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.1)
Expand Down
30 changes: 15 additions & 15 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ platform :ios do

before_all do
begin
xcversion(version: "~> 15.0")
xcodes(version: "16.0", select_for_current_build_only: true)
rescue => ex
UI.error("Failed when switching to Xcode version: #{ex}")
end
Expand All @@ -24,14 +24,14 @@ platform :ios do
swift_version = ENV["SWIFT_VERSION"] || "4.2"
run_tests(
workspace: "LineSDK.xcworkspace",
devices: ["iPhone 14"],
devices: ["iPhone 16"],
scheme: "LineSDK",
xcargs: "SWIFT_VERSION=#{swift_version}"
)

run_tests(
workspace: "LineSDK.xcworkspace",
devices: ["iPhone 14"],
devices: ["iPhone 16"],
scheme: "LineSDKObjC",
xcargs: "SWIFT_VERSION=#{swift_version}"
)
Expand All @@ -40,15 +40,14 @@ platform :ios do
lane :sample_tests do
run_tests(
workspace: "LineSDK.xcworkspace",
devices: ["iPhone 14"],
devices: ["iPhone 16"],
scheme: "LineSDKSample"
)
end

desc "Lint to check dependency manager compatibility."
lane :lint do
# Disable spm lint since it's not working properly under Xcode 15.0 for UIKit.
# lint_spm
lint_spm
lint_pod
end

Expand All @@ -58,10 +57,16 @@ platform :ios do
end

lane :lint_spm do
# swift build seems not properly working under Xcode 15.0 since the `-isysroot` is always set to macOS SDK.
# Use Xcode 14 to lint spm for a while.
xcversion(version: "~> 14.0")
sh('swift build -Xswiftc "-sdk" -Xswiftc "`xcrun --sdk iphonesimulator --show-sdk-path`" -Xswiftc "-target" -Xswiftc "arm64-apple-ios16.4-simulator"')
sdk_path = `xcrun --sdk iphonesimulator --show-sdk-path`.strip
swiftc_flags = [
"-sdk", sdk_path,
"-target", "arm64-apple-ios18.0-simulator"
].map { |flag| "-Xswiftc #{flag}" }
cc_flags = [
"-isysroot", sdk_path
].map { |flag| "-Xcc #{flag}" }

sh("swift build #{swiftc_flags.join(' ')} #{cc_flags.join(' ')}")
end

desc "Release a new version."
Expand Down Expand Up @@ -126,11 +131,6 @@ platform :ios do
stamp_changelog(section_identifier: target_version, git_tag: target_version, stamp_datetime_format: "%F")
end

lane :ensure_latest_carthage do
Actions.sh("brew update")
Actions.sh("brew outdated carthage || brew upgrade carthage")
end

lane :bump_constant_version do |options|
target_version = options[:version]
replacing = "public static let SDKVersion = \"#{target_version}\""
Expand Down