-
Notifications
You must be signed in to change notification settings - Fork 593
168 lines (150 loc) · 6.08 KB
/
ci.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
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
name: Build and test
on:
workflow_dispatch:
push:
branches: ["main"]
pull_request:
# The branches below must be a subset of the branches above
branches: ["main"]
# See https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
ci:
name: ${{ matrix.config }} on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# Release builds
- os: macos-15
config: "release"
- os: ubuntu-24.04
config: "release"
- os: windows-2022
config: "release"
build_flags: "/p:Platform=x64"
test_flags: "--platform=x64"
- os: windows-2022
config: "cpp-win32-release"
working_directory: "cpp"
build_flags: "/p:Platform=Win32"
msbuild_project: "msbuild/ice.proj"
test_flags: "--platform=Win32"
# Debug builds
- os: macos-15
config: "debug"
build_flags: "OPTIMIZE=no"
test_flags: "--swift-config=debug"
- os: ubuntu-24.04
config: "debug"
build_flags: "OPTIMIZE=no"
# TODO - figure out how to properly install debug Python
- os: windows-2022
config: "debug"
working_directory: "cpp"
build_flags: "/p:Platform=x64 /p:Configuration=Debug"
test_flags: "--platform=x64 --config=Debug"
msbuild_project: "msbuild/ice.proj"
# Swift iOS
- os: macos-15
config: "swift-ios"
working_directory: "swift"
build_flags: "PLATFORMS='macosx iphonesimulator'"
test_flags: "--platform=iphonesimulator --controller-app --rfilter=Ice/operations" # Remove rfilter once #3286 is fixed
build_cpp_and_python: true
# Static builds
- os: ubuntu-24.04
config: "static"
build_flags: "CONFIGS=static"
test_flags: "--config=static --filter=Ice/ --filter=IceDiscovery/"
working_directory: "cpp"
# # Xcode SDK builds
# # TODO - Should we also test the debug config here as well?
# - macos-15
# config: "xcodesdk"
# working_directory: "cpp"
# build_flags: "CONFIGS=xcodesdk PLATFORMS=iphonesimulator"
# test_flags: "--config=xcodesdk --platform=iphonesimulator --controller-app"
# build_cpp_and_python: true
# MATLAB
- os: ubuntu-24.04
config: "matlab"
working_directory: "matlab"
build_cpp_and_python: true
- os: windows-2022
config: "matlab"
working_directory: "matlab"
build_flags: "/p:Platform=x64"
msbuild_project: "msbuild/ice.proj"
test_flags: "--platform=x64"
build_cpp_and_python: true
# Cross tests
- os: ubuntu-24.04
config: "cross"
test_flags: "--all-cross"
- os: macos-15
config: "cross"
# We want to test C++ and Swift only (in each direction)
test_flags: "--all-cross --filter cpp --filter swift"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Dependencies
uses: ./.github/actions/setup-dependencies
with:
use_matlab: ${{ matrix.config == 'matlab' }}
# See https://learn.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps
- name: Enable Windows crash dumps
run: |
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" /v DumpType /t REG_DWORD /d 2 /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" /v DumpFolder /t REG_EXPAND_SZ /d ${{ github.workspace }}\LocalDumps /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting" /v DontShowUI /t REG_DWORD /d 1 /f
shell: powershell
if: runner.os == 'Windows'
- name: Build ${{ matrix.config }} on ${{ matrix.os }}
uses: ./.github/actions/build
timeout-minutes: 90
with:
working_directory: ${{ matrix.working_directory || '.' }}
build_cpp_and_python: ${{ matrix.build_cpp_and_python || false }}
build_flags: ${{ matrix.build_flags || '' }}
msbuild_project: ${{ matrix.msbuild_project || 'ice.proj' }}
- name: Test ${{ matrix.config }} on ${{ matrix.os }}
uses: ./.github/actions/test
timeout-minutes: 30
with:
working_directory: ${{ matrix.working_directory || '.' }}
flags: ${{ matrix.test_flags }}
# Don't test matlab on Windows (see setup-dependencies/action.yml)
if: matrix.config != 'matlab' || runner.os != 'Windows'
- name: Upload test logs
uses: actions/upload-artifact@v4
with:
name: test-logs-${{ matrix.config }}-${{ matrix.os }}
path: ${{ matrix.working_directory || '.' }}/**/*.log
if-no-files-found: ignore
if: always()
- name: Upload Linux core dumps
uses: actions/upload-artifact@v4
with:
name: core-dumps-${{ matrix.config }}-${{ matrix.os }}
path: /var/lib/apport/coredump/*
if-no-files-found: ignore
if: runner.os == 'Linux' && always()
- name: Upload macOS crash diagnostics
uses: actions/upload-artifact@v4
with:
name: crash-diagnostics-${{ matrix.config }}-${{ matrix.os }}
path: ~/Library/Logs/DiagnosticReports/*.ips
if-no-files-found: ignore
if: runner.os == 'macOS' && always()
- name: Upload Windows crash dumps
uses: actions/upload-artifact@v4
with:
name: crash-dumps-${{ matrix.config }}-${{ matrix.os }}
path: ${{ github.workspace }}/LocalDumps/*
if-no-files-found: ignore
if: runner.os == 'Windows' && always()