Skip to content

Commit c3e3bd8

Browse files
authored
ci: replace GHA with buildkite for unit test runs and release validation (#117)
1 parent e5beb19 commit c3e3bd8

File tree

5 files changed

+26
-42
lines changed

5 files changed

+26
-42
lines changed

.buildkite/pipeline.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
agents:
2+
queue: "macOS-Monterey-12-4"
3+
4+
steps:
5+
- command: "./scripts/run-unit-tests.sh MuxUploadSDK"
6+
label: ":xcode_simulator: Unit Tests"
7+
- wait
8+
- command: "./scripts/version-check.sh"
9+
label: ":clipboard: Version Check"

.github/workflows/run-tests.yml

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

.github/workflows/validate-release.yml

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

scripts/run-unit-tests.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ then
1717
exit 1
1818
fi
1919

20-
echo "▸ Selecting Xcode 15.4"
21-
22-
sudo xcode-select -s /Applications/Xcode_15.4.app/Contents/Developer
23-
2420
echo "▸ Using Xcode Version: ${XCODE}"
2521

2622
echo "▸ Available Xcode SDKs"
@@ -40,5 +36,5 @@ echo "▸ Test ${SCHEME}"
4036
xcodebuild clean test \
4137
-scheme $SCHEME \
4238
-destination 'platform=iOS Simulator,OS=17.5,name=iPhone 15' \
43-
-sdk iphonesimulator17.5 \
39+
-sdk iphonesimulator18.0 \
4440
| xcbeautify

scripts/version-check.sh

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,26 @@ cocoapod_spec_version=$(grep -Eo '\b[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z-]+)?(\+[0
77

88
echo "Detected Cocoapod Spec Version: ${cocoapod_spec_version}"
99

10-
# Checks branch name for a v followed by a semantic version MAJOR.MINOR.PATCH string
11-
release_version=$(git branch --show-current | sed -E 's/.*v([0-9]+\.[0-9]+\.[0-9]+).*/\1/')
10+
SEMANTIC_VERSION_FILE=Sources/MuxUploadSDK/PublicAPI/SemanticVersion.swift
1211

13-
echo "Inferred Release Version: ${release_version}"
12+
release_version=$(awk '
13+
/let major/ { gsub(/[^0-9]/, "", $0); major = $0 }
14+
/let minor/ { gsub(/[^0-9]/, "", $0); minor = $0 }
15+
/let patch/ { gsub(/[^0-9]/, "", $0); patch = $0 }
16+
END {
17+
if (major && minor && patch) {
18+
print major "." minor "." patch
19+
} else {
20+
print "Error: Version information not found"
21+
}
22+
}
23+
' <(grep -E 'let major|let minor|let patch' "$SEMANTIC_VERSION_FILE"))
24+
25+
echo "Release version found in ${SEMANTIC_VERSION_FILE}: ${release_version}"
1426

1527
if [ "${cocoapod_spec_version}" == "${release_version}" ]; then
1628
echo "Versions match"
1729
else
18-
echo "Versions do not match, please update ${COCOAPOD_SPEC} to ${release_version}"
30+
echo "Versions do not match, please fix up ${COCOAPOD_SPEC} or ${release_version} to be consistent"
1931
exit 1
2032
fi

0 commit comments

Comments
 (0)