-
Notifications
You must be signed in to change notification settings - Fork 8
99 lines (97 loc) · 3.69 KB
/
Copy pathios.yml
File metadata and controls
99 lines (97 loc) · 3.69 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
name: iOS
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
ios_test:
name: Execute tests on iOS
permissions:
contents: read
id-token: write
strategy:
fail-fast: false
matrix:
xcode-version: ["26.6"] # Swift 6.3.3
ios-version: ["18.5"]
include:
- ios-version: "18.5"
ios-simulator-name: "iPhone 16 Pro"
runs-on:
- xcode-26.6
- ios-simulator-18.5
env:
OPENATTRIBUTEGRAPH_WERROR: 1
OPENATTRIBUTEGRAPH_USE_LOCAL_DEPS: 1
OPENATTRIBUTEGRAPH_TARGET_RELEASE: 2024
DARWINPRIVATEFRAMEWORKS_TARGET_RELEASE: 2024
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup Xcode
uses: OpenSwiftUIProject/setup-xcode@v2
with:
xcode-version: ${{ matrix.xcode-version }}
- name: Set up mise
uses: jdx/mise-action@v2
with:
install: false
cache: false
- name: Set up Tuist
run: |
source Scripts/Tuist/common.sh
tuist_ci_setup
shell: bash
- name: Set up build environment
run: Scripts/CI/darwin_setup_build.sh
shell: bash
- name: Build in debug mode on iOS
run: |
source Scripts/Tuist/common.sh
tuist_xcodebuild \
"${RUNNER_TEMP:-/tmp}/openattributegraph-ios-build-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT:-0}.xcresult" \
build \
-workspace .swiftpm/xcode/package.xcworkspace \
-scheme OpenAttributeGraph-Package \
-configuration Debug \
-destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }}" \
-derivedDataPath .build-debug \
-skipMacroValidation \
-skipPackagePluginValidation \
OTHER_SWIFT_FLAGS="-warnings-as-errors"
- name: Build and run tests in debug mode with coverage on iOS Simulator
run: |
source Scripts/Tuist/common.sh
tuist_xcodebuild \
"${RUNNER_TEMP:-/tmp}/openattributegraph-ios-test-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT:-0}.xcresult" \
test \
-workspace .swiftpm/xcode/package.xcworkspace \
-scheme OpenAttributeGraph-Package \
-configuration Debug \
-destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }}" \
-enableCodeCoverage=YES \
-derivedDataPath .build-test-debug \
-skipPackagePluginValidation \
-skipMacroValidation
# OTHER_SWIFT_FLAGS="-warnings-as-errors" Conflicting options '-warnings-as-errors' and '-suppress-warnings'
- name: Generate iOS coverage report
run: |
# Extract profdata and binary from xcodebuild's derived data to generate
# llvm-cov text output (same format as macOS/Ubuntu workflows).
# Note: swift_project param in codecov-action doesn't auto-discover xcodebuild coverage,
# and xcrun xccov JSON format isn't recognized by Codecov's parser.
PROFDATA=$(find .build-test-debug -name "Coverage.profdata" -type f | head -1)
XCTEST=$(find .build-test-debug -name "*.xctest" -type d | head -1)
if [ -n "$PROFDATA" ] && [ -n "$XCTEST" ]; then
BINARY="$XCTEST/$(basename "$XCTEST" .xctest)"
xcrun llvm-cov show -instr-profile="$PROFDATA" "$BINARY" > coverage.txt
fi
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: ios
verbose: true