Skip to content

Commit

Permalink
Merge pull request #120 from unsignedapps/macro-refactor
Browse files Browse the repository at this point in the history
Initial commit of v3 alpha1
  • Loading branch information
bok- authored Jul 15, 2024
2 parents 9d6165d + 212a1f3 commit e89ea37
Show file tree
Hide file tree
Showing 121 changed files with 6,456 additions and 2,979 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ on:
- '**/*.swift'

env:
DEVELOPER_DIR: /Applications/Xcode_13.0.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_15.4.app/Contents/Developer

jobs:
BuildWebsite:
name: "Build Docs"
runs-on: macos-11.0
runs-on: macos-latest
steps:
- name: 🛒 Checkout
uses: actions/checkout@v2
Expand Down
62 changes: 14 additions & 48 deletions .github/workflows/ios-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
check-changes:
name: Check for Changes
Expand All @@ -23,50 +23,15 @@ jobs:
- '.github/workflows/ios-tests.yml'
- '**/*.swift'
#####################
# macOS 11 Versions #
#####################

build-ios-macos-11-matrix:
name: iOS Metrix - macOS 11
runs-on: macos-11.0
if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }}
needs: check-changes
strategy:
matrix:
xcode: [ "11.7", "12.4", "12.5.1", "13.0", "13.1", "13.2.1" ]

env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build and Test
run: swift package generate-xcodeproj && xcrun xcodebuild test -scheme "Vexil-Package" -destination "platform=iOS Simulator,name=iPhone 8"

build-ios-macos-11:
runs-on: ubuntu-latest
name: iOS Tests - macOS 11
if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }}
needs: build-ios-macos-11-matrix
steps:
- name: Check build matrix status
if: ${{ needs.build-ios-macos-11-matrix.result == 'failure' }}
run: exit 1

#####################
# macOS 12 Versions #
#####################

build-ios-macos-12-matrix:
name: iOS Matrix - macOS 12
runs-on: macos-12
build-ios-matrix:
name: iOS Matrix
if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }}
needs: check-changes
strategy:
matrix:
xcode: [ "13.1", "13.2.1", "13.3.1", "13.4.1", "14.0.1", "14.1", "14.2" ]
xcode: [ "15.4" ]
os: [ macos-14 ]
runs-on: ${{ matrix.os }}

env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
Expand All @@ -76,16 +41,17 @@ jobs:
uses: actions/checkout@v2
- name: Build and Test
run: |
DEVICE_ID=`xcrun simctl list --json devices available iPhone | jq -r '.devices | to_entries | map(select(.value | add)) | sort_by(.key) | last.value | first.udid'`
swift package generate-xcodeproj
xcrun xcodebuild test -scheme "Vexil-Package" -destination "platform=iOS Simulator,id=$DEVICE_ID"
set -o pipefail && \
NSUnbufferedIO=YES \
xcrun xcodebuild test -workspace . -scheme Vexil -skipMacroValidation -destination "platform=iOS Simulator,name=iPhone 15" \
| xcbeautify --renderer github-actions
build-ios-macos-12:
build-ios:
runs-on: ubuntu-latest
name: iOS Tests - macOS 12
name: iOS Tests
if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }}
needs: build-ios-macos-12-matrix
needs: build-ios-matrix
steps:
- name: Check build matrix status
if: ${{ needs.build-ios-macos-12-matrix.result == 'failure' }}
if: ${{ needs.build-ios-matrix.result == 'failure' }}
run: exit 1
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
filters: |
changed:
- '.github/workflows/lint.yml'
- '..swiftformat'
- '.swiftformat'
- '**/*.swift'
Lint:
Expand Down
17 changes: 2 additions & 15 deletions .github/workflows/linux-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,8 @@ jobs:
needs: check-changes
strategy:
matrix:
swift: [ "5.2.5", "5.3.3", "5.4.3", "5.5.3", "5.6.3", "5.7.3" ]
os: [ amazonlinux2, bionic, centos7, focal, jammy ]
exclude:
- swift: 5.2.5
os: jammy
- swift: 5.3.3
os: jammy
- swift: 5.4.3
os: jammy
- swift: 5.5.3
os: jammy
- swift: 5.6.3
os: jammy
- swift: 5.7.3
os: centos7
swift: [ "5.10.1" ]
os: [ amazonlinux2, bookworm, focal, jammy, rhel-ubi9, mantic, noble ]

container:
image: swift:${{ matrix.swift }}-${{ matrix.os }}
Expand Down
59 changes: 14 additions & 45 deletions .github/workflows/macos-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,15 @@ jobs:
- '.github/workflows/macos-tests.yml'
- '**/*.swift'
############
# macOS 11 #
############

build-macos-macos-11-matrix:
name: macOS Matrix - macOS 11
runs-on: macos-11.0
build-macos-matrix:
name: macOS Matrix
if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }}
needs: check-changes
strategy:
matrix:
xcode: [ "11.7", "12.4", "12.5.1", "13.0", "13.1", "13.2.1" ]
xcode: [ "15.4" ]
os: [ macos-14 ]
runs-on: ${{ matrix.os }}

