Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit ab8166a
Author: Franz Busch <[email protected]>
Date:   Mon Aug 26 16:36:07 2024 +0200

    [CI] Add GHA CI and release flow (swift-server#340)

    Co-authored-by: Fabian Fett <[email protected]>
    Co-authored-by: Sébastien Stormacq <[email protected]>
    Co-authored-by: Mahdi Bahrami <[email protected]>

commit 5ecc24f
Author: Andrea Scuderi <[email protected]>
Date:   Mon Aug 26 13:00:07 2024 +0200

    Add Breeze to projects.md (swift-server#343)

    authored-by: Andrea Scuderi <[email protected]>

commit 8676c89
Author: Sébastien Stormacq <[email protected]>
Date:   Mon Aug 26 12:25:41 2024 +0200

    apply swiftformat (swift-server#342)

    * apply swiftformat

    * update dep on Swift Docc to v1.3.0

    * force usage of swift docc plugin 1.3.0

commit 79fa2c2
Author: Alessio Buratti <[email protected]>
Date:   Fri Aug 23 18:50:22 2024 +0200

    [Draft] Detached tasks (swift-server#334)

    * First prototype

    * Fix build

    * Removes task cancellation

    swift-server#334 (comment)

    * Force user to handle errors

    swift-server#334 (comment)

    * Remove EventLoop API

    swift-server#334 (comment)

    * Make DetachedTaskContainer internal

    swift-server#334 (comment)
    swift-server#334 (comment)

    * Removes @unchecked Sendable

    swift-server#334 (comment)

    * Invoke awaitAll() from async context

    * Fix ambiguous expression type for swift 5.7

    * Fix visibility of detachedBackgroundTask

    * Add swift-doc

    * Add example usage to readme

    * Add tests

    ---------

    Co-authored-by: Sébastien Stormacq <[email protected]>
  • Loading branch information
aryan-25 committed Aug 27, 2024
1 parent 3800613 commit dff95ad
Show file tree
Hide file tree
Showing 66 changed files with 1,113 additions and 760 deletions.
15 changes: 15 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
changelog:
categories:
- title: SemVer Major
labels:
- ⚠️ semver/major
- title: SemVer Minor
labels:
- semver/minor
- title: SemVer Patch
labels:
- semver/patch
- title: Other Changes
labels:
- semver/none
- "*"
27 changes: 27 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: PR

on:
pull_request:
types: [opened, reopened, synchronize]

jobs:
soundness:
name: Soundness
uses: apple/swift-nio/.github/workflows/soundness.yml@main
with:
license_header_check_project_name: "SwiftAWSLambdaRuntime"
shell_check_enabled: false

unit-tests:
name: Unit tests
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
with:
linux_5_8_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
linux_5_9_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
linux_5_10_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
linux_nightly_6_0_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
linux_nightly_main_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"

swift-6-language-mode:
name: Swift 6 Language Mode
uses: apple/swift-nio/.github/workflows/swift_6_language_mode.yml@main
32 changes: 32 additions & 0 deletions .licenseignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
.gitignore
.licenseignore
.swiftformatignore
.spi.yml
.swift-format
.github/*
*.md
**/*.md
CONTRIBUTORS.txt
LICENSE.txt
NOTICE.txt
Package.swift
Package@swift-*.swift
Package.resolved
**/*.docc/*
**/.gitignore
**/Package.swift
**/Package.resolved
**/docker-compose*.yaml
**/docker/*
**/.dockerignore
**/Dockerfile
**/Makefile
**/*.html
**/*-template.yml
**/*.xcworkspace/*
**/*.xcodeproj/*
**/*.xcassets/*
**/*.appiconset/*
**/ResourcePackaging/hello.txt
.mailmap
.swiftformat
62 changes: 62 additions & 0 deletions .swift-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"version" : 1,
"indentation" : {
"spaces" : 4
},
"tabWidth" : 4,
"fileScopedDeclarationPrivacy" : {
"accessLevel" : "private"
},
"spacesAroundRangeFormationOperators" : false,
"indentConditionalCompilationBlocks" : false,
"indentSwitchCaseLabels" : false,
"lineBreakAroundMultilineExpressionChainComponents" : false,
"lineBreakBeforeControlFlowKeywords" : false,
"lineBreakBeforeEachArgument" : true,
"lineBreakBeforeEachGenericRequirement" : true,
"lineLength" : 120,
"maximumBlankLines" : 1,
"respectsExistingLineBreaks" : true,
"prioritizeKeepingFunctionOutputTogether" : true,
"rules" : {
"AllPublicDeclarationsHaveDocumentation" : false,
"AlwaysUseLiteralForEmptyCollectionInit" : false,
"AlwaysUseLowerCamelCase" : false,
"AmbiguousTrailingClosureOverload" : true,
"BeginDocumentationCommentWithOneLineSummary" : false,
"DoNotUseSemicolons" : true,
"DontRepeatTypeInStaticProperties" : true,
"FileScopedDeclarationPrivacy" : true,
"FullyIndirectEnum" : true,
"GroupNumericLiterals" : true,
"IdentifiersMustBeASCII" : true,
"NeverForceUnwrap" : false,
"NeverUseForceTry" : false,
"NeverUseImplicitlyUnwrappedOptionals" : false,
"NoAccessLevelOnExtensionDeclaration" : true,
"NoAssignmentInExpressions" : true,
"NoBlockComments" : true,
"NoCasesWithOnlyFallthrough" : true,
"NoEmptyTrailingClosureParentheses" : true,
"NoLabelsInCasePatterns" : true,
"NoLeadingUnderscores" : false,
"NoParensAroundConditions" : true,
"NoVoidReturnOnFunctionSignature" : true,
"OmitExplicitReturns" : true,
"OneCasePerLine" : true,
"OneVariableDeclarationPerLine" : true,
"OnlyOneTrailingClosureArgument" : true,
"OrderedImports" : true,
"ReplaceForEachWithForLoop" : true,
"ReturnVoidInsteadOfEmptyTuple" : true,
"UseEarlyExits" : false,
"UseExplicitNilCheckInConditions" : false,
"UseLetInEveryBoundCaseVariable" : false,
"UseShorthandTypeNames" : true,
"UseSingleLinePropertyGetter" : false,
"UseSynthesizedInitializer" : false,
"UseTripleSlashForDocumentationComments" : true,
"UseWhereClausesInForLoops" : false,
"ValidateDocumentationComments" : false
}
}
19 changes: 0 additions & 19 deletions .swiftformat

This file was deleted.

15 changes: 8 additions & 7 deletions Examples/Benchmark/Package.swift
Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
// swift-tools-version:5.7

import class Foundation.ProcessInfo // needed for CI to test the local version of the library
import PackageDescription

import class Foundation.ProcessInfo // needed for CI to test the local version of the library

let package = Package(
name: "swift-aws-lambda-runtime-example",
platforms: [
.macOS(.v12),
.macOS(.v12)
],
products: [
.executable(name: "MyLambda", targets: ["MyLambda"]),
.executable(name: "MyLambda", targets: ["MyLambda"])
],
dependencies: [
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "1.0.0-alpha"),
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "1.0.0-alpha")
],
targets: [
.executableTarget(
name: "MyLambda",
dependencies: [
.product(name: "AWSLambdaRuntimeCore", package: "swift-aws-lambda-runtime"),
.product(name: "AWSLambdaRuntimeCore", package: "swift-aws-lambda-runtime")
],
path: "."
),
)
]
)

