forked from open-telemetry/opentelemetry-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
190 lines (186 loc) · 5.85 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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
name: CI
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
base:
strategy:
fail-fast: false
matrix:
gem:
- opentelemetry-api
- opentelemetry-common
- opentelemetry-logs-api
- opentelemetry-metrics-api
- opentelemetry-registry
- opentelemetry-sdk
- opentelemetry-semantic_conventions
- opentelemetry-test-helpers
os:
- ubuntu-latest
- macos-latest
- windows-latest
name: ${{ matrix.gem }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: "Test Ruby 3.2"
uses: ./.github/actions/test_gem
with:
gem: "${{ matrix.gem }}"
ruby: "3.2"
- name: "Test Ruby 3.1"
if: "${{ matrix.os == 'ubuntu-latest' }}"
uses: ./.github/actions/test_gem
with:
gem: "${{ matrix.gem }}"
ruby: "3.1"
- name: "Test Ruby 3.0"
if: "${{ matrix.os == 'ubuntu-latest' }}"
uses: ./.github/actions/test_gem
with:
gem: "${{ matrix.gem }}"
ruby: "3.0"
yard: true
rubocop: true
build: true
- name: "Test JRuby"
if: "${{ matrix.os == 'ubuntu-latest' }}"
uses: ./.github/actions/test_gem
with:
gem: "${{ matrix.gem }}"
ruby: "jruby"
- name: "Test truffleruby"
if: "${{ matrix.os == 'ubuntu-latest' }}"
uses: ./.github/actions/test_gem
with:
gem: "${{ matrix.gem }}"
ruby: "truffleruby"
exporters:
strategy:
fail-fast: false
matrix:
gem:
- opentelemetry-exporter-jaeger
- opentelemetry-exporter-otlp
- opentelemetry-exporter-otlp-common
- opentelemetry-exporter-otlp-grpc
- opentelemetry-exporter-otlp-http
- opentelemetry-exporter-zipkin
os:
- ubuntu-latest
- macos-latest
- windows-latest
exclude:
# Doesn't build on macos
- os: macos-latest
gem: opentelemetry-exporter-jaeger
- os: windows-latest
gem: opentelemetry-exporter-otlp-grpc
name: ${{ matrix.gem }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: "Test Ruby 3.2"
uses: ./.github/actions/test_gem
with:
gem: "${{ matrix.gem }}"
ruby: "3.2"
- name: "Test Ruby 3.1"
if: "${{ matrix.os == 'ubuntu-latest' }}"
uses: ./.github/actions/test_gem
with:
gem: "${{ matrix.gem }}"
ruby: "3.1"
- name: "Test Ruby 3.0"
if: "${{ matrix.os == 'ubuntu-latest' }}"
uses: ./.github/actions/test_gem
with:
gem: "${{ matrix.gem }}"
ruby: "3.0"
yard: true
rubocop: true
build: true
- name: "JRuby Filter"
id: jruby_skip
shell: bash
run: |
echo "skip=false" >> $GITHUB_OUTPUT
[[ "${{ matrix.gem }}" == "opentelemetry-exporter-otlp" ]] && echo "skip=true" >> $GITHUB_OUTPUT
[[ "${{ matrix.gem }}" == "opentelemetry-exporter-otlp-common" ]] && echo "skip=true" >> $GITHUB_OUTPUT
[[ "${{ matrix.gem }}" == "opentelemetry-exporter-otlp-http" ]] && echo "skip=true" >> $GITHUB_OUTPUT
[[ "${{ matrix.gem }}" == "opentelemetry-exporter-otlp-grpc" ]] && echo "skip=true" >> $GITHUB_OUTPUT
# This is essentially a bash script getting evaluated, so we need to return true or the whole job fails.
true
- name: "Test JRuby"
if: "${{ matrix.os == 'ubuntu-latest' && steps.jruby_skip.outputs.skip == 'false' }}"
uses: ./.github/actions/test_gem
with:
gem: "${{ matrix.gem }}"
ruby: "jruby"
- name: "Truffleruby Filter"
id: truffleruby_skip
shell: bash
run: |
echo "skip=false" >> $GITHUB_OUTPUT
[[ "${{ matrix.gem }}" == "opentelemetry-exporter-otlp-grpc" ]] && echo "skip=true" >> $GITHUB_OUTPUT
# This is essentially a bash script getting evaluated, so we need to return true or the whole job fails.
true
- name: "Test truffleruby"
if: "${{ matrix.os == 'ubuntu-latest' && steps.truffleruby_skip.outputs.skip == 'false' }}"
uses: ./.github/actions/test_gem
with:
gem: "${{ matrix.gem }}"
ruby: "truffleruby"
propagators:
strategy:
fail-fast: false
matrix:
gem:
- opentelemetry-propagator-b3
- opentelemetry-propagator-jaeger
os:
- ubuntu-latest
- macos-latest
- windows-latest
name: ${{ matrix.gem }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: "Test Ruby 3.2"
uses: ./.github/actions/test_gem
with:
gem: "${{ matrix.gem }}"
ruby: "3.2"
- name: "Test Ruby 3.1"
if: "${{ matrix.os == 'ubuntu-latest' }}"
uses: ./.github/actions/test_gem
with:
gem: "${{ matrix.gem }}"
ruby: "3.1"
- name: "Test Ruby 3.0"
if: "${{ matrix.os == 'ubuntu-latest' }}"
uses: ./.github/actions/test_gem
with:
gem: "${{ matrix.gem }}"
ruby: "3.0"
yard: true
rubocop: true
build: true
- name: "Test JRuby"
if: "${{ matrix.os == 'ubuntu-latest' }}"
uses: ./.github/actions/test_gem
with:
gem: "${{ matrix.gem }}"
ruby: "jruby"
- name: "Test truffleruby"
if: "${{ matrix.os == 'ubuntu-latest' }}"
uses: ./.github/actions/test_gem
with:
gem: "${{ matrix.gem }}"
ruby: "truffleruby"