-
Notifications
You must be signed in to change notification settings - Fork 593
133 lines (120 loc) · 4.65 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
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"
# https://github.com/zeroc-ice/ice/issues/2061
test_flags: "--rfilter=csharp/Ice/adapterDeactivation"
- 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"
# https://github.com/zeroc-ice/ice/issues/2061
test_flags: "--swift-config=debug --rfilter=csharp/Ice/adapterDeactivation"
- 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"
# # 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' }}
- 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 || '.' }}
# See:
# - https://github.com/zeroc-ice/ice/issues/1653 IceGrid/replication
flags: "--rfilter=IceGrid/replication ${{ 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 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()