Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
40c16ed
README and Xcode 26 Beta updates
AlexNachbaur Jun 30, 2025
0e14894
Minor update to the Samples README
AlexNachbaur Jun 30, 2025
6d4d429
Amend the Xcode 26 Beta workaround implementation
AlexNachbaur Jun 30, 2025
b8d42be
Update swift language version detection script
AlexNachbaur Jun 30, 2025
7f0f91d
Introduce debugging for selecting Swift 6.1
AlexNachbaur Jun 30, 2025
a434944
Debug missing Xcode 16.4
AlexNachbaur Jul 1, 2025
e5b8d36
Updates for github actions missing versions of Xcode
AlexNachbaur Jul 1, 2025
dd27036
Ensuring the proper runners are selected
AlexNachbaur Jul 2, 2025
af8642e
Reduce parallel iteration count for async tests to avoid flaky CI rac…
AlexNachbaur Jul 2, 2025
c10a846
Do not parallelize Swift tests, due to limited CI runner speed
AlexNachbaur Jul 2, 2025
59095ad
Resolve inadequate test timings for CI
AlexNachbaur Jul 2, 2025
97fd3f1
Resolve unit test URLResponse race conditions
AlexNachbaur Jul 2, 2025
3a86a69
More test expectation timeout corrections
AlexNachbaur Jul 2, 2025
c9bce2c
Ensure logs can be preserved from failed swift tests
AlexNachbaur Jul 2, 2025
d6076a8
Fix test request match
AlexNachbaur Jul 2, 2025
9de893f
Fix a collision in log output naming
AlexNachbaur Jul 3, 2025
1055ce6
Try to resolve concurrency tests, and improve build output logs
AlexNachbaur Jul 3, 2025
9fad7f6
Ensure xcbeautify is installed on Linux
AlexNachbaur Jul 3, 2025
856550d
Fix a syntax error in the setup-swift action
AlexNachbaur Jul 3, 2025
fa5804a
Ensure homebrew is in the path
AlexNachbaur Jul 3, 2025
4542ba1
Include homebrew path updates in Linux
AlexNachbaur Jul 3, 2025
0f14a0b
Update to the newer CircleCI runner for UI tests
AlexNachbaur Jul 4, 2025
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ executors:
apple-ci-arm-medium:
macos:
xcode: "16.2.0"
resource_class: macos.m1.medium.gen1
resource_class: m4pro.medium

commands:
prepare-ios-simulator:
Expand Down
18 changes: 17 additions & 1 deletion .github/actions/setup-swift/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ runs:
if: runner.os == 'macOS'
shell: bash
run: |
for xcode_version in $(yq ".swift[] | select(.version == \"${{ inputs.swift-version }}\") | .xcode_versions[]" "${{inputs.version-manifest}}"); do
for xcode_version in $(yq ".swift[] | select(.version == \"${{ inputs.swift-version }}\") | .xcode_versions[]" "${{inputs.version-manifest}}" | sort -r); do
developer_dir="/Applications/Xcode_${xcode_version}.app/Contents/Developer"
echo "Evaluating Xcode ${xcode_version} at \`${developer_dir}\`"
if [[ -d "$developer_dir" ]]; then
echo "Using Xcode ${xcode_version} for Swift ${{ inputs.swift-version }}"
echo "DEVELOPER_DIR=${developer_dir}" >> $GITHUB_ENV
echo "developer_dir=${developer_dir}" >> $GITHUB_OUTPUT
exit 0
Expand All @@ -31,6 +33,20 @@ runs:
if: steps.check_xcode_version.outputs.developer_dir == ''
with:
swift-version: ${{ inputs.swift-version }}
- name: Install Linux utilities
if: runner.os == 'Linux'
shell: bash
env:
HOMEBREW_NO_INSTALL_CLEANUP: YES
HOMEBREW_NO_ENV_HINTS: YES
run: |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
brew install xcbeautify
echo "HOMEBREW_PREFIX=${HOMEBREW_PREFIX}" >> $GITHUB_ENV
echo "HOMEBREW_CELLAR=${HOMEBREW_CELLAR}" >> $GITHUB_ENV
echo "HOMEBREW_REPOSITORY=${HOMEBREW_REPOSITORY}" >> $GITHUB_ENV
echo "${HOMEBREW_PREFIX}/bin" >> $GITHUB_PATH
echo "${HOMEBREW_PREFIX}/sbin" >> $GITHUB_PATH
- name: Get swift version
shell: bash
run: swift --version
4 changes: 4 additions & 0 deletions .github/actions/setup-swift/versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ swift:
- version: "6.1"
xcode_versions:
- "16.3"
- "16.4"
- version: "6.2"
xcode_versions:
- "26.0"
22 changes: 9 additions & 13 deletions .github/workflows/documentation-ghpages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,15 @@ on:
- '*'

env:
DEVELOPER_DIR: /Applications/Xcode_16.2.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_16.4.app/Contents/Developer
ENABLE_DOC_GENERATION: YES
DOCC_JSON_PRETTYPRINT: YES
NSUnbufferedIO: YES

