Skip to content

Commit e48ed23

Browse files
committed
project: global refactor using ManagedCriticalState
1 parent e31495e commit e48ed23

File tree

126 files changed

+10520
-6212
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+10520
-6212
lines changed

.github/workflows/ci.yml

Lines changed: 25 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,31 @@
1-
name: Tests
1+
name: Build and test
22

33
on: [push]
44

55
jobs:
6-
iOS:
7-
name: "iOS"
8-
runs-on: macos-11
9-
steps:
10-
- uses: actions/checkout@v2
11-
- name: Generate Xcode project
12-
run: swift package generate-xcodeproj
13-
- name: Run Unit Tests
14-
run: set -o pipefail && xcodebuild -project AsyncExtensions.xcodeproj -scheme AsyncExtensions-Package -enableCodeCoverage YES -sdk iphonesimulator -destination "name=iPhone 13" test | xcpretty -c -r html --output logs/iOS.html
15-
- name: Upload code coverage to Codecov.io
16-
run: bash <(curl -s https://codecov.io/bash) -t ${{ secrets.CODECOV_IO_TOKEN }}
17-
- name: Upload build artifacts to Github
18-
uses: actions/upload-artifact@v1
19-
with:
20-
name: build-logs-${{ github.run_id }}
21-
path: logs
22-
macOS:
23-
name: "macOS"
24-
runs-on: macos-11
6+
Build:
7+
8+
runs-on: macos-12
9+
2510
steps:
26-
- uses: actions/checkout@v2
27-
- name: Generate Xcode project
28-
run: swift package generate-xcodeproj
29-
- name: Run Unit Tests
30-
run: set -o pipefail && xcodebuild -project AsyncExtensions.xcodeproj -scheme AsyncExtensions-Package -enableCodeCoverage NO -sdk macosx -destination "arch=x86_64" test | xcpretty -c -r html --output logs/macOS.html
31-
- name: Upload build artifacts to Github
32-
uses: actions/upload-artifact@v1
33-
with:
34-
name: build-logs-${{ github.run_id }}
35-
path: logs
36-
tvOS:
37-
name: "tvOS"
38-
runs-on: macos-11
11+
- name: Checkout branch
12+
uses: actions/checkout@v3
13+
- name: Build
14+
run: swift build -Xswiftc -suppress-warnings
15+
16+
Test:
17+
18+
runs-on: macos-12
19+
3920
steps:
40-
- uses: actions/checkout@v2
41-
- name: Generate Xcode project
42-
run: swift package generate-xcodeproj
43-
- name: Run Unit Tests
44-
run: set -o pipefail && xcodebuild -project AsyncExtensions.xcodeproj -scheme AsyncExtensions-Package -enableCodeCoverage NO -sdk appletvsimulator -destination "name=Apple TV" test | xcpretty -c -r html --output logs/tvOS.html
45-
- name: Upload build artifacts to Github
46-
uses: actions/upload-artifact@v1
47-
with:
48-
name: build-logs-${{ github.run_id }}
49-
path: logs
21+
- name: Checkout branch
22+
uses: actions/checkout@v3
23+
- name: Test
24+
run: swift test --enable-code-coverage -Xswiftc -suppress-warnings
25+
- name: Generate coverage
26+
uses: sersoft-gmbh/swift-coverage-action@v3
27+
id: coverage-files
28+
- name: Upload coverage
29+
uses: codecov/codecov-action@v3
30+
with:
31+
files: ${{join(fromJSON(steps.coverage-files.outputs.files), ',')}}

.github/workflows/swiftlint.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.swiftlint.yml

Lines changed: 0 additions & 94 deletions
This file was deleted.

Package.resolved

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,28 @@ let package = Package(
77
name: "AsyncExtensions",
88
platforms: [
99
.iOS(.v13),
10-
.macOS(.v11),
10+
.macOS(.v10_15),
1111
.tvOS(.v13),
1212
.watchOS(.v6)
1313
],
1414
products: [
15-
// Products define the executables and libraries a package produces, and make them visible to other packages.
1615
.library(
1716
name: "AsyncExtensions",
1817
targets: ["AsyncExtensions"]),
1918
],
20-
dependencies: [
21-
// Dependencies declare other packages that this package depends on.
22-
// .package(url: /* package url */, from: "1.0.0"),
23-
],
19+
dependencies: [.package(url: "https://github.com/apple/swift-collections.git", .upToNextMajor(from: "1.0.3"))],
2420
targets: [
25-
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
26-
// Targets can depend on other targets in this package, and on products in packages this package depends on.
2721
.target(
2822
name: "AsyncExtensions",
29-
dependencies: [],
30-
path: "Sources"),
23+
dependencies: [.product(name: "Collections", package: "swift-collections")],
24+
path: "Sources",
25+
swiftSettings: [
26+
.unsafeFlags([
27+
"-Xfrontend", "-warn-concurrency",
28+
"-Xfrontend", "-enable-actor-data-race-checks",
29+
])
30+
]
31+
),
3132
.testTarget(
3233
name: "AsyncExtensionsTests",
3334
dependencies: ["AsyncExtensions"],

0 commit comments

Comments
 (0)