Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Switch to reusable soundness #2913

Merged
merged 1 commit into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions .github/actions/pull_request_semver_label_checker/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ name: 'Pull request Semantic Version label checker'
description: 'Checks that at least one Semantic Version label is applied to the pull request'

inputs:
token:
description: 'A GitHub token'
type: string
default: ${{ github.token }}
token:
description: 'A GitHub token'
type: string
default: ${{ github.token }}

runs:
using: "composite"
steps:
- name: Check labels
shell: bash
env:
GH_TOKEN: ${{ inputs.token }}
run: |
gh pr view ${{ github.event.number }} --repo ${{ github.repository }} --json labels \
| jq -e '[.labels[].name] | any(. == "semver/major" or . == "semver/minor" or . == "semver/patch" or . == "semver/none")'
using: "composite"
steps:
- name: Check labels
shell: bash
env:
GH_TOKEN: ${{ inputs.token }}
run: |
gh pr view ${{ github.event.number }} --repo ${{ github.repository }} --json labels \
| jq -e '[.labels[].name] | any(. == "semver/major" or . == "semver/minor" or . == "semver/patch" or . == "semver/none")'
80 changes: 40 additions & 40 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,44 @@ name: Benchmarks
on:
workflow_call:
inputs:
benchmark_package_path:
type: string
description: "Path to the directory containing the benchmarking package. Defaults to ."
default: "."
swift_package_arguments:
type: string
description: "Arguments to the switch package command invocation e.g. `--disable-sandbox`"
linux_5_8_enabled:
type: boolean
description: "Boolean to enable the Linux 5.8 Swift version matrix job. Defaults to true."
default: true
linux_5_9_enabled:
type: boolean
description: "Boolean to enable the Linux 5.9 Swift version matrix job. Defaults to true."
default: true
linux_5_10_enabled:
type: boolean
description: "Boolean to enable the Linux 5.10 Swift version matrix job. Defaults to true."
default: true
linux_nightly_6_0_enabled:
type: boolean
description: "Boolean to enable the Linux nightly 6.0 Swift version matrix job. Defaults to true."
default: true
linux_nightly_main_enabled:
type: boolean
description: "Boolean to enable the Linux nightly main Swift version matrix job. Defaults to true."
default: true
benchmark_package_path:
type: string
description: "Path to the directory containing the benchmarking package. Defaults to ."
default: "."
swift_package_arguments:
type: string
description: "Arguments to the switch package command invocation e.g. `--disable-sandbox`"
linux_5_8_enabled:
type: boolean
description: "Boolean to enable the Linux 5.8 Swift version matrix job. Defaults to true."
default: true
linux_5_9_enabled:
type: boolean
description: "Boolean to enable the Linux 5.9 Swift version matrix job. Defaults to true."
default: true
linux_5_10_enabled:
type: boolean
description: "Boolean to enable the Linux 5.10 Swift version matrix job. Defaults to true."
default: true
linux_nightly_6_0_enabled:
type: boolean
description: "Boolean to enable the Linux nightly 6.0 Swift version matrix job. Defaults to true."
default: true
linux_nightly_main_enabled:
type: boolean
description: "Boolean to enable the Linux nightly main Swift version matrix job. Defaults to true."
default: true

