Skip to content

👷 중복된 Test Action 제거 #9

👷 중복된 Test Action 제거

👷 중복된 Test Action 제거 #9

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

View workflow run for this annotation

GitHub Actions / Xcode_build_test

Invalid workflow file

The workflow is not valid. .github/workflows/Xcode_build_test.yml (Line: 103, Col: 18): Unrecognized named-value: 'env'. Located at position 1 within expression: env.PACKAGE .github/workflows/Xcode_build_test.yml (Line: 103, Col: 18): Unexpected value '${{ env.PACKAGE }}'
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