// for CI to test the local version of the library
if ProcessInfo.processInfo.environment["LAMBDA_USE_LOCAL_DEPS"] != nil {
package.dependencies = [
.package(name: "swift-aws-lambda-runtime", path: "../.."),
.package(name: "swift-aws-lambda-runtime", path: "../..")
]
}
27 changes: 17 additions & 10 deletions Examples/Deployment/Package.swift
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
// swift-tools-version:5.7

import class Foundation.ProcessInfo // needed for CI to test the local version of the library
import PackageDescription

import class Foundation.ProcessInfo // needed for CI to test the local version of the library

let package = Package(
name: "swift-aws-lambda-runtime-samples",
platforms: [
.macOS(.v12),
.macOS(.v12)
],
products: [
// introductory example
Expand All @@ -16,21 +17,27 @@ let package = Package(
// demonstrate different types of error handling
],
dependencies: [
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "1.0.0-alpha"),
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "1.0.0-alpha")
],
targets: [
.executableTarget(name: "Benchmark", dependencies: [
.product(name: "AWSLambdaRuntimeCore", package: "swift-aws-lambda-runtime"),
]),
.executableTarget(name: "HelloWorld", dependencies: [
.product(name: "AWSLambdaRuntime", package: "swift-aws-lambda-runtime"),
]),
.executableTarget(
name: "Benchmark",
dependencies: [
.product(name: "AWSLambdaRuntimeCore", package: "swift-aws-lambda-runtime")
]
),
.executableTarget(
name: "HelloWorld",
dependencies: [
.product(name: "AWSLambdaRuntime", package: "swift-aws-lambda-runtime")
]
),
]
)

