Skip to content

Commit

Permalink
Move unit tests to new macOS & iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
wallisch committed Feb 2, 2024
1 parent d1afd53 commit 026c9de
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 15 deletions.
42 changes: 28 additions & 14 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Swiftlint
uses: norio-nomura/action-swiftlint@3.2.1
with:
Expand All @@ -21,43 +21,57 @@ jobs:
macos:
name: macOS
needs: lint
runs-on: macos-latest
runs-on: macos-14
steps:
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 15
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: true
- name: Build
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild build-for-testing -scheme ChromaSwift -destination "platform=macos,arch=x86_64" -enableCodeCoverage YES | xcpretty
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild build-for-testing -scheme ChromaSwift -destination "platform=macos,arch=arm64" -enableCodeCoverage YES | xcbeautify
- name: Test
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild test-without-building -scheme ChromaSwift -destination "platform=macos,arch=x86_64" -enableCodeCoverage YES | xcpretty
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild test-without-building -scheme ChromaSwift -destination "platform=macos,arch=arm64" -enableCodeCoverage YES | xcbeautify
- name: Codecov upload
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}

ios:
name: iOS
needs: lint
runs-on: macos-latest
runs-on: macos-14
steps:
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 15
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: true
- name: Build
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild build-for-testing -scheme ChromaSwift -destination "platform=iOS Simulator,OS=latest,name=iPhone 12" | xcpretty
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild build-for-testing -scheme ChromaSwift -destination "platform=iOS Simulator,OS=latest,name=iPhone 15" | xcbeautify
- name: Test
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild test-without-building -scheme ChromaSwift -destination "platform=iOS Simulator,OS=latest,name=iPhone 12" | xcpretty
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild test-without-building -scheme ChromaSwift -destination "platform=iOS Simulator,OS=latest,name=iPhone 15" | xcbeautify

tvOS:
name: tvOS
needs: lint
runs-on: macos-latest
runs-on: macos-14
steps:
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 15
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: true
- name: Build
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild build-for-testing -scheme ChromaSwift -destination "platform=tvOS Simulator,OS=latest,name=Apple TV" | xcpretty
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild build-for-testing -scheme ChromaSwift -destination "platform=tvOS Simulator,OS=latest,name=Apple TV" | xcbeautify
- name: Test
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild test-without-building -scheme ChromaSwift -destination "platform=tvOS Simulator,OS=latest,name=Apple TV" | xcpretty
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild test-without-building -scheme ChromaSwift -destination "platform=tvOS Simulator,OS=latest,name=Apple TV" | xcbeautify
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ let package = Package(
"silence_remover.cpp",
"utils/base64.cpp",
// vDSP
"fft_lib_vdsp.cpp",
"fft_lib_vdsp.cpp"
],
cxxSettings: [
.define("USE_VDSP"),
Expand Down

0 comments on commit 026c9de

Please sign in to comment.