-
Notifications
You must be signed in to change notification settings - Fork 282
148 lines (141 loc) · 5.07 KB
/
Copy pathunit_tests.yml
File metadata and controls
148 lines (141 loc) · 5.07 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
name: unit_tests
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
pod-lib-lint:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-15]
podspec: [GoogleSignIn.podspec, GoogleSignInSwiftSupport.podspec]
flag: [
"",
"--use-static-frameworks"
]
include:
- podspec: GoogleSignInSwiftSupport.podspec
includePodspecFlag: "--include-podspecs='GoogleSignIn.podspec'"
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Update Bundler
run: bundle update --bundler
- name: Install Ruby gems with Bundler
run: bundle install
- name: Lint podspec using local source
# See #400 (https://github.com/google/GoogleSignIn-iOS/issues/400)
run: |
pod lib lint ${{ matrix.podspec }} --verbose \
${{ matrix.includePodspecFlag }} ${{ matrix.flag }}
spm-build-test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-15]
sdk: ['macosx', 'iphonesimulator']
# Also run the iOS unit tests with Thread Sanitizer as well.
# It is iOS simulator only: macOS's libobjc inlines the uncontended fast
# path of the lock behind atomic properties, and Thread Sanitizer, which
# only sees lock function calls, then reports false data races on them.
# The simulator's libobjc calls the lock functions, so Thread Sanitizer
# sees the synchronization.
thread-sanitizer: [false, true]
include:
- sdk: 'macosx'
destination: '"platform=OS X,arch=x86_64"'
- sdk: 'iphonesimulator'
destination: '"platform=iOS Simulator,name=iPhone 16,OS=18.6"'
exclude:
- sdk: 'macosx'
thread-sanitizer: true
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
- name: Build unit test target
run: |
xcodebuild \
-scheme GoogleSignIn-Package \
-sdk ${{ matrix.sdk }} \
-destination ${{ matrix.destination }} \
build-for-testing \
${{ matrix.thread-sanitizer && '-enableThreadSanitizer YES' || '' }}
- name: Run unit test target
run: |
xcodebuild \
-scheme GoogleSignIn-Package \
-sdk ${{ matrix.sdk }} \
-destination ${{ matrix.destination }} \
test-without-building \
${{ matrix.thread-sanitizer && '-enableThreadSanitizer YES' || '' }}
signin-sample-spm-build:
runs-on: macos-15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
- name: Build SignInSample (SPM)
run: |
xcodebuild \
-project Samples/ObjC/SignInSample/SignInSample.xcodeproj \
-scheme SignInSample \
-destination "generic/platform=iOS Simulator" \
build
signin-sample-pods-build:
runs-on: macos-15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
- name: Update Bundler
run: bundle update --bundler
- name: Install Ruby gems with Bundler
run: bundle install
- name: Install pods
run: bundle exec pod install --project-directory=Samples/ObjC/SignInSample
- name: Build SignInSample (CocoaPods)
run: |
xcodebuild \
-workspace Samples/ObjC/SignInSample/SignInSampleForPod.xcworkspace \
-scheme SampleForPod \
-destination "generic/platform=iOS Simulator" \
build
xcode-27-preview-test:
# Build and run the unit tests against the Xcode 27 preview image. Xcode 27
# beta is the only (thus, default) Xcode on that image, so no xcode-select
# step is needed. The image is preview, so this job does not block merges.
# https://github.com/actions/runner-images/issues/14404
runs-on: xcode-27
continue-on-error: true
strategy:
fail-fast: false
matrix:
sdk: ['macosx', 'iphonesimulator']
include:
- sdk: 'macosx'
destination: '"platform=macOS"'
- sdk: 'iphonesimulator'
destination: '"platform=iOS Simulator,name=iPhone 17,OS=27.0"'
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Build unit test target
run: |
xcodebuild \
-scheme GoogleSignIn-Package \
-sdk ${{ matrix.sdk }} \
-destination ${{ matrix.destination }} \
build-for-testing
- name: Run unit test target
run: |
xcodebuild \
-scheme GoogleSignIn-Package \
-sdk ${{ matrix.sdk }} \
-destination ${{ matrix.destination }} \
test-without-building