Skip to content
Closed
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
68 changes: 68 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: "FDWaveformView CI"

on:
push:
branches:
- main
pull_request:
branches:
- main

concurrency:
group: ${{ github.ref_name }}
cancel-in-progress: true

jobs:
spm:
name: ${{ matrix.name }}
runs-on: ${{ matrix.runsOn }}
env:
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
include:
- xcode: "Xcode_16.1"
runsOn: macos-15
name: "macOS 15, Swift 6.0, SPM"
- xcode: "Xcode_15.4"
runsOn: macos-14
name: "macOS 14, Swift 5.10, SPM"
steps:
- uses: actions/checkout@v4

- name: Test Swift Package Manager
run: |
set -o pipefail
swift --version
swift build
swift test

example-ios:
name: ${{ matrix.name }}
runs-on: ${{ matrix.runsOn }}
env:
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
include:
- destination: "OS=18.1,name=iPhone 15"
name: "Example iOS 18.1"
xcode: "Xcode_16.1"
runsOn: macos-15
- destination: "OS=17.5,name=iPhone 15"
name: "Example iOS 17.5"
xcode: "Xcode_15.4"
runsOn: macos-14
steps:
- uses: actions/checkout@v4

- name: Build Example iOS
run: |
set -o pipefail
cd Example
xcodebuild -version
xcodebuild -project Example.xcodeproj -scheme Example -destination "${{ matrix.destination }}" clean build
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All contributors are welcome. Please use issues and pull requests to contribute

# Release Process

1. Confirm the build vorks (todo: set up GitHub Actions testing)
1. Confirm the build works (GitHub Actions CI runs automatically on pull requests and main branch)
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
Expand Down
6 changes: 6 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ import PackageDescription

let package = Package(
name: "FDWaveformView",
platforms: [
.iOS(.v13),
.macOS(.v10_15),
.tvOS(.v13),
.watchOS(.v6)
],
products: [
// Products define the executables and libraries a package produces, making them visible to other packages.
.library(
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ UIView.animate(withDuration: 0.3) {

Creates **antialiased waveforms** by drawing more pixels than are seen on screen. Also, if you resize me (autolayout) I will render more detail if necessary to avoid pixelation.

Supports **iOS12+** and Swift 5.
Supports **iOS13+** and Swift 5.10.

**Includes unit tests**, todo: run these on GitHub Actions
**Includes unit tests** with GitHub Actions CI that tests on iOS and macOS.

## Installation

Expand Down
5 changes: 5 additions & 0 deletions Tests/FDWaveformViewTests/FDWaveformViewTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@ final class FDWaveformViewTests: XCTestCase {
// Defining Test Cases and Test Methods
// https://developer.apple.com/documentation/xctest/defining_test_cases_and_test_methods
}

func testFDWaveformViewCanBeImported() throws {
// Basic test to ensure the module can be imported and basic functionality works
XCTAssertTrue(true, "FDWaveformView module imported successfully")
}
}
Loading