# NOTE: The DocC `generate-documentation` plugin does not handle the
# hostingBasePath well. In particular, it doesn't properly handle
# multiple child paths. Furthermore, the current 1.0.0 version of
# the plugin doesn't handle updates to the index.html or *.js
# files.
#
# This workflow should be revisited once Xcode 14 GA is released
# so the newer DocC utilities can be utilized.
jobs:
ExportToGHPages:
name: Export to Github Pages
runs-on: macos-latest-large
runs-on: macos-15
steps:
- uses: actions/checkout@master
- name: Build Documentation
Expand All @@ -37,14 +31,13 @@ jobs:

TARGET_LIST=""

mkdir -p "docs/okta-mobile-swift/$VERSION"

echo "Initializing target list"
for TARGET in $(swift package describe --type json | jq ".products[].name" | sed -e 's/"//g'); do
echo "🎯 $TARGET"
NAME=$(echo "$TARGET" | tr '[:upper:]' '[:lower:]')
TARGET_LIST="$TARGET_LIST --target $TARGET"

mkdir -p "docs/okta-mobile-swift/$VERSION/$NAME"
echo "<html><head><meta http-equiv='refresh' content='0;url=/okta-mobile-swift/$VERSION/documentation/$NAME/'></head></html>" > "docs/okta-mobile-swift/$VERSION/$NAME/index.html"
done

