-
Notifications
You must be signed in to change notification settings - Fork 40
86 lines (76 loc) · 3.44 KB
/
Copy pathflatbuffers-ci.yml
File metadata and controls
86 lines (76 loc) · 3.44 KB
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
# ────────────────────────────────────────────────────────
# | FastLanes |
# ────────────────────────────────────────────────────────
# .github/workflows/flatbuffers-ci.yml
# ────────────────────────────────────────────────────────
name: FlatBuffers CI
run-name: >-
${{ github.workflow }} on ${{ github.ref_name }} (#${{ github.run_number }})
— ${{ github.event.pull_request.title || github.event.head_commit.message }}
# ─────────────────────────────────────────────────────────────
# Trigger on every push & PR, on all branches
# ─────────────────────────────────────────────────────────────
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
concurrency:
group: flatbuffers-${{ github.ref }}
cancel-in-progress: true
jobs:
flatbuffers:
name: Generate & Validate FlatBuffers + Build FastLanes
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install latest flatc from SourceForge
run: |
# grab the g++-13 build (2.5 MB)
curl -L \
-o flatc.zip \
https://sourceforge.net/projects/flatbuffers.mirror/files/v25.2.10/Linux.flatc.binary.g%2B%2B-13.zip/download
# unpack and install
sudo apt-get update && sudo apt-get install -y unzip
unzip flatc.zip -d flatc
sudo mv flatc/flatc /usr/local/bin/flatc
sudo chmod +x /usr/local/bin/flatc
- name: Generate FlatBuffers C++ (footer)
run: make generate_footer
- name: Verify generated headers exist
run: |
if [ ! -f src/include/fls/footer/datatype_generated.h ]; then
echo "❌ datatype_generated.h not found"
exit 1
fi
if [ ! -f src/include/fls/footer/footer_generated.h ]; then
echo "❌ footer_generated.h not found"
exit 1
fi
echo "✅ All expected headers found"
- name: Check regeneration updates timestamps
run: |
FILE=src/include/fls/footer/footer_generated.h
before=$(stat -c %Y "$FILE")
sleep 1
make generate_footer
after=$(stat -c %Y "$FILE")
if [ "$after" -le "$before" ]; then
echo "❌ $FILE timestamp did not update (before=$before, after=$after)"
exit 1
else
echo "✅ $FILE timestamp updated (before=$before → after=$after)"
fi
- name: Install build tools
run: |
sudo apt-get update
sudo apt-get install -y cmake ninja-build build-essential
- name: Configure FastLanes
run: |
mkdir -p build
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DFLS_ENABLE_VERBOSE_OUTPUT=ON
- name: Build FastLanes
run: cmake --build build --parallel $(nproc)