mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-25 04:47:55 +00:00
As part of this change, SUStatus window is now being created programmatically rather than from a nib, so the nib does not need to be loaded in the progress tool (Updater.app) nor duplicated. The localizations this helper tool needs are also now being autogenerated. In the Updater.app, since the app can be swapped, we will minimize what needs to be loaded from disk. Also, the progress Updater app is no longer brought up the from when its status window shows, which could cause it to show up as a recent app entry in the Dock. I used AI to re-generate the SUStatus window programmatically, which I've verified have same properties as the removed xib, and to create the python script to generate the localization header for the Updater app which I've reviewed.
123 lines
4.7 KiB
YAML
123 lines
4.7 KiB
YAML
name: Build & Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [ 2.x, master ]
|
|
pull_request:
|
|
branches: [ 2.x, master ]
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
matrix:
|
|
xcode: ['xcode26.6', 'xcode16.4']
|
|
include:
|
|
- xcode: 'xcode16.4'
|
|
xcode-path: '/Applications/Xcode_16.4.app/Contents/Developer'
|
|
upload-dist: false
|
|
run-analyzer: false
|
|
macos: 'macos-15'
|
|
- xcode: 'xcode26.6'
|
|
xcode-path: '/Applications/Xcode_26.6.app/Contents/Developer'
|
|
upload-dist: true
|
|
run-analyzer: true
|
|
macos: 'macos-26'
|
|
|
|
name: Build and Test Sparkle
|
|
runs-on: ${{ matrix.macos }}
|
|
|
|
permissions:
|
|
pull-requests: write
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
with:
|
|
submodules: true
|
|
fetch-depth: 0
|
|
- name: Check Installer Progress localizations are up to date
|
|
if: ${{ matrix.upload-dist }}
|
|
run: |
|
|
python3 Configurations/generate_progress_tool_localizations.py
|
|
if [ -n "$(git status --porcelain -- Sparkle/InstallerProgress/SPUInstallerProgressLocalizedStrings.h Sparkle/InstallerProgress/InstallerProgress-Info.plist)" ]; then
|
|
echo "::error::Sparkle/InstallerProgress/SPUInstallerProgressLocalizedStrings.h or InstallerProgress-Info.plist is out of date. Run Configurations/generate_progress_tool_localizations.py and commit the result."
|
|
git diff -- Sparkle/InstallerProgress/SPUInstallerProgressLocalizedStrings.h Sparkle/InstallerProgress/InstallerProgress-Info.plist
|
|
exit 1
|
|
fi
|
|
- name: Build Unit Tests
|
|
env:
|
|
DEVELOPER_DIR: ${{ matrix.xcode-path }}
|
|
run: |
|
|
xcodebuild build-for-testing -project Sparkle.xcodeproj -scheme Distribution -enableCodeCoverage YES -derivedDataPath build
|
|
- name: Run Unit Tests
|
|
env:
|
|
DEVELOPER_DIR: ${{ matrix.xcode-path }}
|
|
run: |
|
|
xcodebuild test-without-building -project Sparkle.xcodeproj -scheme Distribution -enableCodeCoverage YES -derivedDataPath build
|
|
- name: Build UI Tests
|
|
env:
|
|
DEVELOPER_DIR: ${{ matrix.xcode-path }}
|
|
run: |
|
|
xcodebuild build-for-testing -project Sparkle.xcodeproj -scheme UITests -configuration Debug -derivedDataPath build
|
|
- name: Run UI Tests
|
|
env:
|
|
DEVELOPER_DIR: ${{ matrix.xcode-path }}
|
|
run: |
|
|
xcodebuild test-without-building -project Sparkle.xcodeproj -scheme UITests -configuration Debug -derivedDataPath build
|
|
|
|
- name: Analyze Sparkle
|
|
if: ${{ matrix.run-analyzer && github.event_name == 'pull_request' }}
|
|
env:
|
|
DEVELOPER_DIR: ${{ matrix.xcode-path }}
|
|
run: |
|
|
xcodebuild analyze -project Sparkle.xcodeproj -quiet -scheme Sparkle -configuration Release -derivedDataPath analyze > analyze_output.txt
|
|
|
|
- name: Find Analyzed Warnings
|
|
if: ${{ success() && matrix.run-analyzer && github.event_name == 'pull_request' }}
|
|
id: findwarnings
|
|
env:
|
|
DEVELOPER_DIR: ${{ matrix.xcode-path }}
|
|
run: |
|
|
if grep -q "warning:" analyze_output.txt; then
|
|
echo "analyzestatus=0" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "analyzestatus=1" >> $GITHUB_OUTPUT
|
|
fi
|
|
|
|
- name: Extract Analyzed Warnings
|
|
if: ${{ success() && matrix.run-analyzer && github.event_name == 'pull_request' && steps.findwarnings.outputs.analyzestatus == '0' }}
|
|
id: warnings
|
|
run: |
|
|
{
|
|
echo 'content<<EOF'
|
|
cat analyze_output.txt
|
|
echo 'EOF'
|
|
} >> $GITHUB_OUTPUT
|
|
|
|
- name: Post Analyzed Warnings
|
|
if: ${{ success() && matrix.run-analyzer && github.event_name == 'pull_request' && steps.findwarnings.outputs.analyzestatus == '0' }}
|
|
uses: mshick/add-pr-comment@v2
|
|
with:
|
|
allow-repeats: false
|
|
message: "``` ${{ steps.warnings.outputs.content }} ```"
|
|
|
|
- name: Build Release Distribution
|
|
env:
|
|
DEVELOPER_DIR: ${{ matrix.xcode-path }}
|
|
run: |
|
|
xcodebuild build -project Sparkle.xcodeproj -scheme Distribution -configuration Release -derivedDataPath build
|
|
- name: Archive Test Results
|
|
if: failure()
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: build-logs
|
|
path: |
|
|
build/Logs
|
|
~/Library/Logs/DiagnosticReports
|
|
- name: Upload Distribution
|
|
if: ${{ success() && matrix.upload-dist }}
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: Sparkle-distribution-${{ matrix.xcode }}.tar.xz
|
|
path: build/Build/Products/Release/sparkle_dist.tar.xz
|