Skip to content

Commit f137a1c

Browse files
committed
try fixing mac and windows
1 parent 17e2d74 commit f137a1c

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,16 @@ jobs:
5454
runs-on: macos-13
5555
# Note: macos-13 is Intel-based and will be deprecated Dec 2025. Docker is not available on any GitHub macOS runners.
5656
# Integration tests run only on Linux. macOS job verifies build compiles on macOS.
57+
# We install newer LLVM/Clang via Homebrew for better C++20 support.
5758

5859
steps:
5960
- uses: actions/checkout@v4
6061

62+
- name: Install Homebrew LLVM (newer Clang for C++20 support)
63+
run: |
64+
brew install llvm
65+
echo "$(brew --prefix llvm)/bin" >> $GITHUB_PATH
66+
6167
- name: Cache Conan
6268
uses: actions/cache@v4
6369
with:
@@ -73,12 +79,25 @@ jobs:
7379
- name: Configure Conan for C++20
7480
run: |
7581
conan profile detect --force
82+
# Use Homebrew's llvm clang
83+
brew_llvm=$(brew --prefix llvm)
84+
sed -i '' "s|compiler=.*|compiler=clang|" ~/.conan2/profiles/default || true
85+
sed -i '' "s|compiler\.version=.*|compiler.version=17|" ~/.conan2/profiles/default || true
86+
sed -i '' "s|compiler\.libcxx=.*|compiler.libcxx=libc++|" ~/.conan2/profiles/default || true
7687
# Override to C++20 (not gnu20 to match CMAKE_CXX_EXTENSIONS=OFF)
7788
sed -i '' 's/compiler\.cppstd=.*/compiler.cppstd=20/' ~/.conan2/profiles/default || true
7889
echo "compiler.cppstd=20" >> ~/.conan2/profiles/default || true
90+
# Set compiler paths
91+
echo "CC=${brew_llvm}/bin/clang" >> ~/.conan2/profiles/default
92+
echo "CXX=${brew_llvm}/bin/clang++" >> ~/.conan2/profiles/default
7993
8094
- name: Build project
8195
run: |
96+
# Ensure we're using Homebrew's clang
97+
brew_llvm=$(brew --prefix llvm)
98+
export CC="${brew_llvm}/bin/clang"
99+
export CXX="${brew_llvm}/bin/clang++"
100+
export PATH="${brew_llvm}/bin:${PATH}"
82101
chmod +x scripts/build.sh scripts/test.sh scripts/start-influxdb.sh scripts/stop-influxdb.sh
83102
./scripts/build.sh Release
84103
@@ -145,13 +164,12 @@ jobs:
145164
tar -xzf "${INFLUXDB_TAR}"
146165
147166
echo "Verifying InfluxDB binary..."
148-
ls -la influxdb-${INFLUXDB_VERSION}-1/influxd
167+
ls -la influxdb-${INFLUXDB_VERSION}-1/usr/bin/influxd
149168
150169
- name: Start InfluxDB
151170
run: |
152-
cd influxdb-1.8.10-1
153171
echo "Starting InfluxDB in background..."
154-
./influxd -config ../influxdb.conf &
172+
./influxdb-1.8.10-1/usr/bin/influxd -config influxdb.conf &
155173
INFLUXDB_PID=$!
156174
echo "INFLUXDB_PID=${INFLUXDB_PID}" >> $GITHUB_ENV
157175

scripts/test.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ if %FOUND_TESTS% equ 0 (
6767
echo All tests passed!
6868
exit /b 0
6969
) else (
70-
echo %FAILED_TESTS% test(s) failed.
70+
echo %FAILED_TESTS% test^(s^) failed.
7171
exit /b 1
7272
)
7373

0 commit comments

Comments
 (0)