Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# GitHub's hosted macOS 27 preview label predates actionlint's built-in catalog.
# This configuration key extends accepted labels; this is not a self-hosted runner.
# https://github.com/actions/runner-images/blob/main/images/macos/xcode-27-arm64-Readme.md
self-hosted-runner:
labels:
- xcode-27
146 changes: 101 additions & 45 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ run-name: Build and Release Electron App (${{ github.ref_name }})

concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true
cancel-in-progress: ${{ github.event_name != 'workflow_dispatch' }}

on:
workflow_dispatch:
Expand Down Expand Up @@ -91,6 +91,18 @@ jobs:
done
wait "$verify_pid"

- name: Upload failed release verification diagnostics
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: release-verification-diagnostics
path: |
release-dist/smoke-diagnostics/**
test-results/**
playwright-report/**
if-no-files-found: ignore
retention-days: 14

- name: Show git diff for app source (debug)
id: git_diff
run: node scripts/print-app-diff.mjs
Expand Down Expand Up @@ -137,48 +149,21 @@ jobs:
# Keep this aligned with the known-good workflow pattern.
NODE_OPTIONS: --max_old_space_size=8192
strategy:
fail-fast: ${{ github.event_name == 'pull_request' }}
matrix:
os:
- ubuntu-latest
- ubuntu-24.04-arm
- windows-latest
- macos-15
- macos-latest
- macos-15-intel

arch: [x64, ia32, arm64]
exclude:
# Exclude macOS with ia32 architecture as it is not supported by Electron
- os: macos-latest
arch: ia32
- os: macos-latest
arch: arm64
- os: macos-15
arch: ia32
- os: macos-15
arch: x64
- os: macos-15-intel
arch: ia32
- os: macos-15-intel
arch: arm64
# Exclude Ubuntu with ia32 and arm64 architectures as they are not commonly used and not officially supported except for ubuntu-24.04-arm/arm64
include:
- os: ubuntu-latest
arch: ia32
- os: ubuntu-latest
arch: arm64
# Exclude ubuntu-24.04-arm with x64 and ia32
- os: ubuntu-24.04-arm
arch: x64
- os: ubuntu-24.04-arm
arch: ia32
- os: ubuntu-24.04-arm
arch: arm64
# Exclude Windows with arm64 (not supported)
- os: windows-latest
arch: x64
- os: windows-latest
arch: ia32
- os: macos-15
arch: arm64
# Exclude Windows with ia32 (if not supported, uncomment)
# - os: windows-latest
# arch: ia32
- os: macos-latest
arch: universal
- os: macos-15-intel
arch: x64
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
Expand Down Expand Up @@ -324,9 +309,69 @@ jobs:
npm run test:packaged
fi
env:
FFV_PACKAGED_SMOKE_TIMEOUT_MS: "15000"
FFV_PACKAGED_SMOKE_TIMEOUT_MS: "60000"
RUNNER_OS: ${{ runner.os }}

- name: Smoke test installed distributable artifacts
shell: bash
run: |
if [ "$RUNNER_OS" = "Linux" ]; then
xvfb-run -a node scripts/run-distributable-smoke.mjs
else
node scripts/run-distributable-smoke.mjs
fi
env:
CI: true
FFV_PACKAGED_SMOKE_TIMEOUT_MS: "60000"
MATRIX_ARCH: ${{ matrix.arch }}
RUNNER_OS: ${{ runner.os }}

- name: Record Universal native verification source
if: runner.os == 'macOS' && matrix.arch == 'universal'
shell: bash
env:
SOURCE_SHA: ${{ needs.bump-version.outputs.bump_sha }}
run: |
test "$(git rev-parse HEAD)" = "$SOURCE_SHA"
version=$(node -p 'require("./package.json").version')
jq -n --arg sha "$SOURCE_SHA" --arg version "$version" --arg run "$GITHUB_RUN_ID" --arg attempt "$GITHUB_RUN_ATTEMPT" \
'{sourceSha: $sha, version: $version, runId: $run, runAttempt: $attempt}' > release-dist/universal-native-source.json

- name: Upload Universal DMG for required native Intel verification
if: runner.os == 'macOS' && matrix.arch == 'universal'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: universal-native-verification-${{ github.run_attempt }}
path: |
release-dist/Fit-File-Viewer-dmg-universal-*.dmg
release-dist/distributable-smoke-darwin-universal.json
release-dist/signing-verification-report.json
release-dist/universal-native-source.json
retention-days: 7
if-no-files-found: error

- name: Upload distributable smoke diagnostics
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: smoke-diagnostics-${{ matrix.os }}-${{ matrix.arch }}
path: |
release-dist/distributable-smoke-*.json
release-dist/smoke-diagnostics/**
if-no-files-found: ignore
retention-days: 14

- name: Preserve failed Universal package for diagnosis
if: failure() && runner.os == 'macOS' && matrix.arch == 'universal'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: failed-universal-package-${{ github.run_attempt }}
path: |
release-dist/Fit-File-Viewer-dmg-universal-*.dmg
release-dist/signing-verification-report.json
if-no-files-found: ignore
retention-days: 7

- name: Print distributable hashes (debug)
id: print_hashes
shell: bash
Expand Down Expand Up @@ -358,10 +403,22 @@ jobs:
PACKAGED_SMOKE_OUTCOME: ${{ steps.smoke_packaged_app.outcome }}
SIGNING_VERIFICATION_OUTCOME: ${{ steps.verify_signed_artifacts.outcome }}

verify-universal-intel:
name: Verify Universal DMG on native Intel
needs: [build, bump-version]
if: always() && !cancelled() && needs.bump-version.result == 'success'
permissions:
actions: read
contents: read
uses: ./.github/workflows/verify-universal-native-intel.yml
with:
source-sha: ${{ needs.bump-version.outputs.bump_sha }}
expected-version: ${{ needs.bump-version.outputs.new_version }}

release:
name: Create Release
needs: [build, bump-version]
if: ${{ needs.build.result == 'success' && needs.bump-version.result == 'success' }}
needs: [build, bump-version, verify-universal-intel]
if: ${{ needs.build.result == 'success' && needs.bump-version.result == 'success' && needs.verify-universal-intel.result == 'success' }}
runs-on: ubuntu-latest
timeout-minutes: 45
defaults:
Expand Down Expand Up @@ -394,6 +451,7 @@ jobs:
- name: Download all build artifacts from build job
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
pattern: dist-*
path: ./artifacts

- name: Print artifact hashes (debug)
Expand Down Expand Up @@ -449,9 +507,7 @@ jobs:
body: |
## 🚀 Release Notes

This release removes the unused Squirrel.Windows packaging path so the Windows installers and portable build no longer bundle its ExecutionStub helper.

${{ inputs.require-code-signing && 'Windows and macOS release artifacts were built with required code signing.' || 'Release artifacts are intentionally unsigned, consistent with previous FitFileViewer releases.' }}
${{ inputs.require-code-signing && 'Windows and macOS release artifacts were built with required publisher code signing.' || 'Release artifacts do not have trusted publisher signatures. macOS apps have verified ad hoc signatures for executable integrity, but are not notarized by Apple.' }}

${{ steps.release_notes.outputs.notes }}

Expand Down Expand Up @@ -591,7 +647,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
ref: main
ref: ${{ needs.bump-version.outputs.bump_sha }}
fetch-depth: 0
fetch-tags: true

Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/candidate-upgrade-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
$installer = Resolve-Path (
"release-inputs/Fit-File-Viewer-nsis-x64-$env:FROM_VERSION.exe"
)
$process = Start-Process -FilePath $installer `
$process = Start-Process -WindowStyle Hidden -FilePath $installer `
-ArgumentList @("/S", "/D=$env:FFV_UPGRADE_INSTALL_DIR") `
-Wait -PassThru
if ($process.ExitCode -ne 0) {
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
$candidate = Resolve-Path (
"release-dist/Fit-File-Viewer-nsis-x64-$env:FFV_CANDIDATE_VERSION.exe"
)
$process = Start-Process -FilePath $candidate `
$process = Start-Process -WindowStyle Hidden -FilePath $candidate `
-ArgumentList @("/S", "--updated") -Wait -PassThru
if ($process.ExitCode -ne 0) {
throw "Candidate installer exited with $($process.ExitCode)."
Expand Down Expand Up @@ -176,18 +176,25 @@ jobs:
}

- name: Smoke test upgraded executable
env:
FFV_SMOKE_EXPECTED_ARCH: x64
FFV_SMOKE_EXPECTED_VERSION: ${{ env.FFV_CANDIDATE_VERSION }}
FFV_SMOKE_DIAGNOSTICS_DIRECTORY: ${{ runner.temp }}/candidate-upgrade-smoke
run: >-
node scripts/run-packaged-smoke.mjs
--executable "$env:FFV_UPGRADE_EXECUTABLE"
--startup-timeout-ms 15000
--startup-timeout-ms 60000

- name: Upload candidate upgrade evidence
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: candidate-upgrade-evidence-${{ inputs.from-version }}
if-no-files-found: ignore
path: ${{ runner.temp }}/candidate-upgrade-registry.json
retention-days: 14
path: |
${{ runner.temp }}/candidate-upgrade-registry.json
${{ runner.temp }}/candidate-upgrade-smoke/

- name: Clean up isolated installation
if: always()
Expand All @@ -198,5 +205,5 @@ jobs:
"Uninstall Fit File Viewer.exe"
)
if (Test-Path -LiteralPath $uninstaller -PathType Leaf) {
Start-Process -FilePath $uninstaller -ArgumentList "/S" -Wait
Start-Process -WindowStyle Hidden -FilePath $uninstaller -ArgumentList "/S" -Wait
}
126 changes: 126 additions & 0 deletions .github/workflows/macos-compatibility-smoke.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
name: macOS Compatibility Smoke
run-name: macOS 27 Compatibility (rehearsal ${{ inputs.rehearsal-run-id }})

on:
workflow_call:
inputs:
rehearsal-run-id:
description: Run ID containing a successful ARM64 Release Rehearsal artifact
required: true
type: string

concurrency:
group: macos-compatibility-${{ inputs.rehearsal-run-id }}
cancel-in-progress: true

permissions:
actions: read
contents: read

jobs:
compatibility:
name: Test existing ARM64 DMG on macOS 27
runs-on: xcode-27
timeout-minutes: 15
defaults:
run:
shell: bash
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit

- name: Validate rehearsal artifact provenance
id: source
env:
GH_TOKEN: ${{ github.token }}
REHEARSAL_RUN_ID: ${{ inputs.rehearsal-run-id }}
run: |
[[ "$REHEARSAL_RUN_ID" =~ ^[1-9][0-9]*$ ]] || { echo "Invalid rehearsal run ID" >&2; exit 1; }
evidence="$RUNNER_TEMP/ffv-macos-compatibility"
mkdir -p "$evidence"
gh api "repos/$GITHUB_REPOSITORY/actions/runs/$REHEARSAL_RUN_ID" > "$evidence/source-run.json"
jq -e --arg repo "$GITHUB_REPOSITORY" '
.path == ".github/workflows/release-rehearsal.yml" and
.event == "workflow_dispatch" and
.repository.full_name == $repo and
.head_repository.full_name == $repo and
(.head_sha | test("^[0-9a-f]{40}$"))
' "$evidence/source-run.json" > /dev/null
sha=$(jq -r '.head_sha' "$evidence/source-run.json")
gh api --paginate --slurp "repos/$GITHUB_REPOSITORY/actions/runs/$REHEARSAL_RUN_ID/jobs?per_page=100" > "$evidence/source-jobs.json"
jq -e 'any(.[].jobs[];
.name == "Verify Unsigned Release Package (macos-15, arm64)" and
.conclusion == "success"
)' "$evidence/source-jobs.json" > /dev/null
gh api --paginate --slurp "repos/$GITHUB_REPOSITORY/actions/runs/$REHEARSAL_RUN_ID/artifacts?per_page=100" > "$evidence/source-artifacts.json"
jq -e --arg sha "$sha" --argjson run "$REHEARSAL_RUN_ID" '
[.[].artifacts[] | select(.name == "release-rehearsal-macos-15-arm64")] |
if length != 1 then error("Expected one ARM64 rehearsal artifact") else .[0] end |
select(.expired == false and .workflow_run.id == $run and .workflow_run.head_sha == $sha)
' "$evidence/source-artifacts.json" > "$evidence/source-artifact.json"
artifact_id=$(jq -r '.id' "$evidence/source-artifact.json")
[[ "$artifact_id" =~ ^[1-9][0-9]*$ ]]
echo "sha=$sha" >> "$GITHUB_OUTPUT"
echo "artifact-id=$artifact_id" >> "$GITHUB_OUTPUT"
sw_vers > "$evidence/os-version.txt"
uname -a >> "$evidence/os-version.txt"
printf 'ImageOS=%s\nImageVersion=%s\n' "$ImageOS" "$ImageVersion" >> "$evidence/os-version.txt"

- name: Checkout exact artifact source
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
ref: ${{ steps.source.outputs.sha }}
persist-credentials: false

- name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: .node-version

- name: Download verified ARM64 rehearsal artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
artifact-ids: ${{ steps.source.outputs.artifact-id }}
run-id: ${{ inputs.rehearsal-run-id }}
repository: ${{ github.repository }}
github-token: ${{ github.token }}
path: release-dist
merge-multiple: true
digest-mismatch: error

- name: Verify DMG matches original successful smoke
run: |
evidence="$RUNNER_TEMP/ffv-macos-compatibility"
cp release-dist/distributable-smoke-darwin-arm64.json "$evidence/source-smoke-report.json"
rm release-dist/distributable-smoke-darwin-arm64.json
version=$(node -p 'require("./package.json").version')
[[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?$ ]]
artifact="Fit-File-Viewer-dmg-arm64-$version.dmg"
expected=$(jq -er --arg artifact "$artifact" '
.artifacts[] | select(.artifact == $artifact and .passed == true and
.signatureVerified == true and .launchServicesVerified == true) | .sha256
' "$evidence/source-smoke-report.json")
[[ "$expected" =~ ^[0-9a-f]{64}$ ]]
actual=$(shasum -a 256 "release-dist/$artifact" | cut -d ' ' -f 1)
[[ "$actual" == "$expected" ]] || { echo "DMG differs from original tested artifact" >&2; exit 1; }
printf '%s %s\n' "$actual" "$artifact" > "$evidence/dmg-sha256.txt"

- name: Smoke test copied DMG through direct launch and LaunchServices
run: node scripts/run-distributable-smoke.mjs
env:
MATRIX_ARCH: arm64
FFV_PACKAGED_SMOKE_TIMEOUT_MS: "60000"

- name: Preserve macOS compatibility evidence
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: macos-27-compatibility-${{ inputs.rehearsal-run-id }}
path: |
${{ runner.temp }}/ffv-macos-compatibility/**
release-dist/distributable-smoke-darwin-arm64.json
release-dist/smoke-diagnostics/**
retention-days: 14
if-no-files-found: error
Loading
Loading