-
Notifications
You must be signed in to change notification settings - Fork 0
152 lines (126 loc) · 4.11 KB
/
Copy pathci.yml
File metadata and controls
152 lines (126 loc) · 4.11 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
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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: fluxgraph-ci-${{ github.ref }}
cancel-in-progress: true
env:
VCPKG_COMMIT: "66c0373dc7fca549e5803087b9487edfe3aca0a1"
jobs:
python-typecheck:
name: Python Type Checking (mypy)
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Validate Python lockfile
shell: bash
run: |
set -euo pipefail
LOCKFILE="requirements-lock.txt"
test -f "$LOCKFILE"
if od -An -tx1 "$LOCKFILE" | tr -s ' ' '\n' | grep -qx '00'; then
echo "ERROR: $LOCKFILE contains NUL bytes (binary corruption)" >&2
exit 1
fi
iconv -f UTF-8 -t UTF-8 "$LOCKFILE" > /dev/null 2>&1
echo "OK: $LOCKFILE is valid UTF-8 and contains no NUL bytes"
- name: Setup Python and dependencies
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
cache-dependency-path: requirements-lock.txt
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-lock.txt
- name: Run mypy
run: mypy tests
linux-matrix:
name: Linux ${{ matrix.lane }}
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
- lane: core-only
preset: ci-linux-release
grpc_integration: false
- lane: json
preset: ci-linux-release-json
grpc_integration: false
- lane: yaml
preset: ci-linux-release-yaml
grpc_integration: false
- lane: server-enabled
preset: ci-linux-release-server
grpc_integration: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y ninja-build g++
- name: Validate Python lockfile
if: ${{ matrix.grpc_integration }}
shell: bash
run: |
set -euo pipefail
LOCKFILE="requirements-lock.txt"
test -f "$LOCKFILE"
if od -An -tx1 "$LOCKFILE" | tr -s ' ' '\n' | grep -qx '00'; then
echo "ERROR: $LOCKFILE contains NUL bytes (binary corruption)" >&2
exit 1
fi
iconv -f UTF-8 -t UTF-8 "$LOCKFILE" > /dev/null 2>&1
echo "OK: $LOCKFILE is valid UTF-8 and contains no NUL bytes"
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: ${{ env.VCPKG_COMMIT }}
doNotCache: false
- name: Install Python integration deps
if: ${{ matrix.grpc_integration }}
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
cache-dependency-path: requirements-lock.txt
- name: Install Python integration packages
if: ${{ matrix.grpc_integration }}
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-lock.txt
- name: Configure
run: cmake --preset "${{ matrix.preset }}"
- name: Build
run: cmake --build --preset "${{ matrix.preset }}" --parallel
- name: Generate Python Protobuf Bindings
if: ${{ matrix.grpc_integration }}
run: |
bash ./scripts/generate_proto_python.sh build-server/python
- name: Run tests
run: ctest --preset "${{ matrix.preset }}"
windows-core:
name: Windows core-only
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: ${{ env.VCPKG_COMMIT }}
doNotCache: false
- name: Configure
run: cmake --preset ci-windows-release
- name: Build
run: cmake --build --preset ci-windows-release --parallel
- name: Run C++ tests
run: ctest --preset ci-windows-release