Skip to content

Commit

Permalink
Merge branch 'main' into 112-output-to-swift-metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
ptoffy committed Aug 28, 2024
1 parent 04b7fd6 commit 07c06f6
Show file tree
Hide file tree
Showing 49 changed files with 2,075 additions and 1,538 deletions.
24 changes: 24 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/bin
**/charts
**/docker-compose*
**/compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
README.md
8 changes: 8 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
* @gwynne @jdmcd
/.github/CONTRIBUTING.md @gwynne @0xTim
/.github/workflows/*.yml @gwynne @0xTim
/.github/workflows/test.yml @gwynne
/.spi.yml @gwynne @0xTim
/.gitignore @gwynne @0xTim
/LICENSE @gwynne @0xTim
/README.md @gwynne @0xTim @jdmcd
24 changes: 10 additions & 14 deletions .github/workflows/api-docs.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
name: deploy-api-docs
on:
push:
branches:
- main
push:
branches:
- main

jobs:
deploy:
name: api.vapor.codes
runs-on: ubuntu-latest
steps:
- name: Deploy api-docs
uses: appleboy/ssh-action@master
with:
host: vapor.codes
username: vapor
key: ${{ secrets.VAPOR_CODES_SSH_KEY }}
script: ./github-actions/deploy-api-docs.sh
build-and-deploy:
uses: vapor/api-docs/.github/workflows/build-and-deploy-docs-workflow.yml@main
secrets: inherit
with:
package_name: queues
modules: Queues,XCTQueues
pathsToInvalidate: /queues/* /xctqueues/*
31 changes: 0 additions & 31 deletions .github/workflows/projectboard.yml

This file was deleted.

10 changes: 6 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: test
on: { pull_request: {} }
on:
pull_request: { types: [opened, reopened, synchronize, ready_for_review] }
push: { branches: [ main ] }

jobs:
unit-tests:
uses: vapor/ci/.github/workflows/run-unit-tests.yml@reusable-workflows
uses: vapor/ci/.github/workflows/run-unit-tests.yml@main
with:
with_coverage: false
with_tsan: true
with_tsan: false
secrets: inherit
5 changes: 5 additions & 0 deletions .spi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: 1
metadata:
authors: Maintained by the Vapor Core Team with hundreds of contributions from the Vapor Community.
external_links:
documentation: "https://docs.vapor.codes/advanced/queues/"
59 changes: 59 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
FROM ubuntu:18.04
LABEL maintainer="Swift Infrastructure <swift-infrastructure@forums.swift.org>"
LABEL Description="Docker Container for the Swift programming language"

RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && apt-get -q update && \
apt-get -q install -y \
libatomic1 \
libcurl4-openssl-dev \
libxml2-dev \
libedit2 \
libsqlite3-0 \
libc6-dev \
binutils \
libgcc-5-dev \
libstdc++-5-dev \
zlib1g-dev \
libpython3.6 \
tzdata \
git \
pkg-config \
&& rm -r /var/lib/apt/lists/*

# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little

# pub 4096R/ED3D1561 2019-03-22 [SC] [expires: 2023-03-23]
# Key fingerprint = A62A E125 BBBF BB96 A6E0 42EC 925C C1CC ED3D 1561
# uid Swift 5.x Release Signing Key <swift-infrastructure@swift.org
ARG SWIFT_SIGNING_KEY=A62AE125BBBFBB96A6E042EC925CC1CCED3D1561
ARG SWIFT_PLATFORM=ubuntu18.04
ARG SWIFT_BRANCH=swift-5.5.3-release
ARG SWIFT_VERSION=swift-5.5.3-RELEASE
ARG SWIFT_WEBROOT=https://download.swift.org

ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \
SWIFT_PLATFORM=$SWIFT_PLATFORM \
SWIFT_BRANCH=$SWIFT_BRANCH \
SWIFT_VERSION=$SWIFT_VERSION \
SWIFT_WEBROOT=$SWIFT_WEBROOT

RUN set -e; \
SWIFT_WEBDIR="$SWIFT_WEBROOT/$SWIFT_BRANCH/$(echo $SWIFT_PLATFORM | tr -d .)" \
&& SWIFT_BIN_URL="$SWIFT_WEBDIR/$SWIFT_VERSION/$SWIFT_VERSION-$SWIFT_PLATFORM.tar.gz" \
&& SWIFT_SIG_URL="$SWIFT_BIN_URL.sig" \
# - Grab curl here so we cache better up above
&& export DEBIAN_FRONTEND=noninteractive \
&& apt-get -q update && apt-get -q install -y curl && rm -rf /var/lib/apt/lists/* \
# - Download the GPG keys, Swift toolchain, and toolchain signature, and verify.
&& export GNUPGHOME="$(mktemp -d)" \
&& curl -fsSL "$SWIFT_BIN_URL" -o swift.tar.gz "$SWIFT_SIG_URL" -o swift.tar.gz.sig \
&& gpg --batch --quiet --keyserver keyserver.ubuntu.com --recv-keys "$SWIFT_SIGNING_KEY" \
&& gpg --batch --verify swift.tar.gz.sig swift.tar.gz \
# - Unpack the toolchain, set libs permissions, and clean up.
&& tar -xzf swift.tar.gz --directory / --strip-components=1 \
&& chmod -R o+r /usr/lib/swift \
&& rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz \
&& apt-get purge --auto-remove -y curl

# Print Installed Swift Version
RUN swift --version
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2023 Qutheory, LLC

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
58 changes: 39 additions & 19 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,33 +1,53 @@
// swift-tools-version:5.4
// swift-tools-version:5.8
import PackageDescription

let package = Package(
name: "queues",
platforms: [
.macOS(.v10_15)
.macOS(.v10_15),
.iOS(.v13),
.watchOS(.v6),
.tvOS(.v13),
],
products: [
.library(name: "Queues", targets: ["Queues"]),
.library(name: "XCTQueues", targets: ["XCTQueues"])
.library(name: "XCTQueues", targets: ["XCTQueues"]),
],
dependencies: [
.package(url: "https://github.com/vapor/vapor.git", from: "4.0.0"),
.package(url: "https://github.com/apple/swift-nio.git", from: "2.33.0"),
.package(url: "https://github.com/apple/swift-metrics.git", "1.0.0" ..< "3.0.0")
.package(url: "https://github.com/vapor/vapor.git", from: "4.101.1"),
.package(url: "https://github.com/apple/swift-nio.git", from: "2.65.0"),
.package(url: "https://github.com/apple/swift-metrics.git", from: "2.0.0"),
],
targets: [
.target(name: "Queues", dependencies: [
.product(name: "Vapor", package: "vapor"),
.product(name: "NIOCore", package: "swift-nio"),
.product(name: "Metrics", package: "swift-metrics"),
]),
.target(name: "XCTQueues", dependencies: [
.target(name: "Queues")
]),
.testTarget(name: "QueuesTests", dependencies: [
.target(name: "Queues"),
.product(name: "XCTVapor", package: "vapor"),
.target(name: "XCTQueues")
]),
.target(
name: "Queues",
dependencies: [
.product(name: "Vapor", package: "vapor"),
.product(name: "NIOCore", package: "swift-nio"),
.product(name: "Metrics", package: "swift-metrics"),
],
swiftSettings: swiftSettings
),
.target(
name: "XCTQueues",
dependencies: [
.target(name: "Queues"),
],
swiftSettings: swiftSettings
),
.testTarget(
name: "QueuesTests",
dependencies: [
.target(name: "Queues"),
.target(name: "XCTQueues"),
.product(name: "XCTVapor", package: "vapor"),
],
swiftSettings: swiftSettings
),
]
)

var swiftSettings: [SwiftSetting] { [
.enableUpcomingFeature("ForwardTrailingClosures"),
.enableUpcomingFeature("ConciseMagicFile"),
] }
54 changes: 54 additions & 0 deletions Package@swift-5.9.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// swift-tools-version:5.9
import PackageDescription

let package = Package(
name: "queues",
platforms: [
.macOS(.v10_15),
.iOS(.v13),
.watchOS(.v6),
.tvOS(.v13),
],
products: [
.library(name: "Queues", targets: ["Queues"]),
.library(name: "XCTQueues", targets: ["XCTQueues"])
],
dependencies: [
.package(url: "https://github.com/vapor/vapor.git", from: "4.101.1"),
.package(url: "https://github.com/apple/swift-nio.git", from: "2.65.0"),
],
targets: [
.target(
name: "Queues",
dependencies: [
.product(name: "Vapor", package: "vapor"),
.product(name: "NIOCore", package: "swift-nio"),
],
swiftSettings: swiftSettings
),
.target(
name: "XCTQueues",
dependencies: [
.target(name: "Queues"),
],
swiftSettings: swiftSettings
),
.testTarget(
name: "QueuesTests",
dependencies: [
.target(name: "Queues"),
.target(name: "XCTQueues"),
.product(name: "XCTVapor", package: "vapor"),
],
swiftSettings: swiftSettings
),
]
)

var swiftSettings: [SwiftSetting] { [
.enableUpcomingFeature("ForwardTrailingClosures"),
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("ConciseMagicFile"),
.enableUpcomingFeature("DisableOutwardActorInference"),
.enableExperimentalFeature("StrictConcurrency=complete"),
] }
36 changes: 14 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,18 @@
<p align="center">
<img
src="https://user-images.githubusercontent.com/1342803/75701575-03f34580-5c82-11ea-9960-f39cdd3c8862.png"
height="64"
alt="Queues"
>
<br>
<br>
<a href="https://docs.vapor.codes/4.0/">
<img src="http://img.shields.io/badge/read_the-docs-2196f3.svg" alt="Docs">
</a>
<a href="http://vapor.team">
<img src="https://img.shields.io/discord/431917998102675485.svg" alt="Team Chat">
</a>
<a href="LICENSE">
<img src="http://img.shields.io/badge/license-MIT-brightgreen.svg" alt="MIT License">
</a>
<a href="https://github.com/vapor/queues/actions">
<img src="https://github.com/vapor/queues/workflows/test/badge.svg" alt="Continuous Integration">
</a>
<a href="https://swift.org">
<img src="http://img.shields.io/badge/swift-5.2-brightgreen.svg" alt="Swift 5.2">
</a>
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/vapor/queues/assets/1130717/40decf1b-bd9e-4347-99ab-d7e27d60f992">
<source media="(prefers-color-scheme: light)" srcset="https://github.com/vapor/queues/assets/1130717/86b36603-bf12-4d0e-8598-45c53caf9608">
<img src="https://github.com/vapor/queues/assets/1130717/86b36603-bf12-4d0e-8598-45c53caf9608" height="96" alt="Queues">
</picture>
<br>
<br>
<a href="https://docs.vapor.codes/4.0/"><img src="https://design.vapor.codes/images/readthedocs.svg" alt="Documentation"></a>
<a href="https://discord.gg/vapor"><img src="https://design.vapor.codes/images/discordchat.svg" alt="Team Chat"></a>
<a href="LICENSE"><img src="https://design.vapor.codes/images/mitlicense.svg" alt="MIT License"></a>
<a href="https://github.com/vapor/queues/actions/workflows/test.yml"><img src="https://img.shields.io/github/actions/workflow/status/vapor/queues/test.yml?event=push&style=plastic&logo=github&label=tests&logoColor=%23ccc" alt="Continuous Integration"></a>
<a href="https://codecov.io/github/vapor/queues"><img src="https://img.shields.io/codecov/c/github/vapor/queues?style=plastic&logo=codecov&label=codecov"></a>
<a href="https://swift.org"><img src="https://design.vapor.codes/images/swift58up.svg" alt="Swift 5.8+"></a>
</p>

<br>

Loading

0 comments on commit 07c06f6

Please sign in to comment.