Skip to content

Add TMDb genre and title keyword endpoints #39

Add TMDb genre and title keyword endpoints

Add TMDb genre and title keyword endpoints #39

name: Xcode - Build and Analyze
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-analyze:
name: ${{ matrix.name }}
runs-on: macos-15
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- name: iOS
scheme: SmartMovie
destination: generic/platform=iOS
artifact: ios-build-analyze
- name: Mac Catalyst
scheme: SmartMovie
destination: generic/platform=macOS,variant=Mac Catalyst
artifact: catalyst-build-analyze
- name: tvOS
scheme: SmartMovieTV
destination: generic/platform=tvOS
artifact: tvos-build-analyze
- name: Native macOS
scheme: SmartMovieNativeMac
destination: generic/platform=macOS
artifact: macos-build-analyze
- name: watchOS
scheme: SmartMovieWatch
destination: generic/platform=watchOS
artifact: watchos-build-analyze
- name: visionOS
scheme: SmartMovieVision
destination: generic/platform=visionOS
artifact: visionos-build-analyze
env:
PROJECT: SmartMovie/SmartMovie.xcodeproj
RESULT_BUNDLE_NAME: ${{ matrix.artifact }}.xcresult
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Show Xcode version
run: xcodebuild -version
- name: Build and analyze
run: |
set -o pipefail
build_log="$RUNNER_TEMP/${{ matrix.artifact }}.log"
xcodebuild \
-project "$PROJECT" \
-scheme "${{ matrix.scheme }}" \
-configuration Debug \
-destination "${{ matrix.destination }}" \
-derivedDataPath "$RUNNER_TEMP/DerivedData-${{ matrix.artifact }}" \
-resultBundlePath "$RUNNER_TEMP/$RESULT_BUNDLE_NAME" \
CODE_SIGNING_ALLOWED=NO \
clean build analyze 2>&1 | tee "$build_log"
if grep -E 'com\.apple\.actool\.document\.(errors|warnings)|Assets\.xcassets.*warning:|warning:.*([Aa]pp [Ii]con|Top Shelf|launch (screen|configuration))' "$build_log"; then
echo "Release-blocking Apple artwork error or warning detected."
exit 1
fi
- name: Native macOS launch smoke test
if: matrix.artifact == 'macos-build-analyze'
run: |
app="$RUNNER_TEMP/DerivedData-${{ matrix.artifact }}/Build/Products/Debug/SmartMovie for Mac.app"
executable="$app/Contents/MacOS/SmartMovie for Mac"
test -x "$executable"
"$executable" >"$RUNNER_TEMP/native-macos-launch.log" 2>&1 &
pid=$!
sleep 5
if ! kill -0 "$pid" 2>/dev/null; then
cat "$RUNNER_TEMP/native-macos-launch.log"
wait "$pid"
fi
kill "$pid"
wait "$pid" || test "$?" -eq 143
- name: Upload failed result bundle
if: failure()
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.artifact }}-result
path: ${{ runner.temp }}/${{ env.RESULT_BUNDLE_NAME }}
if-no-files-found: ignore
retention-days: 7
- name: Upload failed build log
if: failure()
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.artifact }}-build-log
path: ${{ runner.temp }}/${{ matrix.artifact }}.log
if-no-files-found: ignore
retention-days: 7