Skip to content

Commit 2fd9cde

Browse files
Add reusable workflows
1 parent a4fffe3 commit 2fd9cde

File tree

3 files changed

+70
-0
lines changed

3 files changed

+70
-0
lines changed

.github/workflows/main.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Main
2+
3+
on:
4+
push:
5+
branches: [main]
6+
schedule:
7+
- cron: "0 8,20 * * *"
8+
9+
jobs:
10+
unit-tests:
11+
name: Unit tests
12+
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
13+
with:
14+
linux_5_9_arguments_override: "-Xswiftc -warnings-as-errors -Xswiftc -strict-concurrency=complete --explicit-target-dependency-import-check error"
15+
# Disable strict concurrency checking as it intersects badly with
16+
# warnings-as-errors on 5.10 and later as SwiftPMs generated test manifest
17+
# has a non-sendable global property.
18+
linux_5_10_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
19+
# TODO: Enable warnings-as-errors on 6.0.
20+
linux_6_0_arguments_override: "-Xswiftc -strict-concurrency=complete --explicit-target-dependency-import-check error"
21+
linux_nightly_6_0_arguments_override: "-Xswiftc -strict-concurrency=complete --explicit-target-dependency-import-check error"
22+
linux_nightly_main_arguments_override: "-Xswiftc -strict-concurrency=complete --explicit-target-dependency-import-check error"

.github/workflows/pull_request.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: PR
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, synchronize]
6+
7+
jobs:
8+
soundness:
9+
name: Soundness
10+
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
11+
with:
12+
license_header_check_project_name: "SwiftOpenAPIGenerator"
13+
14+
unit-tests:
15+
name: Unit tests
16+
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
17+
with:
18+
linux_5_9_arguments_override: "-Xswiftc -warnings-as-errors -Xswiftc -strict-concurrency=complete --explicit-target-dependency-import-check error"
19+
# Disable strict concurrency checking as it intersects badly with
20+
# warnings-as-errors on 5.10 and later as SwiftPMs generated test manifest
21+
# has a non-sendable global property.
22+
linux_5_10_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
23+
# TODO: Enable warnings-as-errors on 6.0.
24+
linux_6_0_arguments_override: "-Xswiftc -strict-concurrency=complete --explicit-target-dependency-import-check error"
25+
linux_nightly_6_0_arguments_override: "-Xswiftc -strict-concurrency=complete --explicit-target-dependency-import-check error"
26+
linux_nightly_main_arguments_override: "-Xswiftc -strict-concurrency=complete --explicit-target-dependency-import-check error"
27+
28+
cxx-interop:
29+
name: Cxx interop
30+
uses: apple/swift-nio/.github/workflows/cxx_interop.yml@main
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: PR label
2+
3+
on:
4+
pull_request:
5+
types: [labeled, unlabeled, opened, reopened, synchronize]
6+
7+
jobs:
8+
semver-label-check:
9+
name: Semantic Version label check
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 1
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
with:
16+
persist-credentials: false
17+
- name: Check for Semantic Version label
18+
uses: apple/swift-nio/.github/actions/pull_request_semver_label_checker@main

0 commit comments

Comments
 (0)