Skip to content

Commit

Permalink
Merge branch 'main' into jbe/spr2
Browse files Browse the repository at this point in the history
  • Loading branch information
jbelkins committed Oct 16, 2024
2 parents 6d6bcf6 + 78ae103 commit c961c4d
Show file tree
Hide file tree
Showing 1,017 changed files with 184,714 additions and 110,635 deletions.
46 changes: 20 additions & 26 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,48 +10,55 @@ env:
jobs:
apple:
runs-on: ${{ matrix.runner }}
env:
DEVELOPER_DIR: /Applications/${{ matrix.xcode }}.app/Contents/Developer
strategy:
fail-fast: false
matrix:
# This matrix runs tests on iOS sim & Mac, on oldest & newest supported Xcodes
runner:
- macos-13
- macos-14
- macos-15
xcode:
- Xcode_15.2
- Xcode_16.0
- Xcode_16
destination:
- 'platform=iOS Simulator,OS=17.2,name=iPhone 15'
- 'platform=iOS Simulator,OS=18.0,name=iPhone 15'
- 'platform=iOS Simulator,OS=18.0,name=iPhone 16'
- 'platform=tvOS Simulator,OS=17.2,name=Apple TV 4K (3rd generation) (at 1080p)'
- 'platform=tvOS Simulator,OS=18.0,name=Apple TV 4K (3rd generation) (at 1080p)'
- 'platform=visionOS Simulator,OS=1.0,name=Apple Vision Pro'
- 'platform=visionOS Simulator,OS=2.0,name=Apple Vision Pro'
- 'platform=OS X'
- 'platform=macOS'
exclude:
# Don't run old macOS with new Xcode
- runner: macos-13
xcode: Xcode_16.0
xcode: Xcode_16
# Don't run new macOS with old Xcode
- runner: macos-14
- 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.0
xcode: Xcode_16
- destination: 'platform=iOS Simulator,OS=17.2,name=iPhone 15'
xcode: Xcode_16.0
xcode: Xcode_16
- destination: 'platform=visionOS Simulator,OS=1.0,name=Apple Vision Pro'
xcode: Xcode_16.0
xcode: Xcode_16
# Don't run new simulators with old Xcode
- destination: 'platform=tvOS Simulator,OS=18.0,name=Apple TV 4K (3rd generation) (at 1080p)'
xcode: Xcode_15.2
- destination: 'platform=iOS Simulator,OS=18.0,name=iPhone 15'
- destination: 'platform=iOS Simulator,OS=18.0,name=iPhone 16'
xcode: Xcode_15.2
- destination: 'platform=visionOS Simulator,OS=2.0,name=Apple Vision Pro'
xcode: Xcode_15.2
steps:
- name: Configure Xcode
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app
- name: Install visionOS 2.0 sim
if: ${{ matrix.destination == 'platform=visionOS Simulator,OS=2.0,name=Apple Vision Pro' }}
run: |
sudo xcodebuild -runFirstLaunch
sudo xcrun simctl list
sudo xcodebuild -downloadPlatform visionOS
sudo xcodebuild -runFirstLaunch
- name: Checkout aws-sdk-swift
uses: actions/checkout@v4
- name: Select smithy-swift branch
Expand Down Expand Up @@ -111,7 +118,6 @@ jobs:
set -o pipefail && \
NSUnbufferedIO=YES xcodebuild \
-scheme aws-sdk-swift-protocol-tests-Package \
-testPlan ProtocolTestPlan \
-destination '${{ matrix.destination }}' \
test 2>&1 \
| xcbeautify
Expand All @@ -128,7 +134,7 @@ jobs:
- amazonlinux2
version:
- "5.9"
- "5.10"
- "6.0"
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
steps:
Expand Down Expand Up @@ -176,18 +182,6 @@ jobs:
run: ./scripts/ci_steps/install_native_linux_dependencies.sh
- name: Tools Versions
run: ./scripts/ci_steps/log_tool_versions.sh
# Configure fake credentials using profiles
- name: (Credentials 1/3) Create AWS config directory
run: mkdir -p ~/.aws
- name: (Credentials 2/3) Create AWS config file
run: |
echo "[default]" > ~/.aws/config
echo "region=us-west-2" >> ~/.aws/config
- name: (Credentials 3/3) Create AWS credentials file
run: |
echo "[default]" > ~/.aws/credentials
echo "aws_access_key_id = test-key-id" >> ~/.aws/credentials
echo "aws_secret_access_key = test-secret-access-key" >> ~/.aws/credentials
- name: Prepare Protocol & Unit Tests
run: |
./scripts/ci_steps/prepare_protocol_and_unit_tests.sh
Expand Down
33 changes: 20 additions & 13 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,48 +13,55 @@ permissions:
jobs:
apple:
runs-on: ${{ matrix.runner }}
env:
DEVELOPER_DIR: /Applications/${{ matrix.xcode }}.app/Contents/Developer
strategy:
fail-fast: false
matrix:
# This matrix runs tests on iOS sim & Mac, on oldest & newest supported Xcodes
runner:
- macos-13
- macos-14
- macos-15
xcode:
- Xcode_15.2
- Xcode_16.0
- Xcode_16
destination:
- 'platform=iOS Simulator,OS=17.2,name=iPhone 15'
- 'platform=iOS Simulator,OS=18.0,name=iPhone 15'
- 'platform=iOS Simulator,OS=18.0,name=iPhone 16'
- 'platform=tvOS Simulator,OS=17.2,name=Apple TV 4K (3rd generation) (at 1080p)'
- 'platform=tvOS Simulator,OS=18.0,name=Apple TV 4K (3rd generation) (at 1080p)'
- 'platform=visionOS Simulator,OS=1.0,name=Apple Vision Pro'
- 'platform=visionOS Simulator,OS=2.0,name=Apple Vision Pro'
- 'platform=OS X'
- 'platform=macOS'
exclude:
# Don't run old macOS with new Xcode
- runner: macos-13
xcode: Xcode_16.0
xcode: Xcode_16
# Don't run new macOS with old Xcode
- runner: macos-14
- 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.0
xcode: Xcode_16
- destination: 'platform=iOS Simulator,OS=17.2,name=iPhone 15'
xcode: Xcode_16.0
xcode: Xcode_16
- destination: 'platform=visionOS Simulator,OS=1.0,name=Apple Vision Pro'
xcode: Xcode_16.0
xcode: Xcode_16
# Don't run new simulators with old Xcode
- destination: 'platform=tvOS Simulator,OS=18.0,name=Apple TV 4K (3rd generation) (at 1080p)'
xcode: Xcode_15.2
- destination: 'platform=iOS Simulator,OS=18.0,name=iPhone 15'
- destination: 'platform=iOS Simulator,OS=18.0,name=iPhone 16'
xcode: Xcode_15.2
- destination: 'platform=visionOS Simulator,OS=2.0,name=Apple Vision Pro'
xcode: Xcode_15.2
steps:
- name: Configure Xcode
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app
- name: Install visionOS 2.0 sim
if: ${{ matrix.destination == 'platform=visionOS Simulator,OS=2.0,name=Apple Vision Pro' }}
run: |
sudo xcodebuild -runFirstLaunch
sudo xcrun simctl list
sudo xcodebuild -downloadPlatform visionOS
sudo xcodebuild -runFirstLaunch
- name: Configure AWS Credentials for Integration Tests
uses: aws-actions/configure-aws-credentials@v4
with:
Expand Down Expand Up @@ -137,7 +144,7 @@ jobs:
- amazonlinux2
version:
- "5.9"
- "5.10"
- "6.0"
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
steps:
Expand Down
85 changes: 0 additions & 85 deletions .github/workflows/model-integration.yml

