-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7a25b88
Showing
29 changed files
with
1,745 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.build | ||
.git |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
github: adam-fowler |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
groups: | ||
dependencies: | ||
patterns: | ||
- "*" | ||
- package-ecosystem: "swift" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
open-pull-requests-limit: 5 | ||
allow: | ||
- dependency-type: all | ||
groups: | ||
all-dependencies: | ||
patterns: | ||
- "*" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: API breaking changes | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
linux: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
container: | ||
image: swift:5.10 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
# https://github.com/actions/checkout/issues/766 | ||
- name: Mark the workspace as safe | ||
run: git config --global --add safe.directory ${GITHUB_WORKSPACE} | ||
- name: API breaking changes | ||
run: | | ||
swift package diagnose-api-breaking-changes origin/${GITHUB_BASE_REF} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- '**.swift' | ||
- '**.yml' | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
linux: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
strategy: | ||
matrix: | ||
image: ["swift:5.9", "swift:5.10", "swiftlang/swift:nightly-6.0-jammy"] | ||
|
||
container: | ||
image: ${{ matrix.image }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Test | ||
run: | | ||
swift test --enable-code-coverage | ||
- name: Convert coverage files | ||
run: | | ||
llvm-cov export -format="lcov" \ | ||
.build/debug/hummingbird-jobsPackageTests.xctest \ | ||
-ignore-filename-regex="\/Tests\/" \ | ||
-ignore-filename-regex="\/Benchmarks\/" \ | ||
-instr-profile .build/debug/codecov/default.profdata > info.lcov | ||
- name: Upload to codecov.io | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
file: info.lcov |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Swift nightly build | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
linux: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
strategy: | ||
matrix: | ||
image: ['nightly-focal', 'nightly-jammy', 'nightly-amazonlinux2'] | ||
|
||
container: | ||
image: swiftlang/swift:${{ matrix.image }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Test | ||
run: | | ||
swift test |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Validity Check | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
validate: | ||
runs-on: macOS-latest | ||
timeout-minutes: 15 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
- name: Install Dependencies | ||
run: | | ||
brew install mint | ||
mint install NickLockwood/[email protected] --no-link | ||
- name: run script | ||
run: ./scripts/validate.sh |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.DS_Store | ||
.build/ | ||
.swiftpm/ | ||
.vscode/ | ||
.devcontainer/ | ||
/Packages | ||
/*.xcodeproj | ||
xcuserdata/ | ||
Package.resolved | ||
/public | ||
/docs | ||
.benchmarkBaselines |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Minimum swiftformat version | ||
--minversion 0.51.0 | ||
|
||
# Swift version | ||
--swiftversion 5.9 | ||
|
||
# file options | ||
--exclude .build | ||
|
||
# rules | ||
--disable redundantReturn, extensionAccessControl, typeSugar, conditionalAssignment | ||
|
||
# format options | ||
--ifdef no-indent | ||
--nospaceoperators ...,..< | ||
--patternlet inline | ||
--self insert | ||
--stripunusedargs unnamed-only | ||
|
||
#--maxwidth 150 | ||
--wraparguments before-first | ||
--wrapparameters before-first | ||
--wrapcollections before-first | ||
|
||
#file header | ||
# --header "//===----------------------------------------------------------------------===//\n//\n// This source file is part of the Hummingbird server framework project\n//\n// Copyright (c) {created.year}-{year} the Hummingbird authors\n// Licensed under Apache License v2.0\n//\n// See LICENSE.txt for license information\n// See hummingbird/CONTRIBUTORS.txt for the list of Hummingbird authors\n//\n// SPDX-License-Identifier: Apache-2.0\n//\n//===----------------------------------------------------------------------===//" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Code of Conduct | ||
|
||
All developers should feel welcome and encouraged to contribute to Hummingbird. Because of this we have adopted the code of conduct defined by [contributor-covenant.org](https://www.contributor-covenant.org). This document is used across many open source | ||
communities, and we think it articulates our values well. The full text is copied below: | ||
|
||
## Contributor Code of Conduct v1.3 | ||
|
||
As contributors and maintainers of this project, and in the interest of | ||
fostering an open and welcoming community, we pledge to respect all people who | ||
contribute through reporting issues, posting feature requests, updating | ||
documentation, submitting pull requests or patches, and other activities. | ||
|
||
We are committed to making participation in this project a harassment-free | ||
experience for everyone, regardless of level of experience, gender, gender | ||
identity and expression, sexual orientation, disability, personal appearance, | ||
body size, race, ethnicity, age, religion, or nationality. | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
* The use of sexualized language or imagery | ||
* Personal attacks | ||
* Trolling or insulting/derogatory comments | ||
* Public or private harassment | ||
* Publishing other's private information, such as physical or electronic | ||
addresses, without explicit permission | ||
* Other unethical or unprofessional conduct | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or | ||
reject comments, commits, code, wiki edits, issues, and other contributions | ||
that are not aligned to this Code of Conduct, or to ban temporarily or | ||
permanently any contributor for other behaviors that they deem inappropriate, | ||
threatening, offensive, or harmful. | ||
|
||
By adopting this Code of Conduct, project maintainers commit themselves to | ||
fairly and consistently applying these principles to every aspect of managing | ||
this project. Project maintainers who do not follow or enforce the Code of | ||
Conduct may be permanently removed from the project team. | ||
|
||
This Code of Conduct applies both within project spaces and in public spaces | ||
when an individual is representing the project or its community. | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported by contacting a project maintainer at [INSERT EMAIL ADDRESS]. All | ||
complaints will be reviewed and investigated and will result in a response that | ||
is deemed necessary and appropriate to the circumstances. Maintainers are | ||
obligated to maintain confidentiality with regard to the reporter of an | ||
incident. | ||
|
||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], | ||
version 1.3.0, available at https://www.contributor-covenant.org/version/1/3/0/code-of-conduct.html | ||
|
||
[homepage]: https://www.contributor-covenant.org | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Contributing | ||
|
||
## Legal | ||
By submitting a pull request, you represent that you have the right to license your contribution to the community, and agree by submitting the patch | ||
that your contributions are licensed under the Apache 2.0 license (see [LICENSE](LICENSE)). | ||
|
||
## Contributor Conduct | ||
All contributors are expected to adhere to the project's [Code of Conduct](CODE_OF_CONDUCT.md). | ||
|
||
## Submitting a bug or issue | ||
Please ensure to include the following in your bug report | ||
- A consise description of the issue, what happened and what you expected. | ||
- Simple reproduction steps | ||
- Version of the library you are using | ||
- Contextual information (Swift version, OS etc) | ||
|
||
## Submitting a Pull Request | ||
|
||
Please ensure to include the following in your Pull Request | ||
- A description of what you are trying to do. What the PR provides to the library, additional functionality, fixing a bug etc | ||
- A description of the code changes | ||
- Documentation on how these changes are being tested | ||
- Additional tests to show your code working and to ensure future changes don't break your code. | ||
|
||
Remember the requirements for Hummingbird and HummingbirdCore (No Foundation and no new dependencies). If you are submitting a large change to a module (or bringing in a new dependency) please consider making these changes in a separate repository. The idea is that Hummingbird/HummingbirdCore are kept as slimline as possible. These concerns can be discussed in a Github Issue. | ||
|
||
Please keep your PRs to a minimal number of changes. If a PR is large try to split it up into smaller PRs. Don't move code around unnecessarily it makes comparing old with new very hard. | ||
|
||
The main development branch of the repository is `main`. | ||
|
||
### Formatting | ||
|
||
We use Nick Lockwood's SwiftFormat for formatting code. PRs will not be accepted if they haven't be formatted. The current version of SwiftFormat we are using is v0.51.15. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# ================================ | ||
# Build image | ||
# ================================ | ||
FROM swift:5.10 as build | ||
|
||
WORKDIR /build | ||
|
||
# First just resolve dependencies. | ||
# This creates a cached layer that can be reused | ||
# as long as your Package.swift/Package.resolved | ||
# files do not change. | ||
COPY ./Package.* ./ | ||
RUN swift package resolve | ||
|
||
# Copy entire repo into container | ||
COPY . . | ||
|
||
RUN swift test --sanitize=thread |
Oops, something went wrong.