-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate CI to use swiftlang / SwiftNIO common GitHub Actions.
Motivation: * Reduce duplication * Centralise boilerplate changes when new Swift versions are picked up. * Benefit from centralised work to add new linting / test infrastructure. Modifications: Changes of note: * Use soundness checks from swiftlang/github-workflows. * Retain bespoke license-checking code for .swift files as the gRPC header style is very different to most templates. Result: More test, linting, formatting coverage. More common CI with other Swift on Server projects.
- Loading branch information
Showing
23 changed files
with
274 additions
and
148 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,14 @@ | ||
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 |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
name: Main | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
schedule: | ||
- cron: "0 8,20 * * *" | ||
|
||
jobs: | ||
unit-tests: | ||
name: Unit tests | ||
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main | ||
with: | ||
linux_5_9_enabled: false | ||
linux_5_10_enabled: false | ||
linux_6_0_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable" | ||
linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable" | ||
linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable" |
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,34 @@ | ||
name: PR | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
types: [opened, reopened, synchronize] | ||
|
||
jobs: | ||
soundness: | ||
name: Soundness | ||
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main | ||
with: | ||
license_header_check_project_name: "gRPC" | ||
|
||
grpc-soundness: | ||
name: Soundness | ||
uses: ./.github/workflows/soundness.yml | ||
|
||
unit-tests: | ||
name: Unit tests | ||
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main | ||
with: | ||
linux_5_9_enabled: false | ||
linux_5_10_enabled: false | ||
linux_6_0_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable" | ||
linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable" | ||
linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable" | ||
|
||
cxx-interop: | ||
name: Cxx interop | ||
uses: apple/swift-nio/.github/workflows/cxx_interop.yml@main | ||
with: | ||
linux_5_9_enabled: false | ||
linux_5_10_enabled: false |
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 @@ | ||
name: PR | ||
|
||
on: | ||
pull_request: | ||
types: [labeled, unlabeled, opened, reopened, synchronize] | ||
|
||
jobs: | ||
semver-label-check: | ||
name: Semantic version label check | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 1 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- name: Check for Semantic Version label | ||
uses: apple/swift-nio/.github/actions/pull_request_semver_label_checker@main |
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,37 @@ | ||
name: Soundness | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
swift-license-check: | ||
name: Swift license headers check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- name: Mark the workspace as safe | ||
run: git config --global --add safe.directory ${GITHUB_WORKSPACE} | ||
- name: Run license check | ||
run: | | ||
./dev/license-check.sh | ||
check-generated-code: | ||
name: Check generated code | ||
runs-on: ubuntu-latest | ||
container: | ||
image: swift:latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- name: Mark the workspace as safe | ||
run: git config --global --add safe.directory ${GITHUB_WORKSPACE} | ||
- name: Install protoc | ||
run: apt update && apt install -y protobuf-compiler | ||
- name: Run soundness checks | ||
run: | | ||
./dev/check-generated-code.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,13 @@ | ||
@@ Copyright YEARS, gRPC Authors All rights reserved. | ||
@@ | ||
@@ Licensed under the Apache License, Version 2.0 (the "License"); | ||
@@ you may not use this file except in compliance with the License. | ||
@@ You may obtain a copy of the License at | ||
@@ | ||
@@ http://www.apache.org/licenses/LICENSE-2.0 | ||
@@ | ||
@@ Unless required by applicable law or agreed to in writing, software | ||
@@ distributed under the License is distributed on an "AS IS" BASIS, | ||
@@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
@@ See the License for the specific language governing permissions and | ||
@@ limitations under the License. |
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,41 @@ | ||
.gitignore | ||
**/.gitignore | ||
.licenseignore | ||
.gitattributes | ||
.git-blame-ignore-revs | ||
.gitmodules | ||
.mailfilter | ||
.mailmap | ||
.spi.yml | ||
.swift-format | ||
.swiftformatignore | ||
.editorconfig | ||
.github/* | ||
*.md | ||
*.txt | ||
*.yml | ||
*.yaml | ||
*.json | ||
Package.swift | ||
**/Package.swift | ||
Package@-*.swift | ||
**/Package@-*.swift | ||
Package.resolved | ||
**/Package.resolved | ||
Makefile | ||
*.modulemap | ||
**/*.modulemap | ||
**/*.docc/* | ||
*.xcprivacy | ||
**/*.xcprivacy | ||
*.symlink | ||
**/*.symlink | ||
Dockerfile | ||
**/Dockerfile | ||
Snippets/* | ||
dev/git.commit.template | ||
dev/version-bump.commit.template | ||
.unacceptablelanguageignore | ||
LICENSE | ||
**/*.swift | ||
dev/protos/**/*.proto |
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 @@ | ||
*.grpc.swift | ||
*.pb.swift |
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,4 @@ | ||
**/*.pb.swift | ||
**/*.gprc.swift | ||
./Sources/GRPCHealthService/Generated/* | ||
./Sources/GRPCInteropTests/Generated/* |
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
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
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
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
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
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
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
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
Oops, something went wrong.