env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
Expand All @@ -43,46 +40,18 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Build and Test
run: swift test

build-macos-macos-11:
runs-on: ubuntu-latest
name: macOS Tests - macOS 11
if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }}
needs: build-macos-macos-11-matrix
steps:
- name: Check build matrix status
if: ${{ needs.build-macos-macos-11-matrix.result == 'failure' }}
run: exit 1

############
# macOS 12 #
############

build-macos-macos-12-matrix:
name: macOS Matrix - macOS 12
runs-on: macos-12
if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }}
needs: check-changes
strategy:
matrix:
xcode: [ "13.1", "13.2.1", "13.3.1", "13.4.1", "14.0.1", "14.1", "14.2" ]

env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
run: |
set -o pipefail && \
NSUnbufferedIO=YES \
xcrun xcodebuild test -workspace . -scheme Vexil -skipMacroValidation -destination "platform=macOS,name=My Mac" \
| xcbeautify --renderer github-actions
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build and Test
run: swift

build-macos-macos-12:
build-macos:
runs-on: ubuntu-latest
name: macOS Tests - macOS 12
name: macOS Tests
if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }}
needs: build-macos-macos-12-matrix
needs: build-macos-matrix
steps:
- name: Check build matrix status
if: ${{ needs.build-macos-macos-12-matrix.result == 'failure' }}
if: ${{ needs.build-macos-matrix.result == 'failure' }}
run: exit 1
59 changes: 14 additions & 45 deletions .github/workflows/tvos-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,50 +23,15 @@ jobs:
- '.github/workflows/tvos-tests.yml'
- '**/*.swift'
#####################
# macOS 11 Versions #
#####################

build-tvos-macos-11-matrix:
name: tvOS Matrix - macOS 11
runs-on: macos-11.0
if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }}
needs: check-changes
strategy:
matrix:
xcode: [ "11.7", "12.4", "12.5.1", "13.0", "13.1", "13.2.1" ]

env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build and Test
run: swift package generate-xcodeproj && xcrun xcodebuild test -scheme "Vexil-Package" -destination "platform=tvOS Simulator,name=Apple TV 4K"

build-tvos-macos-11:
runs-on: ubuntu-latest
name: tvOS Tests - macOS 11
if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }}
needs: build-tvos-macos-11-matrix
steps:
- name: Check build matrix status
if: ${{ needs.build-tvos-macos-11-matrix.result == 'failure' }}
run: exit 1

#####################
# macOS 12 Versions #
#####################

build-tvos-macos-12-matrix:
name: tvOS Matrix - macOS 12
runs-on: macos-12
build-tvos-matrix:
name: tvOS Matrix
if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }}
needs: check-changes
strategy:
matrix:
xcode: [ "13.1", "13.2.1", "13.3.1", "13.4.1", "14.0.1", "14.1", "14.2" ]
xcode: [ "15.4" ]
os: [ macos-14 ]
runs-on: ${{ matrix.os }}

env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
Expand All @@ -75,14 +40,18 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Build and Test
run: swift package generate-xcodeproj && xcrun xcodebuild test -scheme "Vexil-Package" -destination "platform=tvOS Simulator,name=Apple TV 4K (2nd generation)"
run: |
set -o pipefail && \
NSUnbufferedIO=YES \
xcrun xcodebuild test -workspace . -scheme Vexil -skipMacroValidation -destination "platform=tvOS Simulator,name=Apple TV 4K (3rd generation)" \
| xcbeautify --renderer github-actions
build-tvos-macos-12:
build-tvos:
runs-on: ubuntu-latest
name: tvOS Tests - macOS 12
name: tvOS Tests
if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }}
needs: build-tvos-macos-12-matrix
needs: build-tvos-matrix
steps:
- name: Check build matrix status
if: ${{ needs.build-tvos-macos-12-matrix.result == 'failure' }}
if: ${{ needs.build-tvos-matrix.result == 'failure' }}
run: exit 1
57 changes: 57 additions & 0 deletions .github/workflows/visionos-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: visionOS Tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
check-changes:
name: Check for Changes
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.filter.outputs.changed }}
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
changed:
- '.github/workflows/visionos-tests.yml'
- '**/*.swift'
build-visionos-matrix:
name: visionOS Matrix
if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }}
needs: check-changes
strategy:
matrix:
xcode: [ "15.4" ]
os: [ macos-14 ]
runs-on: ${{ matrix.os }}

env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build and Test
run: |
set -o pipefail && \
NSUnbufferedIO=YES \
xcrun xcodebuild test -workspace . -scheme Vexil -skipMacroValidation -destination "platform=visionOS Simulator,name=Apple Vision Pro" \
| xcbeautify --renderer github-actions
build-visionos:
runs-on: ubuntu-latest
name: visionOS Tests
if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }}
needs: build-visionos-matrix
steps:
- name: Check build matrix status
if: ${{ needs.build-visionos-matrix.result == 'failure' }}
run: exit 1
Loading

0 comments on commit e89ea37

Please sign in to comment.