Skip to content

Commit

Permalink
ci: add a check for carthage build command
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjl-mux committed Oct 30, 2023
1 parent 4b1f0d5 commit 954f1fa
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/validate-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ jobs:
uses: actions/checkout@v3
- name: "Validate Podspec"
run: "scripts/validate-podspec.sh"
validate-carthage:
name: Validate Carthage
runs-on: macos-13
steps:
- name: Install xcbeautify
run: brew install xcbeautify
- name: Checkout
uses: actions/checkout@v3
- name: "Validate Carthage Build"
run: "scripts/validate-carthage.sh"
unit-test-ventura:
runs-on: macos-13
name: Complete Unit Test Pass on macOS Ventura
Expand Down
11 changes: 11 additions & 0 deletions scripts/validate-carthage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set -euo pipefail

carthage build --no-skip-current --use-xcframeworks

if [[ $? == 0 ]]; then
echo "▸ Successfully build Carthage XCFramework artifact"
else
echo -e "\033[1;31m ERROR: Failed to build Carthage XCFramework artifact \033[0m"
exit 1
fi

0 comments on commit 954f1fa

Please sign in to comment.