feat: Support RPCv2 CBOR wire protocol #4251
This file contains 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
name: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
workflow_dispatch: | |
env: | |
AWS_SWIFT_SDK_USE_LOCAL_DEPS: 1 | |
jobs: | |
apple-ci: | |
if: github.repository == 'smithy-lang/smithy-swift' || github.event_name == 'pull_request' | |
runs-on: ${{ matrix.runner }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# This matrix runs tests on iOS sim & Mac, on oldest & newest supported Xcodes | |
runner: | |
- macos-14 | |
- macos-15 | |
xcode: | |
- Xcode_15.2 | |
- Xcode_16.1 | |
destination: | |
- 'platform=iOS Simulator,OS=17.2,name=iPhone 15' | |
- 'platform=iOS Simulator,OS=18.1,name=iPhone 16' | |
- 'platform=tvOS Simulator,OS=17.2,name=Apple TV 4K (3rd generation) (at 1080p)' | |
- 'platform=tvOS Simulator,OS=18.1,name=Apple TV 4K (3rd generation) (at 1080p)' | |
- 'platform=visionOS Simulator,OS=1.0,name=Apple Vision Pro' | |
- 'platform=visionOS Simulator,OS=2.1,name=Apple Vision Pro' | |
- 'platform=macOS' | |
exclude: | |
# Don't run old macOS with new Xcode | |
- runner: macos-14 | |
xcode: Xcode_16.1 | |
# Don't run new macOS with old Xcode | |
- runner: macos-15 | |
xcode: Xcode_15.2 | |
# Don't run old simulators with new Xcode | |
- destination: 'platform=tvOS Simulator,OS=17.2,name=Apple TV 4K (3rd generation) (at 1080p)' | |
xcode: Xcode_16.1 | |
- destination: 'platform=iOS Simulator,OS=17.2,name=iPhone 15' | |
xcode: Xcode_16.1 | |
- destination: 'platform=visionOS Simulator,OS=1.0,name=Apple Vision Pro' | |
xcode: Xcode_16.1 | |
# Don't run new simulators with old Xcode | |
- destination: 'platform=tvOS Simulator,OS=18.1,name=Apple TV 4K (3rd generation) (at 1080p)' | |
xcode: Xcode_15.2 | |
- destination: 'platform=iOS Simulator,OS=18.1,name=iPhone 16' | |
xcode: Xcode_15.2 | |
- destination: 'platform=visionOS Simulator,OS=2.1,name=Apple Vision Pro' | |
xcode: Xcode_15.2 | |
steps: | |
- name: Configure Xcode | |
run: | | |
sudo xcode-select -s /Applications/${{ matrix.xcode }}.app | |
xcode-select -p | |
- name: Install visionOS sim if needed | |
if: ${{ contains(matrix.destination, 'platform=visionOS') }} | |
run: | | |
sudo xcodebuild -runFirstLaunch | |
sudo xcrun simctl list | |
sudo xcodebuild -downloadPlatform visionOS | |
sudo xcodebuild -runFirstLaunch | |
- name: Checkout smithy-swift | |
uses: actions/checkout@v4 | |
- name: Setup common tools | |
uses: ./.github/actions/setup-common-tools-composite-action | |
- name: Build & Run smithy-swift Kotlin Unit Tests | |
run: ./gradlew build | |
- name: Build & Run smithy-swift Swift Unit Tests | |
timeout-minutes: 15 | |
run: | | |
set -o pipefail && \ | |
NSUnbufferedIO=YES xcodebuild \ | |
-scheme smithy-swift-Package \ | |
-destination '${{ matrix.destination }}' \ | |
test 2>&1 \ | |
| xcbeautify | |
apple-downstream: | |
if: github.repository == 'smithy-lang/smithy-swift' || github.event_name == 'pull_request' | |
runs-on: ${{ matrix.runner }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# This matrix runs tests on iOS sim & Mac, on oldest & newest supported Xcodes | |
runner: | |
- macos-14 | |
- macos-15 | |
xcode: | |
- Xcode_15.2 | |
- Xcode_16.1 | |
destination: | |
- 'platform=iOS Simulator,OS=17.2,name=iPhone 15' | |
- 'platform=iOS Simulator,OS=18.1,name=iPhone 16' | |
- 'platform=tvOS Simulator,OS=17.2,name=Apple TV 4K (3rd generation) (at 1080p)' | |
- 'platform=tvOS Simulator,OS=18.1,name=Apple TV 4K (3rd generation) (at 1080p)' | |
- 'platform=visionOS Simulator,OS=1.0,name=Apple Vision Pro' | |
- 'platform=visionOS Simulator,OS=2.1,name=Apple Vision Pro' | |
- 'platform=macOS' | |
exclude: | |
# Don't run old macOS with new Xcode | |
- runner: macos-14 | |
xcode: Xcode_16.1 | |
# Don't run new macOS with old Xcode | |
- runner: macos-15 | |
xcode: Xcode_15.2 | |
# Don't run old simulators with new Xcode | |
- destination: 'platform=tvOS Simulator,OS=17.2,name=Apple TV 4K (3rd generation) (at 1080p)' | |
xcode: Xcode_16.1 | |
- destination: 'platform=iOS Simulator,OS=17.2,name=iPhone 15' | |
xcode: Xcode_16.1 | |
- destination: 'platform=visionOS Simulator,OS=1.0,name=Apple Vision Pro' | |
xcode: Xcode_16.1 | |
# Don't run new simulators with old Xcode | |
- destination: 'platform=tvOS Simulator,OS=18.1,name=Apple TV 4K (3rd generation) (at 1080p)' | |
xcode: Xcode_15.2 | |
- destination: 'platform=iOS Simulator,OS=18.1,name=iPhone 16' | |
xcode: Xcode_15.2 | |
- destination: 'platform=visionOS Simulator,OS=2.1,name=Apple Vision Pro' | |
xcode: Xcode_15.2 | |
steps: | |
- name: Configure Xcode | |
run: | | |
sudo xcode-select -s /Applications/${{ matrix.xcode }}.app | |
xcode-select -p | |
- name: Install visionOS sim if needed | |
if: ${{ contains(matrix.destination, 'platform=visionOS') }} | |
run: | | |
sudo xcodebuild -runFirstLaunch | |
sudo xcrun simctl list | |
sudo xcodebuild -downloadPlatform visionOS | |
sudo xcodebuild -runFirstLaunch | |
- name: Checkout smithy-swift | |
uses: actions/checkout@v4 | |
with: | |
path: smithy-swift | |
- name: Checkout aws-sdk-swift with composite action | |
uses: ./smithy-swift/.github/actions/checkout-aws-sdk-swift-composite-action | |
with: | |
AUTOMATION_USER_SSH_PRIVATE_KEY: ${{ secrets.AUTOMATION_USER_SSH_PRIVATE_KEY }} | |
STAGING_PARTNER_REPO: ${{ secrets.STAGING_PARTNER_REPO }} | |
- name: Setup common tools | |
uses: ./smithy-swift/.github/actions/setup-common-tools-composite-action | |
- name: Tools Versions | |
run: ./aws-sdk-swift/scripts/ci_steps/log_tool_versions.sh | |
- name: Prepare aws-sdk-swift Protocol & Unit Tests | |
run: | | |
cd aws-sdk-swift | |
./scripts/ci_steps/prepare_protocol_and_unit_tests.sh | |
- name: Build and Run aws-sdk-swift Unit Tests | |
run: | | |
cd aws-sdk-swift | |
set -o pipefail && \ | |
NSUnbufferedIO=YES xcodebuild \ | |
-scheme aws-sdk-swift-Package \ | |
-destination '${{ matrix.destination }}' \ | |
test 2>&1 \ | |
| xcbeautify | |
- name: Build and Run aws-sdk-swift Protocol Tests | |
run: | | |
cd aws-sdk-swift/codegen | |
set -o pipefail && \ | |
NSUnbufferedIO=YES xcodebuild \ | |
-scheme aws-sdk-swift-protocol-tests-Package \ | |
-destination '${{ matrix.destination }}' \ | |
test 2>&1 \ | |
| xcbeautify | |
linux-ci: | |
if: github.repository == 'smithy-lang/smithy-swift' || github.event_name == 'pull_request' | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
swift: | |
- 5.9-focal | |
- 6.0-jammy | |
container: | |
image: swift:${{ matrix.swift }} | |
env: | |
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true | |
steps: | |
- name: Checkout smithy-swift | |
uses: actions/checkout@v4 | |
- name: Install openssl | |
run: | | |
if [ -x "$(command -v apt)" ]; then | |
apt-get update && apt-get install -y libssl-dev | |
else | |
yum install -y openssl-devel which | |
fi | |
- name: Setup common tools | |
uses: ./.github/actions/setup-common-tools-composite-action | |
- name: Build & Run Kotlin Unit Tests | |
run: ./gradlew build | |
- name: Build & Run Swift Unit Tests | |
run: swift test | |
linux-downstream: | |
if: github.repository == 'smithy-lang/smithy-swift' || github.event_name == 'pull_request' | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
swift: | |
- 5.9-focal | |
- 6.0-jammy | |
container: | |
image: swift:${{ matrix.swift }} | |
env: | |
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true | |
steps: | |
- name: Install openssl | |
run: | | |
if [ -x "$(command -v apt)" ]; then | |
apt-get update && apt-get install -y libssl-dev | |
else | |
yum install -y openssl-devel which | |
fi | |
- name: Checkout smithy-swift | |
uses: actions/checkout@v4 | |
with: | |
path: smithy-swift | |
- name: Checkout aws-sdk-swift with composite action | |
uses: ./smithy-swift/.github/actions/checkout-aws-sdk-swift-composite-action | |
with: | |
AUTOMATION_USER_SSH_PRIVATE_KEY: ${{ secrets.AUTOMATION_USER_SSH_PRIVATE_KEY }} | |
STAGING_PARTNER_REPO: ${{ secrets.STAGING_PARTNER_REPO }} | |
- name: Setup common tools | |
uses: ./smithy-swift/.github/actions/setup-common-tools-composite-action | |
- name: Tools Versions | |
run: ./aws-sdk-swift/scripts/ci_steps/log_tool_versions.sh | |
- name: Prepare aws-sdk-swift Protocol & Unit Tests | |
run: | | |
cd aws-sdk-swift | |
./scripts/ci_steps/prepare_protocol_and_unit_tests.sh | |
- name: Build and Run aws-sdk-swift Unit Tests | |
run: | | |
cd aws-sdk-swift | |
swift test | |
- name: Build and Run aws-sdk-swift Protocol Tests | |
run: | | |
export AWS_REGION=us-west-2 | |
export AWS_ACCESS_KEY_ID=test-key-id | |
export AWS_SECRET_ACCESS_KEY=test-secret-access-key | |
cd aws-sdk-swift/codegen | |
swift test | |