mirror of
https://github.com/apple/swift-log
synced 2026-11-22 03:40:39 +00:00
Switch from swift-nio to swiftlang CI workflows. As there is no tag yet available, let's use the latest hash for now. ### Motivation: Modernize and unify workflows with swiftlang. ### Modifications: CI configuration updated. ### Result: No swift-nio references in CI workflows. Additionally, Swift tools version triplet is now supported to unblock #534
78 lines
3.4 KiB
YAML
78 lines
3.4 KiB
YAML
name: PR
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, reopened, synchronize]
|
|
|
|
jobs:
|
|
soundness:
|
|
name: Soundness
|
|
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@0.0.18
|
|
with:
|
|
license_header_check_project_name: "Swift Logging API"
|
|
|
|
tests:
|
|
name: Tests
|
|
uses: swiftlang/github-workflows/.github/workflows/package_test.yml@0.0.18
|
|
with:
|
|
# After https://github.com/swiftlang/github-workflows/pull/362 fix is available, this can be simplified to:
|
|
# windows_command: |
|
|
# Debug-Test: swift test
|
|
# Release-Build: swift build -c release
|
|
# windows_version_overrides: |
|
|
# default: -Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable
|
|
# nightly-release: --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable
|
|
# nightly-main: --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable
|
|
windows_env_vars: '{"COMMON_SWIFT_FLAGS": "--explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"}'
|
|
windows_command: |
|
|
Debug-Test:
|
|
command: swift test -Xswiftc -warnings-as-errors %COMMON_SWIFT_FLAGS%
|
|
versions: ["current-2", "current-1", "current"]
|
|
Release-Build:
|
|
command: swift build -c release -Xswiftc -warnings-as-errors %COMMON_SWIFT_FLAGS%
|
|
versions: ["current-2", "current-1", "current"]
|
|
Debug-Test-Nightly:
|
|
command: swift test %COMMON_SWIFT_FLAGS%
|
|
versions: ["nightly-release", "nightly-main"]
|
|
Release-Build-Nightly:
|
|
command: swift build -c release %COMMON_SWIFT_FLAGS%
|
|
versions: ["nightly-release", "nightly-main"]
|
|
# The Windows runner installs a pinned Swift patch release. The container image tracks the newest patch release.
|
|
# Context: https://github.com/swiftlang/github-workflows/issues/356
|
|
windows_use_docker: true
|
|
# Strict flags for the release toolchains. The nightly toolchains skip -warnings-as-errors.
|
|
linux_version_overrides: |
|
|
default: -Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable
|
|
nightly-release: --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable
|
|
nightly-main: --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable
|
|
macos_runner_pool: general
|
|
xcode_scheme: swift-log-Package
|
|
xcode_targets: |
|
|
macOS:
|
|
build: true
|
|
test: true
|
|
wasm_sdk_versions: '["current", "nightly-main"]'
|
|
enable_embedded_wasm_sdk_build: false
|
|
enable_macos_swiftly: false
|
|
enable_freebsd: false
|
|
|
|
macos-benchmarks:
|
|
name: macOS benchmarks
|
|
uses: swiftlang/github-workflows/.github/workflows/benchmarks.yml@0.0.18
|
|
with:
|
|
benchmark_package_paths: '["Benchmarks/NoTraits", "Benchmarks/MaxLogLevelWarning", "Benchmarks/MaxLogLevelNone"]'
|
|
enable_linux: false
|
|
enable_macos: true
|
|
macos_swift_versions: '["current-1", "current"]'
|
|
macos_runner_pool: general
|
|
|
|
cmake-build:
|
|
name: CMake build
|
|
uses: swiftlang/github-workflows/.github/workflows/cmake_build.yml@0.0.18
|
|
with:
|
|
enable_windows_checks: false
|
|
linux_pre_build_command: apt-get update && apt-get install -y ninja-build
|