This file was deleted.

3 changes: 2 additions & 1 deletion AWSSDKSwiftCLI/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ let package = Package(
.product(name: "Algorithms", package: "swift-algorithms"),
],
resources: [
.process("Resources/Package.Base.swift"),
.process("Resources/Package.Prefix.txt"),
.process("Resources/Package.Base.txt"),
.process("Resources/DocIndex.Base.md")
]
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ struct GeneratePackageManifestCommand: ParsableCommand {
@Option(help: "The names of the services to include in the package manifest. This defaults to all services located in aws-sdk-swift/Sources/Services")
var services: [String] = []

@Flag(help: "If the package manifest should exclude AWS services.")
var excludeAWSServices = false

@Flag(help: "If the package manifest should exclude runtime tests.")
var excludeRuntimeTests = false

Expand All @@ -45,7 +42,6 @@ struct GeneratePackageManifestCommand: ParsableCommand {
clientRuntimeVersion: clientRuntimeVersion,
crtVersion: crtVersion,
services: services.isEmpty ? nil : services,
excludeAWSServices: excludeAWSServices,
excludeRuntimeTests: excludeRuntimeTests
)
try generatePackageManifest.run()
Expand All @@ -69,8 +65,6 @@ struct GeneratePackageManifest {
/// The list of services to include as products
/// If `nil` then the list is populated with the names of all items within the `Sources/Services` directory
let services: [String]?
/// If the package manifest should exclude the AWS services.
let excludeAWSServices: Bool
/// If the package manifest should exclude runtime unit tests.
let excludeRuntimeTests: Bool

Expand Down Expand Up @@ -213,14 +207,12 @@ extension GeneratePackageManifest {
clientRuntimeVersion: clientRuntimeVersion,
crtVersion: crtVersion,
services: services,
excludeAWSServices: excludeAWSServices,
excludeRuntimeTests: excludeRuntimeTests
) { _clientRuntimeVersion, _crtVersion, _services in
let builder = PackageManifestBuilder(
clientRuntimeVersion: _clientRuntimeVersion,
crtVersion: _crtVersion,
services: _services,
excludeAWSServices: excludeAWSServices,
excludeRuntimeTests: excludeRuntimeTests
)
return try builder.build()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ struct PrepareRelease {
) throws {
let commits = try Process.git.listOfCommitsBetween("HEAD", "\(previousVersion)")

let releaseNotes = ReleaseNotesBuilder(
let releaseNotes = try ReleaseNotesBuilder(
previousVersion: previousVersion,
newVersion: newVersion,
repoOrg: repoOrg,
Expand Down
50 changes: 50 additions & 0 deletions AWSSDKSwiftCLI/Sources/AWSSDKSwiftCLI/Models/Features.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
//
// Copyright Amazon.com Inc. or its affiliates.
// All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0
//

import Foundation
import AWSCLIUtils

struct FeaturesReader: Decodable {
private let requestFilePath: String
private let mappingFilePath: String

public init(
requestFilePath: String = "../build-request.json",
mappingFilePath: String = "../feature-service-id.json"
) {
self.requestFilePath = requestFilePath
self.mappingFilePath = mappingFilePath
}

public func getFeaturesFromFile() throws -> Features {
let fileContents = try FileManager.default.loadContents(atPath: requestFilePath)
return try JSONDecoder().decode(Features.self, from: fileContents)
}

public func getFeaturesIDToServiceNameDictFromFile() throws -> [String: String] {
let fileContents = try FileManager.default.loadContents(atPath: mappingFilePath)
return try JSONDecoder().decode([String: String].self, from: fileContents)
}
}

struct Features: Decodable {
let features: [Feature]
}

struct Feature: Decodable {
let releaseNotes: String?
let featureMetadata: FeatureMetadata

struct FeatureMetadata: Decodable {
let trebuchet: Trebuchet

struct Trebuchet: Decodable {
let featureId: String
let featureType: String
}
}
}
Loading

0 comments on commit c961c4d

Please sign in to comment.