File tree Expand file tree Collapse file tree 2 files changed +54
-1
lines changed
Expand file tree Collapse file tree 2 files changed +54
-1
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : verify examples workflow
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ jobs :
10+ bazel-tests :
11+ name : Bazel Tests
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Checkout Code
15+ uses : actions/checkout@v3
16+
17+ - name : Install Bazel
18+ run : |
19+ sudo apt-get update
20+ sudo apt-get install -y bazel
21+
22+ - name : Run Bazel tests
23+ run : |
24+ # Assumes BUILD files are configured under examples/
25+ bazel test //examples/...
26+
27+ cmake-tests :
28+ name : CMake Tests
29+ runs-on : ubuntu-latest
30+ steps :
31+ - name : Checkout Code
32+ uses : actions/checkout@v3
33+
34+ - name : Install CMake
35+ run : |
36+ sudo apt-get update
37+ sudo apt-get install -y cmake
38+
39+ - name : Build and Test CMake Examples
40+ run : |
41+ # Loop over all immediate subdirectories under examples/
42+ for d in examples/*/ ; do
43+ if [ -f "$d/CMakeLists.txt" ]; then
44+ echo "Building CMake project in $d"
45+ mkdir -p "$d/build"
46+ pushd "$d/build"
47+ cmake ..
48+ cmake --build .
49+ ctest --output-on-failure || exit 1
50+ popd
51+ else
52+ echo "Skipping $d as no CMakeLists.txt found."
53+ fi
54+ done
You can’t perform that action at this time.
0 commit comments