echo
Expand All @@ -56,9 +49,12 @@ jobs:
--hosting-base-path "okta-mobile-swift/$VERSION" \
--output-path "docs/okta-mobile-swift/$VERSION" \
--include-extended-types \
--symbol-graph-minimum-access-level public \
--experimental-skip-synthesized-symbols \
--enable-experimental-combined-documentation \
--enable-experimental-mentioned-in \
--enable-experimental-external-link-support \
--enable-experimental-overloaded-symbol-presentation \
$TARGET_LIST
- name: Deploy documentation to Github Pages
uses: peaceiris/actions-gh-pages@v3
Expand Down
90 changes: 59 additions & 31 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ jobs:
name: Lint Sources
needs: Preflight
if: ${{ needs.Preflight.outputs.has_source_changes == 'true' }}
runs-on: macos-latest
runs-on: macos-15
steps:
- uses: actions/checkout@v2
- name: Setup Swift Lint
Expand All @@ -171,36 +171,57 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- macos-latest-large
- ubuntu-latest
swift_version: ["5.10", "6.0"]
exclude:
- os: ubuntu-latest
swift_version: "5.10"
include:
- swift_version: "5.10"
os: macos-14
- swift_version: "6.0"
os: macos-15
- swift_version: "6.1"
os: macos-15
- swift_version: "6.2"
os: macos-15
- swift_version: "6.0"
os: ubuntu-latest
env:
LOG_NAME: "${{github.job}}-${{ matrix.swift_version }}-${{ matrix.os }}"
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/setup-swift
with:
swift-version: "${{ matrix.swift_version }}"
- name: Setup environment
run: |
mkdir -p .build/ci-logs
echo "XCBEAUTIFY_ARGS=--renderer github-actions --disable-logging" >> $GITHUB_ENV
- name: Build
run: set -o pipefail && swift build --build-tests
run: |
set -o pipefail
swift build --build-tests --verbose 2>&1 | tee -a .build/ci-logs/${LOG_NAME}-build.log | xcbeautify $XCBEAUTIFY_ARGS
- name: Test
run: set -o pipefail && swift test --parallel
run: |
set -o pipefail
swift test --verbose 2>&1 | tee -a .build/ci-logs/${LOG_NAME}-test.log | xcbeautify $XCBEAUTIFY_ARGS
- name: Upload Logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: Logs-${{ env.LOG_NAME }}
path: |
.build/ci-logs/**

Cocoapods:
name: CocoaPods Build
needs:
- SwiftBuild
- XcodeBuild
if: ${{ !github.event.pull_request.draft && needs.Preflight.outputs.has_source_changes == 'true' }}
runs-on: macos-15-xlarge # Running on xlarge to use arm64 chipset
runs-on: macos-15
strategy:
matrix:
platform: [iOS, tvOS, watchOS, macOS, visionOS]
env:
DEVELOPER_DIR: /Applications/Xcode_16.2.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_16.4.app/Contents/Developer
timeout-minutes: 10
steps:
- uses: actions/checkout@master
Expand All @@ -221,22 +242,25 @@ jobs:
os: macos-14-large
- destination: "platform=iOS Simulator,OS=18.2,name=iPhone 16 Pro Max"
xcode_version: "16.2"
os: macos-15-large
- destination: "platform=tvOS Simulator,OS=18.2,name=Apple TV"
xcode_version: "16.2"
os: macos-15-large
os: macos-15
- destination: "platform=iOS Simulator,OS=18.5,name=iPhone 16 Pro Max"
xcode_version: "16.4"
os: macos-15
- destination: "platform=tvOS Simulator,OS=18.5,name=Apple TV"
xcode_version: "16.4"
os: macos-15
- destination: "platform=visionOS Simulator,OS=1.0,name=Apple Vision Pro"
xcode_version: "15.4"
os: macos-14-xlarge
- destination: "platform=visionOS Simulator,OS=2.2,name=Apple Vision Pro"
xcode_version: "16.2"
os: macos-15-xlarge
- destination: "platform=watchOS Simulator,OS=11.1,name=Apple Watch Series 10 (46mm)"
xcode_version: "16.2"
os: macos-15-large
os: macos-14
- destination: "platform=visionOS Simulator,OS=2.5,name=Apple Vision Pro"
xcode_version: "16.4"
os: macos-15
- destination: "platform=watchOS Simulator,OS=11.5,name=Apple Watch Series 10 (46mm)"
xcode_version: "16.4"
os: macos-15
- destination: "platform=macOS,name=My Mac"
xcode_version: "16.2"
os: macos-15-large
xcode_version: "16.4"
os: macos-15
runs-on: ${{ matrix.os }}
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app/Contents/Developer
Expand All @@ -254,9 +278,9 @@ jobs:
XCODE_MAJOR_VERSION=$(echo "${{ matrix.xcode_version }}" | cut -d'.' -f1)
if [[ "$XCODE_MAJOR_VERSION" -lt 16 ]]; then
echo "Xcode version is < 16. Filtering noisy warnings from xcbeautify output."
echo "XCBEAUTIFY_ARGS=--renderer github-actions --quieter" >> $GITHUB_ENV
echo "XCBEAUTIFY_ARGS=--renderer github-actions --quieter --disable-logging" >> $GITHUB_ENV
else
echo "XCBEAUTIFY_ARGS=--renderer github-actions" >> $GITHUB_ENV
echo "XCBEAUTIFY_ARGS=--renderer github-actions --disable-logging" >> $GITHUB_ENV
fi
- name: Build AuthFoundation
run: |
Expand Down Expand Up @@ -339,7 +363,7 @@ jobs:
if: failure()
uses: actions/upload-artifact@v4
with:
name: Logs
name: Logs-${{ env.LOG_NAME }}
path: |
.build/ci-logs/**
.build/DerivedData/Logs/
Expand All @@ -348,17 +372,18 @@ jobs:
name: Build Documentation Archives
needs: SwiftLint
if: ${{ !github.event.pull_request.draft && needs.Preflight.outputs.has_documentation_changes == 'true' }}
runs-on: macos-latest
runs-on: macos-15
env:
DEVELOPER_DIR: /Applications/Xcode_16.2.app/Contents/Developer
ENABLE_DOC_GENERATION: YES
DOCC_JSON_PRETTYPRINT: YES
DEVELOPER_DIR: /Applications/Xcode_16.4.app/Contents/Developer
DESTINATION: "${{ matrix.destination }}"
LOG_NAME: "${{github.job}}-${{ matrix.xcode_version }}-${{ matrix.destination }}"
NSUnbufferedIO: YES
steps:
- uses: actions/checkout@master
- name: Swift Package Documentation lint
run: |
export DOCC_JSON_PRETTYPRINT=YES
mkdir -p ~/Build/Docs

TARGET_LIST=""
Expand All @@ -372,9 +397,12 @@ jobs:
--disable-indexing \
--output-path ~/Build/Docs \
--include-extended-types \
--symbol-graph-minimum-access-level public \
--experimental-skip-synthesized-symbols \
--enable-experimental-combined-documentation \
--enable-experimental-mentioned-in \
--enable-experimental-external-link-support \
--enable-experimental-overloaded-symbol-presentation \
--analyze \
--emit-fixits \
$TARGET_LIST | ./.github/workflows/swift-log-renderer.sh
20 changes: 1 addition & 19 deletions OktaClient.xcworkspace/xcshareddata/swiftpm/Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// swift-tools-version:6.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

import Foundation
import PackageDescription

let strictConcurrencyEnabled = true
Expand Down Expand Up @@ -43,9 +44,6 @@ var package = Package(
.library(name: "OktaDirectAuth", targets: ["OktaDirectAuth"]),
.library(name: "OktaIdxAuth", targets: ["OktaIdxAuth"])
],
dependencies: [
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.4.0")
],
targets: [
.target(name: "AuthFoundation",
dependencies: [],
Expand Down Expand Up @@ -114,3 +112,8 @@ package.products.append(
.library(name: "BrowserSignin", targets: ["BrowserSignin"])
)
#endif

if ProcessInfo.processInfo.environment["ENABLE_DOC_GENERATION"] != nil {
package.dependencies.append(.package(url: "https://github.com/apple/swift-docc-plugin",
from: "1.4.0"))
}
6 changes: 6 additions & 0 deletions Package@swift-5.10.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// swift-tools-version:5.10
// The swift-tools-version declares the minimum version of Swift required to build this package.

import Foundation
import PackageDescription

let strictConcurrencyEnabled = true
Expand Down Expand Up @@ -121,3 +122,8 @@ package.products.append(
.library(name: "BrowserSignin", targets: ["BrowserSignin"])
)
#endif

if ProcessInfo.processInfo.environment["ENABLE_DOC_GENERATION"] != nil {
package.dependencies.append(.package(url: "https://github.com/apple/swift-docc-plugin",
from: "1.4.0"))
}
Loading
Loading