👷 중복된 Test Action 제거 #9
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Xcode_build_test | ||
env: | ||
PACKAGE: MSCoreKit MSFoundation MSUIKit | ||
on: | ||
push: | ||
branches: ['iOS/epic/xcode-ci'] | ||
pull_request: | ||
branches: | ||
- 'iOS/release' | ||
- 'iOS/epic/**' | ||
types: [assigned, labeled, opened, synchronize, reopened] | ||
jobs: | ||
prepare-matrix: | ||
runs-on: macos-13 | ||
env: | ||
working-directory: ./iOS | ||
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Xcode | ||
if: ${{ !env.ACT }} | ||
uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: '15.0.1' | ||
- name: Generate matrix | ||
id: set-matrix | ||
run: | | ||
cd iOS | ||
matrix="{\"include\":[" | ||
first_entry=true | ||
for package in ${{ env.PACKAGE }}; do | ||
cd $package | ||
for scheme in $(xcodebuild -list | grep -E '^[[:space:]]*Schemes:' -A 10 | tail -n +2 | grep -v '^$'); do | ||
if [[ $scheme != *"-Package" ]]; then | ||
if [ "$first_entry" = true ]; then | ||
first_entry=false | ||
else | ||
matrix+="," | ||
fi | ||
matrix+="{\"package\":\"$package\", \"scheme\":\"$scheme\"}" | ||
fi | ||
done | ||
cd .. | ||
done | ||
# cd Features | ||
# for package in JourneyList SaveJourney; do | ||
# cd $package | ||
# for scheme in $(xcodebuild -list | grep -E '^[[:space:]]*Schemes:' -A 10 | tail -n +2 | grep -v '^$'); do | ||
# if [[ $scheme != *"-Package" ]]; then | ||
# if [ "$first_entry" = true ]; then | ||
# first_entry=false | ||
# else | ||
# matrix+="," | ||
# fi | ||
# matrix+="{\"package\":\"$package\", \"scheme\":\"$scheme\"}" | ||
# fi | ||
# done | ||
# cd .. | ||
# done | ||
matrix+="]}" | ||
echo "matrix=$matrix" >> $GITHUB_OUTPUT | ||
xcode-build: | ||
needs: prepare-matrix | ||
runs-on: macos-13 | ||
strategy: | ||
fail-fast: false | ||
matrix: ${{fromJson(needs.prepare-matrix.outputs.matrix)}} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Xcode | ||
if: ${{ !env.ACT }} | ||
uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: '15.0.1' | ||
- name: 🛠️ Build ${{ matrix.scheme }} | ||
if: ${{ !contains(matrix.scheme, 'Tests') }} | ||
run: | | ||
echo "🛠️ Building ${{ matrix.package }} - Scheme: ${{ matrix.scheme }}" | ||
cd iOS/${{ matrix.package }} | ||
xcodebuild \ | ||
-scheme ${{ matrix.scheme }} \ | ||
-sdk 'iphonesimulator' \ | ||
-destination 'platform=iOS Simulator,OS=17.0.1,name=iPhone 15 Pro' \ | ||
clean build | ||
xcode-test: | ||
runs-on: macos-13 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
package: ${{ env.PACKAGE }} | ||
Check failure on line 103 in .github/workflows/Xcode_build_test.yml GitHub Actions / Xcode_build_testInvalid workflow file
|
||
steps: | ||
- name: 🧪 Test ${{ matrix.package }} | ||
run: | | ||
echo "🧪 Testing ${{ matrix.package }}" | ||
cd iOS/${{ matrix.package }} | ||
xcodebuild \ | ||
-scheme ${{ matrix.package }}-Package \ | ||
-sdk 'iphonesimulator' \ | ||
-destination 'platform=iOS Simulator,OS=17.0.1,name=iPhone 15 Pro' \ | ||
clean test |