-
Notifications
You must be signed in to change notification settings - Fork 0
Upgrade everything to Swift 5.9 and Sendable correctness, use SwiftHTTPTypes #10
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
82263e3
Upgrade everything to Swift 5.9 and Sendable correctness, also use Sw…
gwynne 2e1b4ea
Update CI
gwynne 444d93d
Fix Linux build and address remaining warnings
gwynne 5d323a1
[skip ci] CI tweak
gwynne 259b7af
Address PR feedback by removing BackgroundTaskHandler entirely.
gwynne 960d7ee
Enable some more Swift features and update code accordingly. Heavily …
gwynne ddf0b57
Fix CI, don't have access to the preinstalled Linuxbrew inside a cont…
gwynne 64c0c9a
Fix another Sendable warning that only appears on Linux for some reason
gwynne 0b238f4
Fix simulator names, it'd be really nice if xcodebuild didn't just ru…
gwynne c247c43
Create dependabot.yml
gwynne b69ef2c
Add code coverage uploads, CodeQL scanning, and dependency graph subm…
gwynne d7bb577
Good eye, Thomas
gwynne 0647567
Sigh, the xcodebuild docs can't make up their mind, is it a directory…
gwynne 8c3c213
Mmm, ci
gwynne File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,83 @@ | ||
name: test | ||
name: Tests | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
pull_request: { types: [opened, reopened, synchronize, ready_for_review] } | ||
push: { branches: [ main ] } | ||
env: | ||
LOG_LEVEL: info | ||
|
||
jobs: | ||
appleos: | ||
if: ${{ !(github.event.pull_request.draft || false) }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
xcode: | ||
- latest | ||
#- latest-stable | ||
destination: | ||
- 'platform=macOS,arch=x86_64' | ||
#- 'platform=macOS,arch=arm64' | ||
- 'platform=iOS Simulator,OS=latest,name=iPhone 15 Pro' | ||
- 'platform=tvOS Simulator,OS=latest,name=Apple TV 4K' | ||
- 'platform=watchOS Simulator,OS=latest,name=Apple Watch Series 9 - 45mm' | ||
platform: | ||
- 'macOS' | ||
- 'iOS Simulator' | ||
- 'tvOS Simulator' | ||
- 'watchOS Simulator' | ||
include: | ||
- platform: 'macOS' | ||
destination: 'arch=x86_64' | ||
- platform: 'iOS Simulator' | ||
destination: 'OS=latest,name=iPhone 15 Pro' | ||
- platform: 'tvOS Simulator' | ||
destination: 'OS=latest,name=Apple TV 4K (3rd generation)' | ||
- platform: 'watchOS Simulator' | ||
destination: 'OS=latest,name=Apple Watch Series 9 (45mm)' | ||
name: ${{ matrix.platform }} Tests | ||
runs-on: macos-13 | ||
steps: | ||
- name: Select latest available Xcode | ||
uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: ${{ matrix.xcode }} | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Run tests for ${{ matrix.destination }} | ||
run: | | ||
xcodebuild test -scheme StructuredAPIClient-Package \ | ||
-enableThreadSanitizer YES \ | ||
-destination '${{ matrix.destination }}' | ||
- name: Select latest available Xcode | ||
uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: ${{ matrix.xcode }} | ||
- name: Install xcbeautify | ||
run: brew install xcbeautify | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Run tests | ||
env: | ||
DESTINATION: ${{ format('platform={0},{1}', matrix.platform, matrix.destination) }} | ||
run: | | ||
set -o pipefail && \ | ||
xcodebuild test -scheme StructuredAPIClient-Package \ | ||
-enableThreadSanitizer YES \ | ||
-enableCodeCoverage YES \ | ||
-disablePackageRepositoryCache \ | ||
-destination "${DESTINATION}" | | ||
xcbeautify --is-ci --quiet --renderer github-actions | ||
|
||
linux: | ||
runs-on: ubuntu-latest | ||
if: ${{ !(github.event.pull_request.draft || false) }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ver: | ||
swift-image: | ||
- swift:5.9-jammy | ||
- swiftlang/swift:nightly-5.10-jammy | ||
- swiftlang/swift:nightly-main-jammy | ||
container: | ||
image: ${{ matrix.ver }} | ||
name: Linux ${{ matrix.swift-image }} Tests | ||
runs-on: ubuntu-latest | ||
container: ${{ matrix.swift-image }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Run tests for ${{ matrix.ver }} | ||
run: swift test --sanitize=thread | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Install xcbeautify | ||
run: | | ||
DEBIAN_FRONTEND=noninteractive apt-get update | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y xz-utils curl | ||
curl -fsSLO 'https://github.com/tuist/xcbeautify/releases/download/1.0.1/xcbeautify-1.0.1-x86_64-unknown-linux-gnu.tar.xz' | ||
tar -x -J -f xcbeautify-1.0.1-x86_64-unknown-linux-gnu.tar.xz | ||
- name: Run tests | ||
shell: bash | ||
run: | | ||
set -o pipefail && \ | ||
swift test --sanitize=thread --enable-code-coverage | | ||
./xcbeautify --is-ci --quiet --renderer github-actions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 0 additions & 72 deletions
72
Sources/StructuredAPIClient/Handlers/BackgroundTaskHandler.swift
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does 5.9 even support 18.04? It's EOL so you should probably raise it to 20.04
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch, you're right, 5.9 only goes back to focal.