// for CI to test the local version of the library
if ProcessInfo.processInfo.environment["LAMBDA_USE_LOCAL_DEPS"] != nil {
package.dependencies = [
.package(name: "swift-aws-lambda-runtime", path: "../.."),
.package(name: "swift-aws-lambda-runtime", path: "../..")
]
}
15 changes: 8 additions & 7 deletions Examples/Echo/Package.swift
Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
// swift-tools-version:5.7

import class Foundation.ProcessInfo // needed for CI to test the local version of the library
import PackageDescription

import class Foundation.ProcessInfo // needed for CI to test the local version of the library

let package = Package(
name: "swift-aws-lambda-runtime-example",
platforms: [
.macOS(.v12),
.macOS(.v12)
],
products: [
.executable(name: "MyLambda", targets: ["MyLambda"]),
.executable(name: "MyLambda", targets: ["MyLambda"])
],
dependencies: [
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "1.0.0-alpha"),
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "1.0.0-alpha")
],
targets: [
.executableTarget(
name: "MyLambda",
dependencies: [
.product(name: "AWSLambdaRuntime", package: "swift-aws-lambda-runtime"),
.product(name: "AWSLambdaRuntime", package: "swift-aws-lambda-runtime")
],
path: "."
),
)
]
)

// for CI to test the local version of the library
if ProcessInfo.processInfo.environment["LAMBDA_USE_LOCAL_DEPS"] != nil {
package.dependencies = [
.package(name: "swift-aws-lambda-runtime", path: "../.."),
.package(name: "swift-aws-lambda-runtime", path: "../..")
]
}
15 changes: 8 additions & 7 deletions Examples/ErrorHandling/Package.swift
Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
// swift-tools-version:5.7

import class Foundation.ProcessInfo // needed for CI to test the local version of the library
import PackageDescription

import class Foundation.ProcessInfo // needed for CI to test the local version of the library

let package = Package(
name: "swift-aws-lambda-runtime-example",
platforms: [
.macOS(.v12),
.macOS(.v12)
],
products: [
.executable(name: "MyLambda", targets: ["MyLambda"]),
.executable(name: "MyLambda", targets: ["MyLambda"])
],
dependencies: [
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "1.0.0-alpha"),
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "1.0.0-alpha")
],
targets: [
.executableTarget(
name: "MyLambda",
dependencies: [
.product(name: "AWSLambdaRuntime", package: "swift-aws-lambda-runtime"),
.product(name: "AWSLambdaRuntime", package: "swift-aws-lambda-runtime")
],
path: "."
),
)
]
)

// for CI to test the local version of the library
if ProcessInfo.processInfo.environment["LAMBDA_USE_LOCAL_DEPS"] != nil {
package.dependencies = [
.package(name: "swift-aws-lambda-runtime", path: "../.."),
.package(name: "swift-aws-lambda-runtime", path: "../..")
]
}
Loading

0 comments on commit dff95ad

Please sign in to comment.