jobs:
benchmarks:
name: Benchmarks
# Workaround https://github.com/nektos/act/issues/1875
uses: apple/swift-nio/.github/workflows/swift_matrix.yml@main
with:
name: "Benchmarks"
matrix_linux_command: "apt-get update -y -q && apt-get install -y -q libjemalloc-dev && swift package --package-path ${{ inputs.benchmark_package_path }} ${{ inputs.swift_package_arguments }} benchmark baseline check --check-absolute-path ${{ inputs.benchmark_package_path }}/Thresholds/${SWIFT_VERSION}/"
matrix_linux_5_8_enabled: ${{ inputs.linux_5_8_enabled }}
matrix_linux_5_9_enabled: ${{ inputs.linux_5_9_enabled }}
matrix_linux_5_10_enabled: ${{ inputs.linux_5_10_enabled }}
matrix_linux_nightly_6_0_enabled: ${{ inputs.linux_nightly_6_0_enabled }}
matrix_linux_nightly_main_enabled: ${{ inputs.linux_nightly_main_enabled }}
benchmarks:
name: Benchmarks
# Workaround https://github.com/nektos/act/issues/1875
uses: apple/swift-nio/.github/workflows/swift_matrix.yml@main
with:
name: "Benchmarks"
matrix_linux_command: "apt-get update -y -q && apt-get install -y -q libjemalloc-dev && swift package --package-path ${{ inputs.benchmark_package_path }} ${{ inputs.swift_package_arguments }} benchmark baseline check --check-absolute-path ${{ inputs.benchmark_package_path }}/Thresholds/${SWIFT_VERSION}/"
matrix_linux_5_8_enabled: ${{ inputs.linux_5_8_enabled }}
matrix_linux_5_9_enabled: ${{ inputs.linux_5_9_enabled }}
matrix_linux_5_10_enabled: ${{ inputs.linux_5_10_enabled }}
matrix_linux_nightly_6_0_enabled: ${{ inputs.linux_nightly_6_0_enabled }}
matrix_linux_nightly_main_enabled: ${{ inputs.linux_nightly_main_enabled }}
66 changes: 33 additions & 33 deletions .github/workflows/cxx_interop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,37 @@ name: Cxx interop
on:
workflow_call:
inputs:
linux_5_8_enabled:
type: boolean
description: "Boolean to enable the Linux 5.8 Swift version matrix job. Defaults to true."
default: true
linux_5_9_enabled:
type: boolean
description: "Boolean to enable the Linux 5.9 Swift version matrix job. Defaults to true."
default: true
linux_5_10_enabled:
type: boolean
description: "Boolean to enable the Linux 5.10 Swift version matrix job. Defaults to true."
default: true
linux_nightly_6_0_enabled:
type: boolean
description: "Boolean to enable the Linux nightly 6.0 Swift version matrix job. Defaults to true."
default: true
linux_nightly_main_enabled:
type: boolean
description: "Boolean to enable the Linux nightly main Swift version matrix job. Defaults to true."
default: true
linux_5_8_enabled:
type: boolean
description: "Boolean to enable the Linux 5.8 Swift version matrix job. Defaults to true."
default: true
linux_5_9_enabled:
type: boolean
description: "Boolean to enable the Linux 5.9 Swift version matrix job. Defaults to true."
default: true
linux_5_10_enabled:
type: boolean
description: "Boolean to enable the Linux 5.10 Swift version matrix job. Defaults to true."
default: true
linux_nightly_6_0_enabled:
type: boolean
description: "Boolean to enable the Linux nightly 6.0 Swift version matrix job. Defaults to true."
default: true
linux_nightly_main_enabled:
type: boolean
description: "Boolean to enable the Linux nightly main Swift version matrix job. Defaults to true."
default: true

jobs:
cxx-interop:
name: Cxx interop
# Workaround https://github.com/nektos/act/issues/1875
uses: apple/swift-nio/.github/workflows/swift_matrix.yml@main
with:
name: "Cxx interop"
matrix_linux_command: "apt-get update -y -q && apt-get install -y -q jq && curl -s https://raw.githubusercontent.com/apple/swift-nio/main/scripts/check-cxx-interop-compatibility.sh | bash"
matrix_linux_5_8_enabled: ${{ inputs.linux_5_8_enabled }}
matrix_linux_5_9_enabled: ${{ inputs.linux_5_9_enabled }}
matrix_linux_5_10_enabled: ${{ inputs.linux_5_10_enabled }}
matrix_linux_nightly_6_0_enabled: ${{ inputs.linux_nightly_6_0_enabled }}
matrix_linux_nightly_main_enabled: ${{ inputs.linux_nightly_main_enabled }}
cxx-interop:
name: Cxx interop
# Workaround https://github.com/nektos/act/issues/1875
uses: apple/swift-nio/.github/workflows/swift_matrix.yml@main
with:
name: "Cxx interop"
matrix_linux_command: "apt-get update -y -q && apt-get install -y -q jq && curl -s https://raw.githubusercontent.com/apple/swift-nio/main/scripts/check-cxx-interop-compatibility.sh | bash"
matrix_linux_5_8_enabled: ${{ inputs.linux_5_8_enabled }}
matrix_linux_5_9_enabled: ${{ inputs.linux_5_9_enabled }}
matrix_linux_5_10_enabled: ${{ inputs.linux_5_10_enabled }}
matrix_linux_nightly_6_0_enabled: ${{ inputs.linux_nightly_6_0_enabled }}
matrix_linux_nightly_main_enabled: ${{ inputs.linux_nightly_main_enabled }}
58 changes: 29 additions & 29 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
name: Main

on:
push:
branches: [main]
push:
branches: [main]

jobs:
unit-tests:
name: Unit tests
# Workaround https://github.com/nektos/act/issues/1875
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
with:
linux_5_8_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
linux_5_9_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
linux_5_10_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error"
linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error"
unit-tests:
name: Unit tests
# Workaround https://github.com/nektos/act/issues/1875
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
with:
linux_5_8_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
linux_5_9_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
linux_5_10_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error"
linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error"

