Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #37

Merged
merged 14 commits into from
Oct 1, 2023
58 changes: 46 additions & 12 deletions .github/workflows/build-example.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
name: Build Example

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

workflow_dispatch:
workflow_call:

concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
DEVELOPER_DIR: /Applications/Xcode_14.2.app/Contents/Developer
PROJECT_DIR: Example
Expand All @@ -14,18 +16,16 @@ env:
OSXSCHEME: Example
TVSCHEME: Example
WATCHSCHEME: Example
PACKAGE_NAME: OversizeUI

jobs:

jobs:

example:
name: Run examples
build-iOS-example:
name: Build iOS examples
runs-on: macOS-latest
strategy:
matrix:
iosDestination: ['platform=iOS Simulator,OS=15.0,name=iPhone 8','platform=iOS Simulator,OS=15.5,name=iPhone X','platform=iOS Simulator,OS=16.0,name=iPhone 14']
macOSDestination: ["platform=macOS,arch=x86_64"]
tvOSDestination: ["platform=tvOS Simulator,name=Apple TV 4K"]
watchOSdestination: ['platform=watchOS Simulator,name=Apple Watch Series 5 - 44mm']

steps:
- name: Checkout
Expand All @@ -36,21 +36,55 @@ jobs:
xcodebuild clean build -project "${{ env.PROJECT_DIR }}/${{ env.PROJECT_NAME }}" -scheme "${{ env.iOSSCHEME }}" | xcpretty
env:
destination: ${{ matrix.iosDestination }}

build-macOS-example:
name: Build macOS examples
runs-on: macOS-latest
strategy:
matrix:
macOSDestination: ["platform=macOS,arch=x86_64"]

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Build macOS
run: |
xcodebuild clean build -project "${{ env.PROJECT_DIR }}/${{ env.PROJECT_NAME }}" -scheme "${{ env.OSXSCHEME }}" | xcpretty
env:
destination: ${{ matrix.macOSDestination }}

build-tvOS-example:
name: Build tvOS examples
runs-on: macOS-latest
strategy:
matrix:
tvOSDestination: ["platform=tvOS Simulator,name=Apple TV 4K"]

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Build tvOS
run: |
xcodebuild clean build -project "${{ env.PROJECT_DIR }}/${{ env.PROJECT_NAME }}" -scheme "${{ env.TVSCHEME }}" | xcpretty
env:
destination: ${{ matrix.tvOSDestination }}

build-watchOS-example:
name: Build watchOS examples
runs-on: macOS-latest
strategy:
matrix:
watchOSdestination: ['platform=watchOS Simulator,name=Apple Watch Series 5 - 44mm']

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Build watchOS
run: |
xcodebuild clean build -project "${{ env.PROJECT_DIR }}/${{ env.PROJECT_NAME }}" -scheme "${{ env.WATCHSCHEME }}" | xcpretty
env:
destination: ${{ matrix.watchOSdestination }}

25 changes: 25 additions & 0 deletions .github/workflows/build-swiftpm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build Example

on:
workflow_dispatch:
workflow_call:

concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
PACKAGE_NAME: OversizeUI

jobs:

swiftpm:
name: Build SwiftPM
runs-on: macOS-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Build Package
run: xcodebuild clean build -skipPackagePluginValidation -scheme ${{ env.PACKAGE_NAME }} -destination 'platform=iOS Simulator,name=iPhone 8,OS=16.2' | xcpretty && exit ${PIPESTATUS[0]}
7 changes: 2 additions & 5 deletions .github/workflows/bump.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: Bump version
on:
pull_request:
types:
- closed
branches:
- main
workflow_dispatch:
workflow_call:

jobs:

Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/ci-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: CI - Pull Request
on:
pull_request:
branches:
- 'main'
workflow_dispatch:
jobs:
build-swiftpm:
name: Build SwiftPM
uses: ./.github/workflows/build-swiftpm.yml
secrets: inherit
build-example:
name: Build Examples
needs: build-swiftpm
uses: ./.github/workflows/build-example.yml
secrets: inherit
33 changes: 33 additions & 0 deletions .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI - Release
on:
pull_request:
types:
- closed
branches:
- main
workflow_dispatch:
jobs:
build-swiftpm:
name: Build SwiftPM
uses: ./.github/workflows/build-swiftpm.yml
secrets: inherit
build-example:
name: Build Examples
needs: build-swiftpm
uses: ./.github/workflows/build-example.yml
secrets: inherit
bump:
name: Bump version
needs: [build-swiftpm, build-example]
uses: ./.github/workflows/bump.yml
secrets: inherit
release:
name: Release
needs: [build-swiftpm, build-example, bump]
uses: ./.github/workflows/release.yml
secrets: inherit
publish-docc:
name: Publish docc
needs: [build-swiftpm, build-example, bump]
uses: ./.github/workflows/publish-docc.yml
secrets: inherit
4 changes: 2 additions & 2 deletions .github/workflows/publish-docc.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Deploy DocC
on:
push:
branches: ["main"]
workflow_dispatch:
workflow_call:
permissions:
contents: read
pages: write
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: Release

on:
push:
tags:
- "*.*.*"
workflow_dispatch:
workflow_call:

jobs:
build:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ xcuserdata/
DerivedData/
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
/.idea/
/Package.resolved
10 changes: 7 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@ let package = Package(
products: [
.library(name: "OversizeUI", targets: ["OversizeUI"]),
],
dependencies: [],
dependencies: [
.package(url: "https://github.com/SwiftGen/SwiftGenPlugin", from: "6.6.2"),
],
targets: [
.target(
name: "OversizeUI",
dependencies: [],
resources: [.process("Resources")]
// swiftSettings: [.define("ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS")]
resources: [.process("Resources")],
plugins: [
.plugin(name: "SwiftGenPlugin", package: "SwiftGenPlugin"),
]
),
.testTarget(name: "OversizeUITests", dependencies: ["OversizeUI"]),
]
Expand Down
31 changes: 0 additions & 31 deletions Scripts/swiftgen.yml

This file was deleted.

Loading
Loading