Skip to content

Commit 5fed088

Browse files
authored
Merge pull request #26 from rnro/ci-improvements
CI improvements
2 parents ca1af82 + 674a030 commit 5fed088

2 files changed

Lines changed: 64 additions & 1 deletion

File tree

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
groups:
8+
swiftlang-actions:
9+
patterns:
10+
- "swiftlang/github-workflows/*"

.github/workflows/pull_request.yml

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,62 @@ jobs:
1313
swift_nightly_flags: "--build-system native -Xswiftc -warnings-as-errors" # workaround nightly-main issue
1414
enable_macos_checks: true
1515
macos_exclude_xcode_versions: "[{\"xcode_version\": \"16.4\"}, {\"xcode_version\": \"26.3\"}]"
16+
macos_build_command: >-
17+
bash -c '
18+
rc=0;
19+
echo "=== xcodebuild macOS ===";
20+
/usr/bin/xcodebuild -quiet -scheme swift-network-evolution-Package -destination "generic/platform=macos,variant=macos" build && macos=PASSED || { rc=1; macos=FAILED; };
21+
echo "=== macOS build: $macos ===";
22+
echo "=== xcodebuild Mac Catalyst ===";
23+
/usr/bin/xcodebuild -quiet -scheme swift-network-evolution-Package -destination "generic/platform=macos,variant=Mac Catalyst" build && catalyst=PASSED || { rc=1; catalyst=FAILED; };
24+
echo "=== Mac Catalyst build: $catalyst ===";
25+
echo "=== xcodebuild iOS ===";
26+
/usr/bin/xcodebuild -quiet -scheme swift-network-evolution-Package -destination "generic/platform=ios" build && ios=PASSED || { rc=1; ios=FAILED; };
27+
echo "=== iOS build: $ios ===";
28+
echo "=== xcodebuild watchOS ===";
29+
/usr/bin/xcodebuild -quiet -scheme swift-network-evolution-Package -destination "generic/platform=watchos" build && watchos=PASSED || { rc=1; watchos=FAILED; };
30+
echo "=== watchOS build: $watchos ===";
31+
echo "=== xcodebuild tvOS ===";
32+
/usr/bin/xcodebuild -quiet -scheme swift-network-evolution-Package -destination "generic/platform=tvos" build && tvos=PASSED || { rc=1; tvos=FAILED; };
33+
echo "=== tvOS build: $tvos ===";
34+
echo "=== xcodebuild visionOS ===";
35+
/usr/bin/xcodebuild -quiet -scheme swift-network-evolution-Package -destination "generic/platform=visionos" build && visionos=PASSED || { rc=1; visionos=FAILED; };
36+
echo "=== visionOS build: $visionos ===";
37+
echo "=== xcrun swift test ===";
38+
xcrun swift test --quiet "$@" && tests=PASSED || { rc=1; tests=FAILED; };
39+
echo "=== swift test: $tests ===";
40+
echo "=== Summary ===";
41+
printf "%-20s %s\n" "macOS build:" "$macos";
42+
printf "%-20s %s\n" "Mac Catalyst build:" "$catalyst";
43+
printf "%-20s %s\n" "iOS build:" "$ios";
44+
printf "%-20s %s\n" "watchOS build:" "$watchos";
45+
printf "%-20s %s\n" "tvOS build:" "$tvos";
46+
printf "%-20s %s\n" "visionOS build:" "$visionos";
47+
printf "%-20s %s\n" "swift test:" "$tests";
48+
exit $rc
49+
' bash
1650
enable_linux_checks: true
1751
linux_swift_versions: '["nightly-main", "nightly-6.3", "6.3"]'
18-
linux_build_command: "swift test -c release"
52+
linux_build_command: >-
53+
bash -c '
54+
set -e;
55+
echo "=== Build (default traits) ===";
56+
swift build --build-tests --quiet "$@";
57+
echo "=== Build (default traits): PASSED ===";
58+
echo "=== Build (additive traits on) ===";
59+
swift build --build-tests --quiet --traits DatapathLogging,QlogOutput,SignpostOutput "$@";
60+
echo "=== Build (additive traits on): PASSED ===";
61+
echo "=== Build (reductive traits on) ===";
62+
swift build --build-tests --quiet --traits DisableDebugLogging,DisableErrorLogging "$@";
63+
echo "=== Build (reductive traits on): PASSED ===";
64+
echo "=== Test (debug) ===";
65+
swift test --quiet "$@";
66+
echo "=== Test (debug): PASSED ===";
67+
echo "=== Test (release) ===";
68+
swift test --quiet -c release "$@";
69+
echo "=== Test (release): PASSED ===";
70+
echo "=== Summary: all builds and tests passed ==="
71+
' bash
1972
enable_windows_checks: false
2073
enable_android_sdk_build: false
2174
enable_embedded_wasm_sdk_build: false

0 commit comments

Comments
 (0)