-
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (70 loc) · 1.91 KB
/
Common.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Common Checks
on:
pull_request:
push:
branches:
- "main"
workflow_call:
inputs:
force_all_checks:
type: boolean
required: true
workflow_dispatch:
inputs:
force_all_checks:
description: "Run all available checks (takes more time)"
type: boolean
required: true
env:
XCODE_PATH: "/Applications/Xcode_15.3.app"
jobs:
spm_tests_macos:
name: SPM Tests (Swift ${{ matrix.SWIFT_VERSION }} on macOS)
runs-on: ${{ matrix.OS }}
strategy:
matrix:
SWIFT_VERSION: ["5.10", "5.9", "5.8", "5.7", "5.5"]
include:
- SWIFT_VERSION: "5.10"
OS: macos-14
XCODE_APP_NAME: "Xcode_15.3"
- SWIFT_VERSION: "5.9"
OS: macos-13
XCODE_APP_NAME: "Xcode_15.2"
- SWIFT_VERSION: "5.8"
OS: macos-13
XCODE_APP_NAME: "Xcode_14.3.1"
- SWIFT_VERSION: "5.7"
OS: macOS-12
XCODE_APP_NAME: "Xcode_14.1"
- SWIFT_VERSION: "5.5"
OS: macOS-12
XCODE_APP_NAME: "Xcode_13.2.1"
steps:
- uses: actions/checkout@v4
- name: Select Xcode Version
run: sudo xcode-select -switch "/Applications/${{ matrix.XCODE_APP_NAME }}.app"
- name: Run Tests
run: |
swift --version
swift test -v
spm_tests_linux:
name: SPM Tests (Linux)
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Run Tests
run: |
swift --version
swift test -v
cocoapods_podspec_lint:
name: CocoaPods Podspec Linting
runs-on: macos-14
if: ${{ inputs.force_all_checks || github.event_name == 'pull_request' }}
needs: [spm_tests_macos, spm_tests_linux]
steps:
- uses: actions/checkout@v4
- name: Select Xcode Version
run: sudo xcode-select -switch ${{ env.XCODE_PATH }}
- name: Lint Podspec
run: pod lib lint --verbose