From 370685c6451bcc0600754d42960be3ac64bb04d2 Mon Sep 17 00:00:00 2001 From: William Entriken <382183+fulldecent@users.noreply.github.com> Date: Thu, 8 Oct 2026 22:21:45 -0400 Subject: [PATCH] pin ci to the macOS 15 image and Xcode 16.4 The workflow on macos-latest failed before the package compiled. Keep one job that selects Xcode 16.4 and the iPhone 16 simulator on iOS 18.5. Inline the current Swift and Xcode ignore files, and describe releases from CHANGELOG.md instead of a podspec. --- .github/workflows/ci.yml | 58 +++++++++++++----------- .github/workflows/test.yml | 42 ------------------ .gitignore | 90 ++++++++++++++++++++++++++------------ CHANGELOG.md | 10 +++++ CONTRIBUTING.md | 32 ++++++++++---- README.md | 24 +++++----- 6 files changed, 141 insertions(+), 115 deletions(-) delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cc67ba0..087df05 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,12 @@ name: ci +# macos-latest is the macOS 26 image. It does not install Xcode 16.4, and the +# simulator-discovery script previously used here failed on that image +# (https://github.com/fulldecent/FDWaveformView/actions/runs/25414955912). +# This job pins the macOS 15 image, whose default Xcode is 16.4 and which +# lists an iPhone 16 simulator on iOS 18.5: +# https://github.com/actions/runner-images/blob/main/images/macos/macos-15-arm64-Readme.md + on: push: branches: @@ -12,33 +19,34 @@ concurrency: jobs: test: - runs-on: macos-latest + name: Build and Test + runs-on: macos-15 steps: - - name: check out repository + - name: Check out repository uses: actions/checkout@v4 - - name: select iOS simulator - id: simulator - shell: bash + - name: Select Xcode + run: sudo xcode-select -s /Applications/Xcode_16.4.app + + - name: Show build environment + run: | + xcodebuild -version + xcrun swift --version + + - name: Build + run: | + xcodebuild build \ + -scheme FDWaveformView \ + -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.5' + + - name: Check formatting + run: | + swift format format --in-place --recursive Sources/ Tests/ + git diff --exit-code || (echo "Code is not formatted. Run: swift format format --in-place --recursive Sources/ Tests/" && exit 1) + + - name: Test run: | - set -euo pipefail - - destination_id="$({ - xcodebuild -showdestinations -scheme FDWaveformView 2>/dev/null | - grep 'platform:iOS Simulator' | - grep -v 'placeholder' | - head -n 1 | - sed -E 's/.*id:([^,}]+).*/\1/' || true - })" - - if [[ -z "$destination_id" ]]; then - echo "No iOS simulator destination found for scheme FDWaveformView" >&2 - exit 1 - fi - - echo "destination=id=$destination_id" >> "$GITHUB_OUTPUT" - - - name: build and test - run: xcodebuild test -scheme FDWaveformView -destination "${{ - steps.simulator.outputs.destination }}" + xcodebuild test \ + -scheme FDWaveformView \ + -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.5' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 5fe3b1a..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,42 +0,0 @@ ---- -name: CI - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - test: - name: Build and Test - runs-on: macos-15 - - steps: - - uses: actions/checkout@v4 - - - name: Select Xcode - run: sudo xcode-select -s /Applications/Xcode_16.4.app - - - name: Show build environment - run: | - xcodebuild -version - xcrun swift --version - xcrun simctl list devices available | grep 'iPhone 16 ' - - - name: Build - run: | - xcodebuild build \ - -scheme FDWaveformView \ - -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.5' - - - name: Check formatting - run: | - swift format format --in-place --recursive Sources/ Tests/ - git diff --exit-code || (echo "Code is not formatted. Run: swift format format --in-place --recursive Sources/ Tests/" && exit 1) - - - name: Test - run: | - xcodebuild test \ - -scheme FDWaveformView \ - -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.5' diff --git a/.gitignore b/.gitignore index d0e8564..e0c5608 100644 --- a/.gitignore +++ b/.gitignore @@ -1,43 +1,79 @@ -# OS X +# macOS and secret rules from https://github.com/fulldecent/project-template + +# macOS .DS_Store +# Secrets. .env.example is the committed sample. +.env +.env.* +!.env.example + +# https://raw.githubusercontent.com/github/gitignore/refs/heads/main/Global/Xcode.gitignore + +## User settings +xcuserdata/ + +# https://raw.githubusercontent.com/github/gitignore/refs/heads/main/Swift.gitignore + # Xcode -build/ -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata -*.xccheckout -profile -*.moved-aside -DerivedData +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## User settings +xcuserdata/ + +## Obj-C/Swift specific *.hmap + +## App packaging *.ipa +*.dSYM.zip +*.dSYM -# Bundler -.bundle +## Playgrounds +timeline.xctimeline +playground.xcworkspace +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +# Package.pins +# Package.resolved +# *.xcodeproj +# +# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata +# hence it is not needed unless you have added a package configuration file to your project +# .swiftpm + +.build/ + +# CocoaPods +# # We recommend against adding the Pods directory to your .gitignore. However # you should judge for yourself, the pros and cons are mentioned at: -# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control -# -# Note: if you ignore the Pods directory, make sure to uncomment -# `pod install` in .travis.yml +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control # # Pods/ +# +# Add this line if you want to avoid checking in source code from the Xcode workspace +# *.xcworkspace # Carthage -Carthage/Build +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts -FDWaveformView.framework.zip +Carthage/Build/ -# Swift build artifacts -.build/ +# fastlane +# +# It is recommended to not store the screenshots in the git repo. +# Instead, use fastlane to re-generate the screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/#source-control -# Swift project manager -.swiftpm +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots/**/*.png +fastlane/test_output diff --git a/CHANGELOG.md b/CHANGELOG.md index f207cce..ee33b52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file. --- +## Main + +### Changed + +- Pin GitHub Actions to the macOS 15 image, Xcode 16.4, and an iPhone 16 simulator on iOS 18.5. The workflow on `macos-latest` failed before the package compiled. +- Inline `.gitignore` from the current Swift and Xcode ignore files, plus the macOS and secret rules from project-template. +- Describe the release steps in terms of `CHANGELOG.md` and a GitHub tag. + +--- + ## [5.1.1](https://github.com/fulldecent/FDWaveformView/releases/tag/5.1.1) Released on 2025-12-06. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f04bfce..2af3f6d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,12 +2,26 @@ All contributors are welcome. Please use issues and pull requests to contribute to the project. And update [CHANGELOG.md](CHANGELOG.md) when committing. -# Release Process - -1. Confirm the build works (GitHub Actions testing is now set up and will validate builds) -2. Create a release commit, see [prior releases](https://github.com/fulldecent/FDWaveformView/releases) for an example - 1. Update the change log to label the latest improvements under the new version name - 2. Update the podspec version number -3. Tag the release in GitHub - 1. Create the release commit - 2. Create the release with notes from the change log +## Release process + +1. Confirm the build is [passing in GitHub Actions](https://github.com/fulldecent/FDWaveformView/actions) +2. Push a release commit + 1. Create a new Main section at the top of [CHANGELOG.md](CHANGELOG.md) + 2. Rename the old Main section like: + + ```markdown + ## [5.1.1](https://github.com/fulldecent/FDWaveformView/releases/tag/5.1.1) + + Released on 2025-12-06. + ``` + +3. Create a GitHub release + 1. Tag the release (like `5.1.1`) + 2. Paste notes from [CHANGELOG.md](CHANGELOG.md) + +## Maintenance + +Do this every quarter or so. + +1. Review the Xcode pin in [.github/workflows/ci.yml](.github/workflows/ci.yml). The job uses the `macos-15` runner and `/Applications/Xcode_16.4.app`, then tests on an iPhone 16 simulator running iOS 18.5. Those are the versions listed for that image in the [macOS 15 runner readme](https://github.com/actions/runner-images/blob/main/images/macos/macos-15-arm64-Readme.md). `macos-latest` is the macOS 26 image and does not install Xcode 16.4, so a workflow that selects `macos-latest` and then looks up a simulator will fail before it compiles this package. +2. Review [actions/checkout](https://github.com/actions/checkout) and move the `uses:` pin forward when a new major version is safe. The workflow currently uses `actions/checkout@v4`. diff --git a/README.md b/README.md index d52b064..6299de8 100644 --- a/README.md +++ b/README.md @@ -69,12 +69,12 @@ UIView.animate(withDuration: 0.3) { - Antialiased waveforms draw extra pixels to avoid jagged edges. - Autolayout-driven size changes trigger re-rendering to prevent pixelation. -- Supports iOS 12+ and Swift 5. +- Supports iOS 15+, visionOS 1+, and Swift tools version 5.10, as declared in `Package.swift`. - Includes unit tests that run on GitHub Actions. ## Installation -Use Swift Package Manager: in Xcode choose File > Swift Packages > Add Package Dependency and point to this repository. Legacy installation options are available if needed. +Add this package with Swift Package Manager. In Xcode that is File > Add Package Dependencies... ## API @@ -110,26 +110,26 @@ A couple other things are exposed that we do not consider public API: ## Testing -Find an available simulator: +GitHub Actions runs the suite on the macOS 15 image with Xcode 16.4. That image provides an iPhone 16 simulator on iOS 18.5. The command is: ```sh -xcrun simctl list devices available | grep iPhone +xcodebuild test -scheme FDWaveformView -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.5' ``` -Build and test using a simulator ID from the output: +On another Xcode, list the simulators that copy of Xcode can see and pass one of those ids. `xcodebuild` only accepts destinations from the selected Xcode, so an id printed by a different install will fail. ```sh -# Build the library -xcodebuild build -scheme FDWaveformView -destination 'id=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' - -# Run unit tests +xcrun simctl list devices available | grep iPhone xcodebuild test -scheme FDWaveformView -destination 'id=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' +``` + +The Example app target deploys to iOS 18.6, so its simulator has to be iOS 18.6 or newer: -# Build the Example app (requires a newer iOS simulator) -cd Example -xcodebuild build -scheme Example -destination 'id=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' +```sh +xcodebuild build -project Example/Example.xcodeproj -scheme Example -destination 'id=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' ``` ## Contributing - This project's layout is based on +- Ignore rules are inlined from [Swift.gitignore](https://github.com/github/gitignore/blob/main/Swift.gitignore) and [Global/Xcode.gitignore](https://github.com/github/gitignore/blob/main/Global/Xcode.gitignore). The macOS and secret rules above them come from [project-template](https://github.com/fulldecent/project-template).