33 Commits
Author SHA1 Message Date
dependabot[bot] b8b0487e6f Bump the swiftlang-github-workflows group with 5 updates (#546)
Bumps the swiftlang-github-workflows group with 5 updates:

| Package | From | To |
| --- | --- | --- |
|
[swiftlang/github-workflows/.github/workflows/package_test.yml](https://github.com/swiftlang/github-workflows)
| `0.0.18` | `0.0.19` |
|
[swiftlang/github-workflows/.github/workflows/benchmarks.yml](https://github.com/swiftlang/github-workflows)
| `0.0.18` | `0.0.19` |
|
[swiftlang/github-workflows/.github/workflows/cmake_build.yml](https://github.com/swiftlang/github-workflows)
| `0.0.18` | `0.0.19` |
|
[swiftlang/github-workflows/.github/workflows/soundness.yml](https://github.com/swiftlang/github-workflows)
| `0.0.18` | `0.0.19` |
|
[swiftlang/github-workflows/.github/workflows/pull_request_label.yml](https://github.com/swiftlang/github-workflows)
| `0.0.18` | `0.0.19` |

Updates `swiftlang/github-workflows/.github/workflows/package_test.yml`
from 0.0.18 to 0.0.19
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/swiftlang/github-workflows/releases">swiftlang/github-workflows/.github/workflows/package_test.yml's
releases</a>.</em></p>
<blockquote>
<h2>0.0.19</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix FreeBSD VM memory input name by <a
href="https://github.com/plemarquand"><code>@​plemarquand</code></a> in
<a
href="https://redirect.github.com/swiftlang/github-workflows/pull/357">swiftlang/github-workflows#357</a></li>
<li>Run the matrix generator from a cached Swift package build by <a
href="https://github.com/rnro"><code>@​rnro</code></a> in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/359">swiftlang/github-workflows#359</a></li>
<li>Update default Swiftly toolchain to Xcode 27 - Swift 6.4 by <a
href="https://github.com/shahmishal"><code>@​shahmishal</code></a> in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/360">swiftlang/github-workflows#360</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/swiftlang/github-workflows/compare/0.0.18...0.0.19">https://github.com/swiftlang/github-workflows/compare/0.0.18...0.0.19</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/e8b910942e79fb2c0654a87804d8f16e2304285c"><code>e8b9109</code></a>
Update default Swiftly toolchain to Xcode 27 - Swift 6.4 (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/360">#360</a>)</li>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/3ecd15a08c57fadad2843baeaf9a64d19ac1cbaf"><code>3ecd15a</code></a>
Run the matrix generator from a cached Swift package build (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/359">#359</a>)</li>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/27048f599db8efd1d67ccc22a99e7c2a7dced6a5"><code>27048f5</code></a>
Fix FreeBSD VM memory input name (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/357">#357</a>)</li>
<li>See full diff in <a
href="https://github.com/swiftlang/github-workflows/compare/0.0.18...0.0.19">compare
view</a></li>
</ul>
</details>
<br />

Updates `swiftlang/github-workflows/.github/workflows/benchmarks.yml`
from 0.0.18 to 0.0.19
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/swiftlang/github-workflows/releases">swiftlang/github-workflows/.github/workflows/benchmarks.yml's
releases</a>.</em></p>
<blockquote>
<h2>0.0.19</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix FreeBSD VM memory input name by <a
href="https://github.com/plemarquand"><code>@​plemarquand</code></a> in
<a
href="https://redirect.github.com/swiftlang/github-workflows/pull/357">swiftlang/github-workflows#357</a></li>
<li>Run the matrix generator from a cached Swift package build by <a
href="https://github.com/rnro"><code>@​rnro</code></a> in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/359">swiftlang/github-workflows#359</a></li>
<li>Update default Swiftly toolchain to Xcode 27 - Swift 6.4 by <a
href="https://github.com/shahmishal"><code>@​shahmishal</code></a> in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/360">swiftlang/github-workflows#360</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/swiftlang/github-workflows/compare/0.0.18...0.0.19">https://github.com/swiftlang/github-workflows/compare/0.0.18...0.0.19</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/e8b910942e79fb2c0654a87804d8f16e2304285c"><code>e8b9109</code></a>
Update default Swiftly toolchain to Xcode 27 - Swift 6.4 (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/360">#360</a>)</li>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/3ecd15a08c57fadad2843baeaf9a64d19ac1cbaf"><code>3ecd15a</code></a>
Run the matrix generator from a cached Swift package build (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/359">#359</a>)</li>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/27048f599db8efd1d67ccc22a99e7c2a7dced6a5"><code>27048f5</code></a>
Fix FreeBSD VM memory input name (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/357">#357</a>)</li>
<li>See full diff in <a
href="https://github.com/swiftlang/github-workflows/compare/0.0.18...0.0.19">compare
view</a></li>
</ul>
</details>
<br />

Updates `swiftlang/github-workflows/.github/workflows/cmake_build.yml`
from 0.0.18 to 0.0.19
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/swiftlang/github-workflows/releases">swiftlang/github-workflows/.github/workflows/cmake_build.yml's
releases</a>.</em></p>
<blockquote>
<h2>0.0.19</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix FreeBSD VM memory input name by <a
href="https://github.com/plemarquand"><code>@​plemarquand</code></a> in
<a
href="https://redirect.github.com/swiftlang/github-workflows/pull/357">swiftlang/github-workflows#357</a></li>
<li>Run the matrix generator from a cached Swift package build by <a
href="https://github.com/rnro"><code>@​rnro</code></a> in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/359">swiftlang/github-workflows#359</a></li>
<li>Update default Swiftly toolchain to Xcode 27 - Swift 6.4 by <a
href="https://github.com/shahmishal"><code>@​shahmishal</code></a> in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/360">swiftlang/github-workflows#360</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/swiftlang/github-workflows/compare/0.0.18...0.0.19">https://github.com/swiftlang/github-workflows/compare/0.0.18...0.0.19</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/e8b910942e79fb2c0654a87804d8f16e2304285c"><code>e8b9109</code></a>
Update default Swiftly toolchain to Xcode 27 - Swift 6.4 (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/360">#360</a>)</li>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/3ecd15a08c57fadad2843baeaf9a64d19ac1cbaf"><code>3ecd15a</code></a>
Run the matrix generator from a cached Swift package build (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/359">#359</a>)</li>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/27048f599db8efd1d67ccc22a99e7c2a7dced6a5"><code>27048f5</code></a>
Fix FreeBSD VM memory input name (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/357">#357</a>)</li>
<li>See full diff in <a
href="https://github.com/swiftlang/github-workflows/compare/0.0.18...0.0.19">compare
view</a></li>
</ul>
</details>
<br />

Updates `swiftlang/github-workflows/.github/workflows/soundness.yml`
from 0.0.18 to 0.0.19
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/swiftlang/github-workflows/releases">swiftlang/github-workflows/.github/workflows/soundness.yml's
releases</a>.</em></p>
<blockquote>
<h2>0.0.19</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix FreeBSD VM memory input name by <a
href="https://github.com/plemarquand"><code>@​plemarquand</code></a> in
<a
href="https://redirect.github.com/swiftlang/github-workflows/pull/357">swiftlang/github-workflows#357</a></li>
<li>Run the matrix generator from a cached Swift package build by <a
href="https://github.com/rnro"><code>@​rnro</code></a> in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/359">swiftlang/github-workflows#359</a></li>
<li>Update default Swiftly toolchain to Xcode 27 - Swift 6.4 by <a
href="https://github.com/shahmishal"><code>@​shahmishal</code></a> in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/360">swiftlang/github-workflows#360</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/swiftlang/github-workflows/compare/0.0.18...0.0.19">https://github.com/swiftlang/github-workflows/compare/0.0.18...0.0.19</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/e8b910942e79fb2c0654a87804d8f16e2304285c"><code>e8b9109</code></a>
Update default Swiftly toolchain to Xcode 27 - Swift 6.4 (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/360">#360</a>)</li>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/3ecd15a08c57fadad2843baeaf9a64d19ac1cbaf"><code>3ecd15a</code></a>
Run the matrix generator from a cached Swift package build (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/359">#359</a>)</li>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/27048f599db8efd1d67ccc22a99e7c2a7dced6a5"><code>27048f5</code></a>
Fix FreeBSD VM memory input name (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/357">#357</a>)</li>
<li>See full diff in <a
href="https://github.com/swiftlang/github-workflows/compare/0.0.18...0.0.19">compare
view</a></li>
</ul>
</details>
<br />

Updates
`swiftlang/github-workflows/.github/workflows/pull_request_label.yml`
from 0.0.18 to 0.0.19
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/swiftlang/github-workflows/releases">swiftlang/github-workflows/.github/workflows/pull_request_label.yml's
releases</a>.</em></p>
<blockquote>
<h2>0.0.19</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix FreeBSD VM memory input name by <a
href="https://github.com/plemarquand"><code>@​plemarquand</code></a> in
<a
href="https://redirect.github.com/swiftlang/github-workflows/pull/357">swiftlang/github-workflows#357</a></li>
<li>Run the matrix generator from a cached Swift package build by <a
href="https://github.com/rnro"><code>@​rnro</code></a> in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/359">swiftlang/github-workflows#359</a></li>
<li>Update default Swiftly toolchain to Xcode 27 - Swift 6.4 by <a
href="https://github.com/shahmishal"><code>@​shahmishal</code></a> in <a
href="https://redirect.github.com/swiftlang/github-workflows/pull/360">swiftlang/github-workflows#360</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/swiftlang/github-workflows/compare/0.0.18...0.0.19">https://github.com/swiftlang/github-workflows/compare/0.0.18...0.0.19</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/e8b910942e79fb2c0654a87804d8f16e2304285c"><code>e8b9109</code></a>
Update default Swiftly toolchain to Xcode 27 - Swift 6.4 (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/360">#360</a>)</li>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/3ecd15a08c57fadad2843baeaf9a64d19ac1cbaf"><code>3ecd15a</code></a>
Run the matrix generator from a cached Swift package build (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/359">#359</a>)</li>
<li><a
href="https://github.com/swiftlang/github-workflows/commit/27048f599db8efd1d67ccc22a99e7c2a7dced6a5"><code>27048f5</code></a>
Fix FreeBSD VM memory input name (<a
href="https://redirect.github.com/swiftlang/github-workflows/issues/357">#357</a>)</li>
<li>See full diff in <a
href="https://github.com/swiftlang/github-workflows/compare/0.0.18...0.0.19">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-24 17:54:53 +09:00
Vladimir Kukushkin 47655e0c23 Adopt /swiftlang CI workflows (#536)
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
2026-11-19 15:36:41 +00:00
Vladimir Kukushkin c581740960 Add Swift 6.4 and disable 6.1 in CI configuration (#517)
Add Swift 6.4 and disable 6.1 in CI configuration.
2026-10-01 13:13:54 +02:00
Honza Dvorsky 172948a4b5 Disable simulator testing due to instability (#505)
### Motivation:

Unblock nightly CI runs on main by disabling non-macOS Apple platform
simulator testing due to instability.

### Modifications:

Disabled that CI for now. We'll re-enable when we can make it pass
reliably.

### Result:

Bring nightly CI back to green.
2026-09-03 16:56:49 +00:00
Vladimir Kukushkin e3b5d65fc9 Enable Xcode tests (#473)
Simulators seem to have stabilized in CI, we can enabled the tests.

### Motivation:

`swift-log` is expected to be used on various platforms, we should run
tests against them.

### Modifications:

- Run tests on various tests in simulators in PRs and nightly.
- Fix tests to actually compile there.

### Result:

Tests are now running in simulators. Supersedes #431.
2026-06-24 13:42:03 +02:00
Rick Newton-Rogers a012e0ad8a Adopt multi-package macOS benchmarks workflow (#466)
### Motivation

* The two-invocation pattern for `macos-benchmarks` and
`macos-benchmarks-MaxLogLevelWarningBenchmarks-trait` allocates one
self-hosted macOS runner per (Swift version x package), incurring
duplicate runner-recycling cost.
* The recent change on main adds a `benchmark_package_paths` input
letting a single invocation run all packages serially on each runner.

### Modifications

* Replace the two macOS benchmark jobs in `main.yml` and
`pull_request.yml` with a single consolidated job that passes both
packages via `benchmark_package_paths: '["Benchmarks/NoTraits",
"Benchmarks/MaxLogLevelWarning"]'`.
* Drop Swift 6.2 from the matrix; only Swift 6.3 is shared between the
two packages (`MaxLogLevelWarning` has no `Thresholds/Xcode swift
6.2/`).

### Result

* One macOS runner allocation per Swift version instead of one per
(version x package).
* `NoTraits` loses Swift 6.2 coverage
2026-05-21 14:21:31 +00:00
Rick Newton-Rogers 1069d31898 Skip handler dispatch for setters under MaxLogLevelNone (#465)
Skip handler dispatch for setters under `MaxLogLevelNone`

 ### Motivation

* When `MaxLogLevelNone` is enabled every
`Logger.trace`/`debug`/.../`critical` method and `Logger.log(level:)`
compiles down to an empty body, so no log statement can ever observe
what the underlying `LogHandler` sees.
* Despite this, the `subscript(metadataKey:)` and `logLevel` setters
still went through the handler. Code like `logger[metadataKey:
"user-id"] = "\(id)"` would CoW the logger storage and call into the
handler even though nothing could read the metadata back out via a log
statement.

### Modifications

* Wrap the bodies of `Logger.subscript(metadataKey:) { set }` and
`Logger.logLevel { set }` in `#if !MaxLogLevelNone`, mirroring the
existing guards on the level-specific log methods.
* Note this behaviour in `DisableLogLevelsDuringCompilation.md` so
callers know reads still go through the handler but writes do not.
* Add a new benchmark which ensures that the operations don't allocate.
* Update some missed swift-tools-version bumps.
* Loosen p90 instruction threshold to 10%. The same source produces
results that swing by up to ~8% between back-to-back runs.
### Result

* `logger[metadataKey:] = ...` and `logger.logLevel = ...` compile to
empty bodies when `MaxLogLevelNone` is set, matching the
zero-runtime-overhead guarantee the trait already provides for log
emission.
* Resolves https://github.com/apple/swift-log/issues/462
2026-05-21 13:55:40 +01:00
Vladimir Kukushkin 3061a62b6d Shared workflows changed from Xcode XX.X to Xcode swift X.X (#461)
Benchmark thresholds should now be at a different path after switching
to `MACOS_SWIFT_6_1_ENABLED` and `MACOS_SWIFT_6_2_ENABLED`.
2026-05-19 13:40:04 +02:00
Rick Newton-Rogers 184c73762f Migrate macOS CI to Swift version inputs (#457)
### Motivation

* The shared `macos_tests.yml` and `macos_benchmarks.yml` workflows
support requesting Xcodes by Swift version with symlinks on the runners
owning the mapping. This more directly expresses the library support
window.
* Older Xcodes (26.1 and below) are being removed from the runners.

### Modifications

* Replace `macos_xcode_16_4_enabled` and `macos_xcode_26_1_enabled` with
`macos_swift_6_1_enabled` and `macos_swift_6_2_enabled` in benchmark
jobs.
* Remove now-redundant explicit `xcode_*_enabled: false` and
`swift_*_enabled: true` overrides from the `macos-tests` job in
`main.yml` (these now match the workflow defaults).

### Result

* macOS CI requests toolchains by Swift version, decoupling the
workflows from specific Xcode release names.
2026-05-15 10:42:48 +01:00
Vladimir Kukushkin ac3646e5e0 Disable nightly 6.3 WASM builds (#454)
Disable nightly WASM builds because 6.3 images are no longer available.
Enable back when 6.4 builds are available.
2026-05-01 14:04:06 +01:00
Rick Newton-Rogers bffceaf778 Drop Swift 6.0 (#436)
Motivation:

Swift 6.0 is no longer supported, we should bump the tools version and
remove it from our CI.

Modifications:

* Bump the Swift tools version to Swift 6.1
* Remove Swift 6.0 jobs where appropriate in main.yml, pull_request.yml

Result:

Code reflects our support window.
2026-04-08 14:52:39 +01:00
Rick Newton-Rogers 7c04f86fba Enable Swift 6.3 jobs in CI (#435)
Motivation:

Swift 6.3 has been released, we should add it to our CI coverage.

Modifications:

Add additional Swift 6.3 jobs where appropriate in main.yml,
pull_request.yml

Result:

Improved test coverage.
2026-04-01 14:18:23 +01:00
Honza Dvorsky 39e14910f6 [CI] Disable Darwin tests while we investigate flakiness (#430)
### Motivation:

Darwin tests got enabled recently to test out reliability, unfortunately
they're flaky so let's disable them for now and I'll open a test PR
where we can iterate on them instead.

### Modifications:

Disabled Darwin test runs on nightly jobs.

### Result:

More reliable CI again.
2026-03-24 11:29:03 +00:00
Vladimir Kukushkin 63ee499927 Enable tests on simulators (#429) 2026-03-20 22:06:35 +00:00
Vladimir Kukushkin f22537f94d Do not run benchmarks on linux, we can’t collect anything anyway (#415)
`swift-nio` reusable workflow for running benchmarks has been recently
fixed and now linux benchmarks are failing because we do not have any
thresholds recorded. The main purpose for `swift-log` benchmarks is to
keep track of the amount of instructions and on linux runners
performance metrics are not available, so we cannot check the relevant
metric. Let's remove them.
2026-02-17 18:51:49 +00:00
Vladimir Kukushkin 1ccd2c5a27 [SLG-0002] Implementation: Compile-time log level elimination using traits (#389)
Add compile-time traits for eliminating log levels from binaries

###  Motivation:

Applications often know in advance which log levels will never be needed
in production. For example, a production service might only need warning
and above, while trace and debug levels are only useful during
development. This PR introduces
compile-time traits that completely eliminate unwanted log levels from
binaries, achieving zero runtime overhead for disabled log statements.

### Modifications:

- Added seven `MaxLogLevel*` traits
- Extended benchmarks with the `MaxLogLevelWarning` suite
- Added "Disable log levels during compilation" section to the best
practices guide

### Result:

Users can eliminate unwanted log levels at compile time by specifying
traits in their `Package.swift` dependency declaration.
2026-01-13 14:23:51 +00:00
Vladimir Kukushkin 6856e42a3f Adapt separate benchmark workflows from swift-nio (#396)
Depends on https://github.com/apple/swift-nio/pull/3461, which is not
yet merged

### Motivation:

`swift-nio` now has 2 separate workflows for running benchmarks on Linux
and macOS to remove unnecessary noise of skipped macOS benchmarks, see
[`swift-nio` PR](https://github.com/apple/swift-nio/pull/3461) for
details.

### Modifications:

Split Linux and macOS benchmarks into different jobs.

### Result:

Linux and macOS benchmarks are running as different jobs.
2025-12-11 12:47:43 +01:00
Max DesiatovandKonrad `ktoso` Malawski 63eaca6f4d Add Wasm builds to pull_request.yml (#371)
Co-authored-by: Konrad `ktoso` Malawski <konrad_malawski@apple.com>
2025-12-04 19:02:45 +09:00
Max Desiatov f3a82f1119 Fix Android build error with @preconcurrency import Android (#393) 2025-12-04 08:33:10 +09:00
hamzahrmalikandFranz Busch ca538143e2 Add an InMemoryLogHandler (#390)
Add an InMemoryLogHandler

### Motivation:

Library maintainers should be able to test that their libraries log what
they expect

### Modifications:

Create a new InMemoryLogging product, which contains an
InMemoryLogHandler

This log handler can be used to make a logger, pass the logger into some
function, and then assert that logs were emitted.

See the tests for example usage

### Future:

For now i have left this very bare-bones. We could in future add
convenience functions. For example
- a function to assert that a particular log message was logged
- a static function to create a logger with this handler

---------

Co-authored-by: Franz Busch <privat@franz-busch.de>
2025-12-02 13:52:42 +01:00
Vladimir Kukushkin 95a70b954c Logging instructions and allocations benchmarks (#386)
Add simple benchmarks measuring instructions count and allocations when
logging with various log levels.

### Motivation:

Establish the baseline and have automated checks before approaching
performance improvements.

### Modifications:

- Dependency on https://github.com/ordo-one/package-benchmark added
- A new `Benchmarks` sub-package is added
- CI workflows now run benchmarks

### Result:

- CI workflows are running benchmarks on Linux and macOS
- Thresholds are recorded and verified only on macOS

An example of a benchmark failing with a **better** results than
expected:
https://github.com/apple/swift-log/actions/runs/19540944353/job/55950355442

An example of a benchmark failing with a **worse** results than
expected:
https://github.com/apple/swift-log/actions/runs/19569105729/job/56038101552
2025-11-24 11:05:48 +00:00
Vladimir KukushkinandHonza Dvorsky 2a4139ef2a Drop Swift 5.9 and 5.10 support (#383)
Make Swift 6.0 the minimum support version.

### Motivation:

`swift-log` supports 3 latest Swift releases, which is at this point
6.0, 6.1 and 6.2. Swift 5 is no longer supported.

### Modifications:

- Package.swift swift tools
- CI configs
- Imports checking if compiler is <6.0

### Result:

Swift 5 is no longer supported.

Co-authored-by: Honza Dvorsky <honza@apple.com>
2025-10-23 09:22:00 +01:00
Rick Newton-Rogers bd44c73045 Enable Swift 6.2 jobs in CI (#373)
Motivation:

Swift 6.2 has been released, we should add it to our CI coverage.

Modifications:

Add additional Swift 6.2 jobs where appropriate in main.yml,
pull_request.yml

Result:

Improved test coverage.
2025-10-22 16:52:26 +02:00
Melissa Kilby 45b82c6e24 chore: restrict GitHub workflow permissions - future-proof (#379)
See https://github.com/swiftlang/github-workflows/issues/167 for
additional context

This approach aligns with security best practices, as detailed in the
following documentation:

-
https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions
-
https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#defining-access-for-the-github_token-scopes
-
https://openssf.org/blog/2024/08/12/mitigating-attack-vectors-in-github-workflows/


The default GITHUB_TOKEN permissions are defined at the repository
level. This PR modifies the workflow-level overrides to conform to
OpenSSF best practices -> defense in depth.

Allow me to quote OpenSSF:

https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

> The highest score is awarded when the permissions definitions in each
workflow's yaml file are set as read-only at the top level and the
required write permissions are declared at the run-level.”

> Remediation steps
> - Set top-level permissions as read-all or contents: read as described
in GitHub's documentation.
> - Set any required write permissions at the job-level. Only set the
permissions required for that job; do not set permissions: write-all at
the job level.


Compare to the LLVM project:

Top-level: contents read, e.g.
https://github.com/swiftlang/llvm-project/blob/next/.github/workflows/build-ci-container-windows.yml#L3-L4
-> this makes it future-proof

Job-level: Allow write permissions as needed, e.g.
https://github.com/swiftlang/llvm-project/blob/next/.github/workflows/build-ci-container-windows.yml#L53-L58

Signed-off-by: Melissa Kilby <mkilby@apple.com>
2025-10-20 16:14:09 +02:00
Raphael 21d132f1ca Enable release mode builds (#368)
### Motivation:

Some errors do not show up in debug builds. Enabling release mode builds
improves the CI coverage.

### Modifications:

Enable release mode builds for pull requests and scheduled builds on
main.

### Result:

Improved CI coverage.
2025-07-30 08:34:12 +02:00
Rick Newton-Rogers 81d3d07f14 Enable Swift 6.1 jobs in CI (#359)
Motivation:

Swift 6.1 has been released, we should add it to our CI coverage.

Modifications:

Add additional Swift 6.1 jobs where appropriate in main.yml,
pull_request.yml

Result:

Improved test coverage.
2025-04-14 12:15:58 +02:00
Rick Newton-Rogers 09c99dd25a Add static SDK CI workflow (#355)
Add static SDK CI workflow which runs on commits to PRs, merges to main
and daily on main.
2025-04-02 13:41:15 +00:00
Rick Newton-Rogers 765db8bc47 Enable macOS CI on pull requests (#358)
Motivation:

* Improve test coverage

Modifications:

Enable macOS CI to be run on pull request commits and make the use of
the nightly runner pool for main.yml jobs explicit.

Result:

Improved test coverage.
2025-04-01 12:25:50 +02:00
Rick Newton-Rogers 222bf1b48b Enable macOS CI on merge to main and daily timer (#357)
Motivation:

* Improve test coverage
* Check test pass/fail status
* Monitor CI throughput

Modifications:

Enable macOS CI to be run on all merges to main and on a daily timer.

Result:

Improved test coverage run out-of-band at the moment so we can get a
feeling for if any changes need to be made in the repo or in the CI
pipelines to ensure timely and stable checks.
2025-03-31 13:29:37 +01:00
Rick Newton-Rogers 2dd04b00f4 Rename nightly_6_1 params to nightly_next (#352)
Rename nightly_6_1 params to nightly_next; see
https://github.com/apple/swift-nio/pull/3122
2025-03-04 10:38:13 +00:00
Rick Newton-Rogers 770059c51d CI use 6.1 nightlies (#348)
CI use 6.1 nightlies now that Swift development is happening in the 6.1
branch
2025-01-31 09:58:02 +00:00
Honza Dvorsky 960b23e33f Enable strict concurrency (#342) 2024-11-29 23:27:51 +01:00
Franz Busch ee1bfd3f47 [CI] Migrate to GHA (#328)
# Motivation

We want to modernize our CI.

# Modification

This PR migrates to GH actions and turns on all the right flags.

# Result

Modern CI.
2024-10-30 13:17:15 +00:00