5656
5757 macos :
5858 runs-on : macos-15
59- # Note: Docker is not available on any GitHub macOS runners.
60- # Integration tests run only on Linux. macOS job verifies build compiles on macOS.
61- # macos-15 has native C++20 support, so no need for Homebrew LLVM installation.
6259
6360 steps :
6461 - uses : actions/checkout@v4
7168 restore-keys : |
7269 conan-${{ runner.os }}-
7370
71+ - name : Cache InfluxDB
72+ uses : actions/cache@v4
73+ id : cache-influxdb
74+ with :
75+ path : |
76+ influxdb-1.8.10-1
77+ influxdb-1.8.10_darwin_amd64.tar.gz
78+ key : influxdb-1.8.10-macos-${{ runner.os }}
79+ restore-keys : |
80+ influxdb-1.8.10-macos-
81+
7482 - name : Install Conan
7583 run : |
7684 pip install conan
@@ -84,14 +92,54 @@ jobs:
8492
8593 - name : Build project
8694 run : |
87- chmod +x scripts/build.sh scripts/test.sh scripts/start-influxdb.sh scripts/stop-influxdb.sh
95+ chmod +x scripts/build.sh scripts/test.sh
8896 ./scripts/build.sh Release
8997
90- - name : Skip integration tests (Docker unavailable on macOS)
98+ - name : Download InfluxDB (if not cached)
99+ if : steps.cache-influxdb.outputs.cache-hit != 'true'
91100 run : |
92- echo "⚠️ Docker is not available on GitHub Actions macOS runners"
93- echo "Build completed successfully, but integration tests were skipped."
94- echo "For full test coverage, see the Linux runner which supports Docker natively."
101+ INFLUXDB_VERSION=1.8.10
102+ INFLUXDB_TAR=influxdb-${INFLUXDB_VERSION}_darwin_amd64.tar.gz
103+ INFLUXDB_URL=https://dl.influxdata.com/influxdb/releases/${INFLUXDB_TAR}
104+
105+ echo "Downloading InfluxDB ${INFLUXDB_VERSION}..."
106+ curl -L -o "${INFLUXDB_TAR}" "${INFLUXDB_URL}"
107+
108+ echo "Extracting InfluxDB..."
109+ tar -xzf "${INFLUXDB_TAR}"
110+
111+ echo "Verifying InfluxDB binary..."
112+ if [ ! -f "influxdb-${INFLUXDB_VERSION}-1/usr/bin/influxd" ]; then
113+ echo "ERROR: InfluxDB binary not found at expected path: influxdb-${INFLUXDB_VERSION}-1/usr/bin/influxd"
114+ echo "Extracted contents:"
115+ ls -la influxdb-${INFLUXDB_VERSION}-1/ || true
116+ exit 1
117+ fi
118+ ls -la influxdb-${INFLUXDB_VERSION}-1/usr/bin/influxd
119+ chmod +x influxdb-${INFLUXDB_VERSION}-1/usr/bin/influxd
120+
121+ - name : Start InfluxDB
122+ run : |
123+ chmod +x scripts/start-influxdb-native.sh
124+ scripts/start-influxdb-native.sh
125+
126+ - name : Run tests
127+ run : |
128+ ./scripts/test.sh
129+
130+ - name : Run demo
131+ run : |
132+ ./scripts/run-demo.sh
133+
134+ - name : Stop InfluxDB
135+ if : always()
136+ run : |
137+ echo "Stopping InfluxDB..."
138+ if [ -n "$INFLUXDB_PID" ]; then
139+ kill $INFLUXDB_PID 2>/dev/null || true
140+ fi
141+ # Fallback: try to find and kill any remaining influxd processes
142+ pkill -f "influxd.*influxdb.conf" 2>/dev/null || true
95143
96144 macos-arm :
97145 runs-on : macos-latest
@@ -150,7 +198,14 @@ jobs:
150198 tar -xzf "${INFLUXDB_TAR}"
151199
152200 echo "Verifying InfluxDB binary..."
201+ if [ ! -f "influxdb-${INFLUXDB_VERSION}-1/usr/bin/influxd" ]; then
202+ echo "ERROR: InfluxDB binary not found at expected path: influxdb-${INFLUXDB_VERSION}-1/usr/bin/influxd"
203+ echo "Extracted contents:"
204+ ls -la influxdb-${INFLUXDB_VERSION}-1/ || true
205+ exit 1
206+ fi
153207 ls -la influxdb-${INFLUXDB_VERSION}-1/usr/bin/influxd
208+ chmod +x influxdb-${INFLUXDB_VERSION}-1/usr/bin/influxd
154209
155210 - name : Start InfluxDB
156211 run : |
0 commit comments