Skip to content

Commit

Permalink
Workflows refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
gthea committed Nov 7, 2024
1 parent e0433db commit 5dc6475
Show file tree
Hide file tree
Showing 20 changed files with 133 additions and 714 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/base_build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build

on:
workflow_call:
inputs:
destination:
description: Destination
required: true
type: string
scheme:
description: Scheme to use
required: true
type: string

jobs:
build:
runs-on: [macos-14]

steps:
- name: Select Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 15.4.0

- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Build
uses: sersoft-gmbh/xcodebuild-action@v3
with:
action: build
build-settings: ONLY_ACTIVE_ARCH=NO TEST_AFTER_BUILD=NO
configuration: Debug
derived-data-path: "${{ github.workspace }}/SplitApp"
destination: ${{ inputs.destination }}
project: Split.xcodeproj
scheme: ${{ inputs.scheme }}
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
name: Build and Test iOS UT (3)
name: Build and Test iOS UT

on:
push:
branches:
- master
pull_request:
branches:
- master
- development
workflow_call:
inputs:
test-plan:
description: The test plan to run
required: true
type: string
destination:
required: true
type: string

jobs:
build:
test:
runs-on: [macos-14]

steps:
Expand All @@ -20,23 +22,22 @@ jobs:
xcode-version: 15.4.0

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Build iOS and Test
uses: sersoft-gmbh/xcodebuild-action@v3
with:
action: build test
build-settings: ONLY_ACTIVE_ARCH=NO TEST_AFTER_BUILD=YES
action: test
build-settings: ONLY_ACTIVE_ARCH=NO
configuration: Debug
derived-data-path: "${{github.workspace}}/SplitApp"
destination: 'platform=iOS Simulator,OS=17.2,name=iPhone 15'
destination: ${{ inputs.destination }}
project: Split.xcodeproj
scheme: Split
sdk: 'iphonesimulator'
test-plan: 'SplitiOSUnit_3'
use-xcpretty: true
test-plan: ${{ inputs.test-plan }}

# - name: Install java 11
# uses: actions/setup-java@v3
Expand Down
28 changes: 4 additions & 24 deletions .github/workflows/build_macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,7 @@ on:

jobs:
build:
runs-on: [macos-latest]

steps:
- name: Select Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 15.1.0

- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Build MacOS
uses: sersoft-gmbh/xcodebuild-action@v3
with:
action: build
build-settings: ONLY_ACTIVE_ARCH=NO TEST_AFTER_BUILD=NO
configuration: Debug
derived-data-path: "${{github.workspace}}/SplitApp"
destination: 'platform=macOS,arch=x86_64'
project: Split.xcodeproj
scheme: Split
use-xcpretty: true
uses: ./.github/workflows/base_build.yaml
with:
destination: 'platform=macOS,arch=x86_64'
scheme: Split
28 changes: 4 additions & 24 deletions .github/workflows/build_tvos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,7 @@ on:

jobs:
build:
runs-on: [macos-latest]

steps:
- name: Select Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 15.4.0

- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Build tvOS
uses: sersoft-gmbh/xcodebuild-action@v3
with:
action: build
build-settings: ONLY_ACTIVE_ARCH=NO TEST_AFTER_BUILD=NO
configuration: Debug
derived-data-path: "${{github.workspace}}/SplitApp"
destination: 'generic/platform=tvOS'
project: Split.xcodeproj
scheme: Split
use-xcpretty: true
uses: ./.github/workflows/base_build.yaml
with:
destination: 'generic/platform=tvOS'
scheme: Split
28 changes: 4 additions & 24 deletions .github/workflows/build_watchos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,7 @@ on:

jobs:
build:
runs-on: [macos-latest]

steps:
- name: Select Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 15.4.0

- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Build watchOS
uses: sersoft-gmbh/xcodebuild-action@v3
with:
action: build
build-settings: ONLY_ACTIVE_ARCH=NO TEST_AFTER_BUILD=NO
configuration: Debug
derived-data-path: "${{github.workspace}}/SplitApp"
destination: 'generic/platform=watchOS'
project: Split.xcodeproj
scheme: WatchOS
use-xcpretty: true
uses: ./.github/workflows/base_build.yaml
with:
destination: 'generic/platform=watchOS'
scheme: WatchOS
41 changes: 41 additions & 0 deletions .github/workflows/test_all.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build and Test iOS

on:
push:
branches:
- master
pull_request:
branches:
- master
- development

jobs:
build:
uses: ./.github/workflows/base_build.yaml
with:
destination: 'platform=iOS Simulator,OS=17.2,name=iPhone 15'
scheme: Split
test:
needs: build
strategy:
matrix:
plan: [
SplitiOSIntegration,
SplitiOSIntegration_1,
SplitiOSStreaming,
SplitiOSStreaming_1,
SplitiOSStreaming_2,
SplitiOSUnit,
SplitiOSUnit_1,
SplitiOSUnit_2,
SplitiOSUnit_3,
SplitiOSUnit_4,
SemVer,
SplitPushManagerUT,
SplitStreamingUT
]
fail-fast: false
uses: ./.github/workflows/base_ut.yaml
with:
test-plan: ${{ matrix.plan }}
destination: 'platform=iOS Simulator,OS=17.2,name=iPhone 15'
39 changes: 0 additions & 39 deletions .github/workflows/test_ios_integration.yaml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/workflows/test_ios_integration_1.yaml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/workflows/test_ios_streaming.yaml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/workflows/test_ios_streaming_1.yaml

This file was deleted.

Loading

0 comments on commit 5dc6475

Please sign in to comment.