benchmarks:
name: Benchmarks
# Workaround https://github.com/nektos/act/issues/1875
uses: apple/swift-nio/.github/workflows/benchmarks.yml@main
with:
benchmark_package_path: "Benchmarks"
benchmarks:
name: Benchmarks
# Workaround https://github.com/nektos/act/issues/1875
uses: apple/swift-nio/.github/workflows/benchmarks.yml@main
with:
benchmark_package_path: "Benchmarks"

cxx-interop:
name: Cxx interop
# Workaround https://github.com/nektos/act/issues/1875
uses: apple/swift-nio/.github/workflows/cxx_interop.yml@main
cxx-interop:
name: Cxx interop
# Workaround https://github.com/nektos/act/issues/1875
uses: apple/swift-nio/.github/workflows/cxx_interop.yml@main

integration-tests:
name: Integration Tests
# Workaround https://github.com/nektos/act/issues/1875
uses: apple/swift-nio/.github/workflows/swift_matrix.yml@main
with:
name: "Integration tests"
matrix_linux_command: "apt-get update -y -q && apt-get install -y -q lsof dnsutils netcat-openbsd net-tools curl jq && ./scripts/integration_tests.sh"
integration-tests:
name: Integration Tests
# Workaround https://github.com/nektos/act/issues/1875
uses: apple/swift-nio/.github/workflows/swift_matrix.yml@main
with:
name: "Integration tests"
matrix_linux_command: "apt-get update -y -q && apt-get install -y -q lsof dnsutils netcat-openbsd net-tools curl jq && ./scripts/integration_tests.sh"
79 changes: 40 additions & 39 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,50 @@
name: PR

on:
pull_request:
types: [opened, reopened, synchronize]
pull_request:
types: [opened, reopened, synchronize]

jobs:
soundness:
name: Soundness
# Workaround https://github.com/nektos/act/issues/1875
uses: apple/swift-nio/.github/workflows/soundness.yml@main
with:
license_header_check_project_name: "SwiftNIO"
soundness:
name: Soundness
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
with:
license_header_check_project_name: "SwiftNIO"
# We need to move to 6.0 here but have to fix the new warnings first
docs_check_container_image: "swift:5.10-noble"

unit-tests:
name: Unit tests
# Workaround https://github.com/nektos/act/issues/1875
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
with:
linux_5_8_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
linux_5_9_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
linux_5_10_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error"
linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error"
unit-tests:
name: Unit tests
# Workaround https://github.com/nektos/act/issues/1875
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
with:
linux_5_8_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
linux_5_9_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
linux_5_10_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error"
linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error"

benchmarks:
name: Benchmarks
# Workaround https://github.com/nektos/act/issues/1875
uses: apple/swift-nio/.github/workflows/benchmarks.yml@main
with:
benchmark_package_path: "Benchmarks"
benchmarks:
name: Benchmarks
# Workaround https://github.com/nektos/act/issues/1875
uses: apple/swift-nio/.github/workflows/benchmarks.yml@main
with:
benchmark_package_path: "Benchmarks"

cxx-interop:
name: Cxx interop
# Workaround https://github.com/nektos/act/issues/1875
uses: apple/swift-nio/.github/workflows/cxx_interop.yml@main
cxx-interop:
name: Cxx interop
# Workaround https://github.com/nektos/act/issues/1875
uses: apple/swift-nio/.github/workflows/cxx_interop.yml@main

integration-tests:
name: Integration Tests
# Workaround https://github.com/nektos/act/issues/1875
uses: apple/swift-nio/.github/workflows/swift_matrix.yml@main
with:
name: "Integration tests"
matrix_linux_command: "apt-get update -y -q && apt-get install -y -q lsof dnsutils netcat-openbsd net-tools curl jq && ./scripts/integration_tests.sh"
integration-tests:
name: Integration Tests
# Workaround https://github.com/nektos/act/issues/1875
uses: apple/swift-nio/.github/workflows/swift_matrix.yml@main
with:
name: "Integration tests"
matrix_linux_command: "apt-get update -y -q && apt-get install -y -q lsof dnsutils netcat-openbsd net-tools curl jq && ./scripts/integration_tests.sh"

swift-6-language-mode:
name: Swift 6 Language Mode
# Workaround https://github.com/nektos/act/issues/1875
uses: apple/swift-nio/.github/workflows/swift_6_language_mode.yml@main
swift-6-language-mode:
name: Swift 6 Language Mode
# Workaround https://github.com/nektos/act/issues/1875
uses: apple/swift-nio/.github/workflows/swift_6_language_mode.yml@main
Loading
Loading