This repository was archived by the owner on Jun 11, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 53
78 lines (76 loc) · 3.02 KB
/
Copy pathxcodebuild.yml
File metadata and controls
78 lines (76 loc) · 3.02 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
name: xcodebuild
on:
push:
branches: [master]
paths:
- '.github/workflows/xcodebuild.yml'
- 'InterposeKit.xcodeproj/**'
- 'Sources/**/*.[ch]'
- 'Sources/**/*.m'
- 'Sources/**/*.swift'
- 'Example/**'
- 'Tests/**/*.swift'
- 'Tests/verify_class_load_watcher.sh'
- 'Tests/verify_release_linking.sh'
- '!Tests/LinuxMain.swift'
pull_request:
paths:
- '.github/workflows/xcodebuild.yml'
- 'InterposeKit.xcodeproj/**'
- 'Sources/**/*.[ch]'
- 'Sources/**/*.m'
- 'Sources/**/*.swift'
- 'Example/**'
- 'Tests/**/*.swift'
- 'Tests/verify_class_load_watcher.sh'
- 'Tests/verify_release_linking.sh'
- '!Tests/LinuxMain.swift'
workflow_dispatch:
jobs:
xcodebuild:
strategy:
matrix:
include:
- name: default
flags_for_test: -parallel-testing-enabled NO -enableCodeCoverage YES
xcode_flags: ['-scheme InterposeKit -project InterposeKit.xcodeproj']
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- run: xcodebuild -version
- name: Release device app preserves object-hook helper
run: bash Tests/verify_release_linking.sh
- name: Class watcher observes newly loaded image
run: bash Tests/verify_class_load_watcher.sh
- name: Legacy class watcher waits for image loading
run: IKT_FORCE_DYLD_IMAGE_CALLBACK=1 bash Tests/verify_class_load_watcher.sh
- name: macOS with UTF16
if: always()
run: YAMS_DEFAULT_ENCODING=UTF16 xcodebuild ${{ matrix.xcode_flags }} ${{ matrix.flags_for_test }} -destination "platform=macOS,arch=$(uname -m)" test | xcpretty
shell: bash
- name: macOS with UTF8
if: always()
run: YAMS_DEFAULT_ENCODING=UTF8 xcodebuild ${{ matrix.xcode_flags }} ${{ matrix.flags_for_test }} -destination "platform=macOS,arch=$(uname -m)" test | xcpretty
shell: bash
- name: iPhone Simulator
if: always()
run: |
destination_id="$(xcrun simctl list devices available -j | jq -er '[.devices[] | .[] | select(.name | startswith("iPhone"))][0].udid')"
xcodebuild ${{ matrix.xcode_flags }} ${{ matrix.flags_for_test }} test -sdk iphonesimulator -destination "platform=iOS Simulator,id=$destination_id" | xcpretty
shell: bash
- name: Apple TV Simulator
if: always()
run: xcodebuild ${{ matrix.xcode_flags }} ${{ matrix.flags_for_test }} test -sdk appletvsimulator -destination "platform=tvOS Simulator,name=Apple TV" | xcpretty
shell: bash
- name: watchOS Simulator
if: always()
run: xcodebuild ${{ matrix.xcode_flags }} build -sdk watchsimulator | xcpretty
shell: bash
- name: Codecov
if: contains(matrix.xcode.flags_for_test, '-enableCodeCoverage YES')
run: |
if [[ -n "${CODECOV_TOKEN}" ]]; then
curl -s https://codecov.io/bash | bash -s
fi
shell: bash
env: { 'CODECOV_TOKEN': '${{ secrets.CODECOV_TOKEN }}' }