Skip to content

Commit 2c9f7ba

Browse files
committed
Initial commit
0 parents  commit 2c9f7ba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+4263
-0
lines changed

.dockerignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.build
2+
.git

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @adam-fowler @Joannis

.github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: adam-fowler

.github/dependabot.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
groups:
8+
dependencies:
9+
patterns:
10+
- "*"
11+
- package-ecosystem: "swift"
12+
directory: "/"
13+
schedule:
14+
interval: "daily"
15+
open-pull-requests-limit: 5
16+
allow:
17+
- dependency-type: all
18+
groups:
19+
all-dependencies:
20+
patterns:
21+
- "*"

.github/workflows/api-breakage.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: API breaking changes
2+
3+
on:
4+
pull_request:
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}-apibreakage
7+
cancel-in-progress: true
8+
9+
jobs:
10+
linux:
11+
runs-on: ubuntu-latest
12+
timeout-minutes: 15
13+
container:
14+
image: swift:latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
# https://github.com/actions/checkout/issues/766
21+
- name: Mark the workspace as safe
22+
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
23+
- name: API breaking changes
24+
run: |
25+
swift package diagnose-api-breaking-changes origin/${GITHUB_BASE_REF}

.github/workflows/ci.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- '**.swift'
9+
- '**.yml'
10+
pull_request:
11+
workflow_dispatch:
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}-ci
14+
cancel-in-progress: true
15+
16+
jobs:
17+
linux:
18+
runs-on: ubuntu-latest
19+
timeout-minutes: 15
20+
strategy:
21+
matrix:
22+
image: ["swift:5.10", "swift:6.0"]
23+
24+
25+
container:
26+
image: ${{ matrix.image }}
27+
services:
28+
autobahn:
29+
image: crossbario/autobahn-testsuite
30+
options: --name fuzzingserver
31+
ports:
32+
- 9001:9001
33+
volumes:
34+
- ${{ github.workspace }}/scripts/autobahn-config:/config
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v4
38+
- name: Test
39+
run: |
40+
swift test --enable-code-coverage
41+
- name: Convert coverage files
42+
run: |
43+
llvm-cov export -format="lcov" \
44+
.build/debug/swift-websocketPackageTests.xctest \
45+
-ignore-filename-regex="\/Tests\/" \
46+
-ignore-filename-regex="\/Benchmarks\/" \
47+
-instr-profile .build/debug/codecov/default.profdata > info.lcov
48+
- name: Upload to codecov.io
49+
uses: codecov/codecov-action@v4
50+
with:
51+
file: info.lcov

.github/workflows/nightly.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Swift nightly build
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
linux:
8+
runs-on: ubuntu-latest
9+
timeout-minutes: 15
10+
strategy:
11+
matrix:
12+
image: ['nightly-focal', 'nightly-jammy', 'nightly-amazonlinux2']
13+
14+
15+
container:
16+
image: swiftlang/swift:${{ matrix.image }}
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
- name: Test
21+
run: |
22+
swift test

