Skip to content
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
126 changes: 80 additions & 46 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ commands:
bash CircleciScripts/pre_start_iOS_simulator.sh

jobs:
build:
build_smithy_kotlin:
environment:
# Configure the JVM and Gradle to avoid OOM errors
_JAVA_OPTIONS: "-Xmx3g"
Expand All @@ -115,15 +115,6 @@ jobs:
- smithy-kotlin/build
- smithy-kotlin/*/build
- smithy-kotlin/client-runtime/*/build
- run:
name: Build Smithy Swift
working_directory: ~/project/smithy-swift
command: ./gradlew build -x test
- persist_to_workspace:
root: .
paths:
- smithy-swift/build
- smithy-swift/*/build

test_smithy_kotlin:
environment:
Expand Down Expand Up @@ -165,18 +156,73 @@ jobs:
command: |
./gradlew ktlint

build_and_unittest_swift_client_runtime:
macos:
xcode: "11.4.1"
steps:
- checkout
- pre_start_ios_simulator
- run:
name: Generate XCodeProject
working_directory: ~/project/smithy-swift/ClientRuntime
command: |
swift package generate-xcodeproj
- run:
name: Build ClientRuntime
working_directory: ~/project/smithy-swift/ClientRuntime
command: |
xcodebuild build -project ClientRuntime.xcodeproj -scheme ClientRuntime-Package -sdk iphonesimulator -destination "${destination}"
- run:
name: Unit Test ClientRuntime
working_directory: ~/project/smithy-swift/ClientRuntime
command: |
xcodebuild test -enableCodeCoverage YES -project ClientRuntime.xcodeproj -scheme ClientRuntime-Package -sdk iphonesimulator -destination "${destination}"
bash <(curl -s https://codecov.io/bash)
- run:
name: Install swiftlint
command: |
HOMEBREW_NO_AUTO_UPDATE=1 brew install swiftlint
- run:
name: Lint ClientRuntime
working_directory: ~/project/smithy-swift/ClientRuntime
command: |
swiftlint

build_smithy_swift:
macos:
xcode: "11.4.1"
environment:
# Configure the JVM and Gradle to avoid OOM errors
_JAVA_OPTIONS: "-Xmx3g"
GRADLE_OPTS: "-Dorg.gradle.daemon=false -Dorg.gradle.workers.max=2"
steps:
- checkout
- with_cache:
cache_key: "macOSv2"
steps:
- run:
name: Build Smithy Swift
working_directory: ~/project/smithy-swift
command: ./gradlew build -x test
- persist_to_workspace:
root: .
paths:
- smithy-swift/build
- smithy-swift/*/build

test_smithy_swift:
macos:
xcode: "11.4.1"
environment:
# Configure the JVM and Gradle to avoid OOM errors
_JAVA_OPTIONS: "-Xmx3g"
GRADLE_OPTS: "-Dorg.gradle.daemon=false -Dorg.gradle.workers.max=2"
docker:
- image: circleci/openjdk:8
steps:
- checkout
- attach_workspace:
at: .
- with_cache:
cache_key: "macOSv2"
steps:
- run:
working_directory: ~/project/smithy-swift
Expand All @@ -188,13 +234,12 @@ jobs:
reports_path: ""

lint_smithy_swift:
# Remove if parallelism is not desired
macos:
xcode: "11.4.1"
environment:
# Configure the JVM and Gradle to avoid OOM errors
_JAVA_OPTIONS: "-Xmx3g"
GRADLE_OPTS: "-Dorg.gradle.daemon=false -Dorg.gradle.workers.max=2"
docker:
- image: circleci/openjdk:8
steps:
- checkout
- attach_workspace:
Expand All @@ -204,48 +249,37 @@ jobs:
name: Run ktlint
command: |
./gradlew ktlint

build_and_unittest_swift_client_runtime:
macos:
xcode: "11.4.1"
steps:
- checkout
- pre_start_ios_simulator
- run:
name: Install swiftlint
command: |
HOMEBREW_NO_AUTO_UPDATE=1 brew install swiftlint
- run:
name: Build ClientRuntime
working_directory: ~/project/smithy-swift/ClientRuntime
command: |
xcodebuild build-for-testing -project ClientRuntime.xcodeproj -scheme ClientRuntime -sdk iphonesimulator -destination "${destination}"
- run:
name: Unit Test ClientRuntime
working_directory: ~/project/smithy-swift/ClientRuntime
command: |
xcodebuild test-without-building -enableCodeCoverage YES -project ClientRuntime.xcodeproj -scheme ClientRuntime -sdk iphonesimulator -destination "${destination}"
bash <(curl https://codecov.io/bash | sed 's/"$beta_xcode_partials"//g')

workflows:
version: 2

build_and_test_codegen:
build_and_test_kotlin_codegen:
jobs:
- build
- build_smithy_kotlin
- test_smithy_kotlin:
requires:
- build
- build_smithy_kotlin
- lint_smithy_kotlin
- test_smithy_swift:
requires:
- build
- lint_smithy_swift

build_and_test_swift_client_runtime:

build_and_test_smithy_swift:
jobs:
- build_and_unittest_swift_client_runtime:
filters:
branches:
only:
- swift-client-runtime
- build_smithy_swift:
requires:
- build_and_unittest_swift_client_runtime
filters:
branches:
only:
- swift-client-runtime
- test_smithy_swift:
requires:
- build_smithy_swift
filters:
branches:
only:
- swift-client-runtime
- lint_smithy_swift
7 changes: 7 additions & 0 deletions smithy-swift/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.build/
.swiftpm/
ClientRuntime/.build/
ClientRuntime/ClientRuntime.xcodeproj
ClientRuntime/ClientRuntime.xcodeproj/


Loading