Skip to content

Fix upload ratio display for Transmission special cases #51

Fix upload ratio display for Transmission special cases

Fix upload ratio display for Transmission special cases #51

Workflow file for this run

name: CI
on:
pull_request:
branches:
- main
merge_group:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: macos-26
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install SwiftLint
env:
HOMEBREW_NO_AUTO_UPDATE: 1
run: brew install swiftlint
- name: Run SwiftLint
run: swiftlint lint --strict --reporter github-actions-logging
macos-build-and-test:
name: macOS Build + Test
needs: lint
runs-on: macos-26
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Write CI build settings override
env:
SPARKLE_APPCAST_URL: ${{ vars.SPARKLE_APPCAST_URL }}
SPARKLE_PUBLIC_KEY: ${{ vars.SPARKLE_PUBLIC_KEY }}
run: |
if [[ -z "${SPARKLE_APPCAST_URL:-}" ]]; then
echo "Missing required repository variable: SPARKLE_APPCAST_URL"
exit 1
fi
if [[ -z "${SPARKLE_PUBLIC_KEY:-}" ]]; then
echo "Missing required repository variable: SPARKLE_PUBLIC_KEY"
exit 1
fi
cat > Config/BuildSettings.local.xcconfig <<EOF
SPARKLE_APPCAST_URL = $SPARKLE_APPCAST_URL
SPARKLE_PUBLIC_KEY = $SPARKLE_PUBLIC_KEY
EOF
- name: Build and test app (macOS)
run: |
RESULT_BUNDLE="$RUNNER_TEMP/BitDream.xcresult"
rm -rf "$RESULT_BUNDLE"
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild test \
-project BitDream.xcodeproj \
-scheme BitDream \
-configuration Debug \
-destination "platform=macOS,arch=arm64" \
-derivedDataPath "$RUNNER_TEMP/DerivedData" \
-resultBundlePath "$RESULT_BUNDLE" \
CODE_SIGNING_ALLOWED=NO \
CODE_SIGNING_REQUIRED=NO
- name: Print macOS test failure summary
if: failure()
run: |
RESULT_BUNDLE="$RUNNER_TEMP/BitDream.xcresult"
if [[ ! -d "$RESULT_BUNDLE" ]]; then
echo "No xcresult bundle found at $RESULT_BUNDLE"
exit 0
fi
echo "::group::macOS test summary"
xcrun xcresulttool get test-results summary --path "$RESULT_BUNDLE" --compact || true
echo "::endgroup::"
echo "::group::macOS test results"
xcrun xcresulttool get test-results tests --path "$RESULT_BUNDLE" --compact || true
echo "::endgroup::"
echo "::group::macOS build results"
xcrun xcresulttool get build-results --path "$RESULT_BUNDLE" --compact || true
echo "::endgroup::"
- name: Upload macOS xcresult bundle
if: failure()
uses: actions/upload-artifact@v4
with:
name: macos-xcresult
path: ${{ runner.temp }}/BitDream.xcresult
if-no-files-found: ignore
ios-build:
name: iOS Build
needs: lint
runs-on: macos-26
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Write CI build settings override
env:
SPARKLE_APPCAST_URL: ${{ vars.SPARKLE_APPCAST_URL }}
SPARKLE_PUBLIC_KEY: ${{ vars.SPARKLE_PUBLIC_KEY }}
run: |
if [[ -z "${SPARKLE_APPCAST_URL:-}" ]]; then
echo "Missing required repository variable: SPARKLE_APPCAST_URL"
exit 1
fi
if [[ -z "${SPARKLE_PUBLIC_KEY:-}" ]]; then
echo "Missing required repository variable: SPARKLE_PUBLIC_KEY"
exit 1
fi
cat > Config/BuildSettings.local.xcconfig <<EOF
SPARKLE_APPCAST_URL = $SPARKLE_APPCAST_URL
SPARKLE_PUBLIC_KEY = $SPARKLE_PUBLIC_KEY
EOF
- name: Build app (iOS)
run: |
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild build \
-project BitDream.xcodeproj \
-scheme BitDream \
-configuration Debug \
-destination "generic/platform=iOS" \
-derivedDataPath "$RUNNER_TEMP/DerivedData" \
CODE_SIGNING_ALLOWED=NO \
CODE_SIGNING_REQUIRED=NO