Skip to content

Commit 3d589d6

Browse files
cijothomashdost
andauthored
ci: Try to build examples in CI (open-telemetry#2711)
Co-authored-by: Harold Dost <[email protected]>
1 parent fa692d8 commit 3d589d6

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,24 @@ jobs:
213213
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
214214
with:
215215
fail_ci_if_error: true
216+
build-examples:
217+
runs-on: ubuntu-latest
218+
steps:
219+
- uses: actions/checkout@v4
220+
- uses: dtolnay/rust-toolchain@stable
221+
with:
222+
components: rustfmt
223+
- uses: arduino/setup-protoc@v3
224+
with:
225+
repo-token: ${{ secrets.GITHUB_TOKEN }}
226+
- name: Build examples
227+
run: |
228+
for example in examples/*; do
229+
if [ -d "$example" ]; then
230+
echo "Building $example"
231+
cargo build
232+
fi
233+
done
216234
cargo-machete:
217235
continue-on-error: true
218236
runs-on: ubuntu-latest
@@ -232,4 +250,4 @@ jobs:
232250
with:
233251
tool: cargo-machete
234252
- name: cargo machete
235-
run: cargo machete
253+
run: cargo machete

0 commit comments

Comments
 (0)