.github/workflows/validate.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Validity Check
2+
3+
on:
4+
pull_request:
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}-validate
7+
cancel-in-progress: true
8+
9+
jobs:
10+
validate:
11+
runs-on: macOS-latest
12+
timeout-minutes: 15
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 1
18+
- name: Install Dependencies
19+
run: |
20+
brew install mint
21+
mint install NickLockwood/[email protected] --no-link
22+
- name: run script
23+
run: ./scripts/validate.sh
+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Verify Documentation
2+
3+
on:
4+
pull_request:
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}-verifydocs
7+
cancel-in-progress: true
8+
9+
jobs:
10+
linux:
11+
runs-on: ubuntu-latest
12+
timeout-minutes: 15
13+
container:
14+
image: swift:latest
15+
steps:
16+
- name: Install rsync 📚
17+
run: |
18+
apt-get update && apt-get install -y rsync bc
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
path: "package"
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
with:
27+
repository: "hummingbird-project/hummingbird-docs"
28+
fetch-depth: 0
29+
path: "documentation"
30+
- name: Verify
31+
run: |
32+
cd documentation
33+
swift package edit ${GITHUB_REPOSITORY#*/} --path ../package
34+
./scripts/build-docc.sh -e
35+

.gitignore

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.DS_Store
2+
.build/
3+
.swiftpm/
4+
.vscode/
5+
.devcontainer/
6+
/Packages
7+
/*.xcodeproj
8+
xcuserdata/
9+
Package.resolved
10+
/public
11+
/docs
12+
.benchmarkBaselines

.swiftformat

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Minimum swiftformat version
2+
--minversion 0.53.10
3+
4+
# Swift version
5+
--swiftversion 5.9
6+
7+
# file options
8+
--exclude .build
9+
10+
# rules
11+
--disable redundantReturn, extensionAccessControl, typeSugar, conditionalAssignment, preferForLoop, redundantInternal, redundantStaticSelf
12+
13+
# format options
14+
--ifdef no-indent
15+
--nospaceoperators ...,..<
16+
--patternlet inline
17+
--self insert
18+
--stripunusedargs unnamed-only
19+
20+
#--maxwidth 150
21+
--wraparguments before-first
22+
--wrapparameters before-first
23+
--wrapcollections before-first
24+
25+
#file header
26+
# --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//===----------------------------------------------------------------------===//"

CODE_OF_CONDUCT.md

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Code of Conduct
2+
3+
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
4+
communities, and we think it articulates our values well. The full text is copied below:
5+
6+
## Contributor Code of Conduct v1.3
7+
8+
As contributors and maintainers of this project, and in the interest of
9+
fostering an open and welcoming community, we pledge to respect all people who
10+
contribute through reporting issues, posting feature requests, updating
11+
documentation, submitting pull requests or patches, and other activities.
12+
13+
We are committed to making participation in this project a harassment-free
14+
experience for everyone, regardless of level of experience, gender, gender
15+
identity and expression, sexual orientation, disability, personal appearance,
16+
body size, race, ethnicity, age, religion, or nationality.
17+
18+
Examples of unacceptable behavior by participants include:
19+
20+
* The use of sexualized language or imagery
21+
* Personal attacks
22+
* Trolling or insulting/derogatory comments
23+
* Public or private harassment
24+
* Publishing other's private information, such as physical or electronic
25+
addresses, without explicit permission
26+
* Other unethical or unprofessional conduct
27+
28+
Project maintainers have the right and responsibility to remove, edit, or
29+
reject comments, commits, code, wiki edits, issues, and other contributions
30+
that are not aligned to this Code of Conduct, or to ban temporarily or
31+
permanently any contributor for other behaviors that they deem inappropriate,
32+
threatening, offensive, or harmful.
33+
34+
By adopting this Code of Conduct, project maintainers commit themselves to
35+
fairly and consistently applying these principles to every aspect of managing
36+
this project. Project maintainers who do not follow or enforce the Code of
37+
Conduct may be permanently removed from the project team.
38+
39+
This Code of Conduct applies both within project spaces and in public spaces
40+
when an individual is representing the project or its community.
41+
42+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
43+
reported by contacting a project maintainer at [INSERT EMAIL ADDRESS]. All
44+
complaints will be reviewed and investigated and will result in a response that
45+
is deemed necessary and appropriate to the circumstances. Maintainers are
46+
obligated to maintain confidentiality with regard to the reporter of an
47+
incident.
48+
49+
50+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
51+
version 1.3.0, available at https://www.contributor-covenant.org/version/1/3/0/code-of-conduct.html
52+
53+
[homepage]: https://www.contributor-covenant.org
54+

CONTRIBUTING.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Contributing
2+
3+
## Legal
4+
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
5+
that your contributions are licensed under the Apache 2.0 license (see [LICENSE](LICENSE)).
6+
7+
## Contributor Conduct
8+
All contributors are expected to adhere to the project's [Code of Conduct](CODE_OF_CONDUCT.md).
9+
10+
## Submitting a bug or issue
11+
Please ensure to include the following in your bug report
12+
- A consise description of the issue, what happened and what you expected.
13+
- Simple reproduction steps
14+
- Version of the library you are using
15+
- Contextual information (Swift version, OS etc)
16+
17+
## Submitting a Pull Request
18+
19+
Please ensure to include the following in your Pull Request
20+
- A description of what you are trying to do. What the PR provides to the library, additional functionality, fixing a bug etc
21+
- A description of the code changes
22+
- Documentation on how these changes are being tested
23+
- Additional tests to show your code working and to ensure future changes don't break your code.
24+
25+
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.
26+
27+
The main development branch of the repository is `main`.
28+
29+
### Formatting
30+
31+
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.53.10.

Dockerfile

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# ================================
2+
# Build image
3+
# ================================
4+
FROM swift:6.0 as build
5+
6+
WORKDIR /build
7+
8+
# First just resolve dependencies.
9+
# This creates a cached layer that can be reused
10+
# as long as your Package.swift/Package.resolved
11+
# files do not change.
12+
COPY ./Package.* ./
13+
RUN swift package resolve
14+
15+
# Copy entire repo into container
16+
COPY . .
17+
18+
RUN swift test --sanitize=thread

0 commit comments

Comments
 (0)