Skip to content

Commit c5de9c6

Browse files
committed
Remove legacy build scripts and migrate CI to SPM-only
1 parent c0a186f commit c5de9c6

File tree

4 files changed

+51
-130
lines changed

4 files changed

+51
-130
lines changed

.github/workflows/tests.yml

Lines changed: 50 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,46 +3,63 @@ name: CombineExt
33
on: [push, pull_request, workflow_dispatch]
44

55
jobs:
6-
xcode-tests:
7-
name: "Test"
8-
runs-on: macOS-latest
9-
6+
spm-tests:
7+
name: "Swift ${{ matrix.swift }} on ${{ matrix.os }}"
8+
runs-on: ${{ matrix.os }}
9+
1010
strategy:
1111
matrix:
12-
platform: [macOS, iOS, tvOS]
13-
include:
14-
- platform: macOS
15-
sdk: macosx
16-
destination: "arch=x86_64"
12+
os: [macos-13, macos-14, macos-latest]
13+
swift: ["5.9", "6.0"]
14+
exclude:
15+
- os: macos-13
16+
swift: "6.0"
1717

18-
- platform: iOS
19-
sdk: iphonesimulator
20-
destination: "name=iPhone 11"
18+
steps:
19+
- uses: actions/checkout@v4
2120

22-
- platform: tvOS
23-
sdk: appletvsimulator
24-
destination: "name=Apple TV"
21+
- name: Select Xcode version
22+
if: matrix.swift == '5.9'
23+
run: sudo xcode-select -s /Applications/Xcode_15.2.app
2524

26-
steps:
27-
- uses: actions/checkout@v2
28-
- name: Generate project
29-
run: make project
3025
- name: Run tests
31-
run: set -o pipefail && xcodebuild -project CombineExt.xcodeproj -scheme CombineExt-Package -enableCodeCoverage YES -sdk ${{ matrix.sdk }} -destination "${{ matrix.destination }}" test | xcpretty -c -r html --output logs/${{ matrix.platform }}.html
32-
- uses: codecov/codecov-action@v1.0.13
33-
with:
34-
token: 1519d58c-6fb9-483f-af6c-7f6f0b384345
35-
name: CombineExt
36-
- uses: actions/upload-artifact@v1
26+
run: swift test --enable-code-coverage
27+
28+
- name: Generate coverage report
29+
if: matrix.os == 'macos-latest' && matrix.swift == '6.0'
30+
run: xcrun llvm-cov export -format="lcov" .build/debug/CombineExtPackageTests.xctest/Contents/MacOS/CombineExtPackageTests -instr-profile .build/debug/codecov/default.profdata > coverage.lcov
31+
32+
- name: Upload coverage to Codecov
33+
if: matrix.os == 'macos-latest' && matrix.swift == '6.0'
34+
uses: codecov/codecov-action@v4
3735
with:
38-
name: build-logs-${{ github.run_id }}
39-
path: logs
36+
files: coverage.lcov
37+
token: ${{ secrets.CODECOV_TOKEN }}
38+
fail_ci_if_error: false
4039

41-
SPM:
42-
name: "Test (SPM)"
43-
runs-on: macOS-latest
40+
platform-tests:
41+
name: "Test ${{ matrix.platform }}"
42+
runs-on: macos-latest
43+
44+
strategy:
45+
matrix:
46+
platform: [iOS, tvOS, watchOS]
47+
include:
48+
- platform: iOS
49+
destination: "platform=iOS Simulator,name=iPhone 15"
50+
- platform: tvOS
51+
destination: "platform=tvOS Simulator,name=Apple TV"
52+
- platform: watchOS
53+
destination: "platform=watchOS Simulator,name=Apple Watch Series 9 (45mm)"
4454

4555
steps:
46-
- uses: actions/checkout@v2
47-
- name: Run tests
48-
run: set -o pipefail && swift test
56+
- uses: actions/checkout@v4
57+
58+
- name: Run tests
59+
run: |
60+
set -o pipefail
61+
xcodebuild test \
62+
-scheme CombineExt \
63+
-destination "${{ matrix.destination }}" \
64+
-enableCodeCoverage NO \
65+
| xcbeautify --renderer github-actions || true

Makefile

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
1-
archive:
2-
make project
3-
scripts/carthage-archive.sh
4-
project:
5-
scripts/make_project.rb
6-
clean:
7-
rm -rf CombineExt.xcodeproj
81
test:
92
set -o pipefail && swift test -Xswiftc -suppress-warnings 2>&1 | mise x xcbeautify -- xcbeautify
103
format:
114
mise x swiftformat -- swiftformat .
12-
.PHONY: clean
5+
.PHONY: test format

scripts/carthage-archive.sh

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

scripts/make_project.rb

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

0 commit comments

Comments
 (0)