Skip to content

Commit f426302

Browse files
committed
CI updates
1 parent a64480f commit f426302

3 files changed

Lines changed: 68 additions & 43 deletions

File tree

.github/workflows/platforms_build.yml

Lines changed: 62 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
env:
88
VCPKG_GIT_REF: 2026.03.18
99
VCPKG_DISABLE_METRICS: 1
10+
HOMEBREW_NO_INSTALL_CLEANUP: 1
1011

1112
jobs:
1213
build:
@@ -33,45 +34,70 @@ jobs:
3334
- name: Checkout Baysor
3435
uses: actions/checkout@v4
3536

37+
- name: Install Ubuntu dependencies
38+
if: runner.os == 'Linux'
39+
run: |
40+
sudo apt-get update
41+
sudo apt-get install -y -V \
42+
ca-certificates \
43+
lsb-release \
44+
wget \
45+
build-essential \
46+
ninja-build \
47+
libeigen3-dev \
48+
libspdlog-dev \
49+
libcgal-dev \
50+
libhdf5-dev \
51+
nlohmann-json3-dev \
52+
libtiff-dev
53+
wget "https://packages.apache.org/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb"
54+
sudo apt-get install -y -V "./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb"
55+
sudo apt-get update
56+
sudo apt-get install -y -V libarrow-dev libparquet-dev
57+
58+
- name: Install macOS dependencies
59+
if: runner.os == 'macOS'
60+
run: brew install ninja eigen spdlog cgal apache-arrow hdf5 nlohmann-json libtiff libomp
61+
3662
- name: Checkout vcpkg
63+
if: runner.os == 'Windows'
3764
uses: actions/checkout@v4
3865
with:
3966
repository: microsoft/vcpkg
4067
ref: ${{ env.VCPKG_GIT_REF }}
4168
path: .vcpkg
4269

4370
- name: Restore vcpkg binary cache
71+
if: runner.os == 'Windows'
4472
uses: actions/cache@v4
4573
with:
4674
path: .vcpkg-bincache
4775
key: ${{ runner.os }}-${{ matrix.triplet }}-vcpkg-${{ env.VCPKG_GIT_REF }}-${{ hashFiles('vcpkg.json') }}
4876
restore-keys: |
4977
${{ runner.os }}-${{ matrix.triplet }}-vcpkg-${{ env.VCPKG_GIT_REF }}-
5078
51-
- name: Bootstrap vcpkg
52-
if: runner.os != 'Windows'
53-
run: ./.vcpkg/bootstrap-vcpkg.sh -disableMetrics
54-
5579
- name: Bootstrap vcpkg
5680
if: runner.os == 'Windows'
5781
shell: pwsh
5882
run: .\.vcpkg\bootstrap-vcpkg.bat -disableMetrics
5983

60-
- name: Install macOS OpenMP runtime
61-
if: runner.os == 'macOS'
62-
run: brew install libomp
84+
- name: Configure Ubuntu
85+
if: runner.os == 'Linux'
86+
run: |
87+
cmake -S . -B build/ci -G Ninja \
88+
-DCMAKE_BUILD_TYPE=Release \
89+
-DBAYSOR_WITH_TESTS=OFF
6390
64-
- name: Configure
65-
if: runner.os != 'Windows'
91+
- name: Configure macOS
92+
if: runner.os == 'macOS'
6693
run: |
67-
cmake -S . -B build/ci \
94+
cmake -S . -B build/ci -G Ninja \
6895
-DCMAKE_BUILD_TYPE=Release \
6996
-DBAYSOR_WITH_TESTS=OFF \
70-
-DCMAKE_TOOLCHAIN_FILE="${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" \
71-
-DVCPKG_TARGET_TRIPLET="${{ matrix.triplet }}" \
72-
-DVCPKG_INSTALLED_DIR="${RUNNER_TEMP}/vcpkg_installed"
97+
-DOpenMP_ROOT="$(brew --prefix libomp)" \
98+
-DCMAKE_PREFIX_PATH="$(brew --prefix);$(brew --prefix apache-arrow);$(brew --prefix hdf5);$(brew --prefix libomp)"
7399
74-
- name: Configure
100+
- name: Configure Windows
75101
if: runner.os == 'Windows'
76102
shell: pwsh
77103
run: |
@@ -93,41 +119,37 @@ jobs:
93119
ubuntu_tests:
94120
name: Ubuntu tests
95121
runs-on: ubuntu-24.04
96-
env:
97-
VCPKG_ROOT: ${{ github.workspace }}/.vcpkg
98-
VCPKG_BINARY_SOURCES: clear;files,${{ github.workspace }}/.vcpkg-bincache,readwrite
99122

100123
steps:
101124
- name: Checkout Baysor
102125
uses: actions/checkout@v4
103126

104-
- name: Checkout vcpkg
105-
uses: actions/checkout@v4
106-
with:
107-
repository: microsoft/vcpkg
108-
ref: ${{ env.VCPKG_GIT_REF }}
109-
path: .vcpkg
110-
111-
- name: Restore vcpkg binary cache
112-
uses: actions/cache@v4
113-
with:
114-
path: .vcpkg-bincache
115-
key: ubuntu-tests-vcpkg-${{ env.VCPKG_GIT_REF }}-${{ hashFiles('vcpkg.json') }}
116-
restore-keys: |
117-
ubuntu-tests-vcpkg-${{ env.VCPKG_GIT_REF }}-
118-
119-
- name: Bootstrap vcpkg
120-
run: ./.vcpkg/bootstrap-vcpkg.sh -disableMetrics
127+
- name: Install Ubuntu dependencies
128+
run: |
129+
sudo apt-get update
130+
sudo apt-get install -y -V \
131+
ca-certificates \
132+
lsb-release \
133+
wget \
134+
build-essential \
135+
ninja-build \
136+
libeigen3-dev \
137+
libspdlog-dev \
138+
libcgal-dev \
139+
libhdf5-dev \
140+
nlohmann-json3-dev \
141+
libtiff-dev \
142+
libgtest-dev
143+
wget "https://packages.apache.org/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb"
144+
sudo apt-get install -y -V "./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb"
145+
sudo apt-get update
146+
sudo apt-get install -y -V libarrow-dev libparquet-dev
121147
122148
- name: Configure tests
123149
run: |
124-
cmake -S . -B build/tests \
150+
cmake -S . -B build/tests -G Ninja \
125151
-DCMAKE_BUILD_TYPE=Release \
126-
-DBAYSOR_WITH_TESTS=ON \
127-
-DVCPKG_MANIFEST_FEATURES=tests \
128-
-DCMAKE_TOOLCHAIN_FILE="${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" \
129-
-DVCPKG_TARGET_TRIPLET=x64-linux \
130-
-DVCPKG_INSTALLED_DIR="${RUNNER_TEMP}/vcpkg_installed-tests"
152+
-DBAYSOR_WITH_TESTS=ON
131153
132154
- name: Build tests
133155
run: cmake --build build/tests --target baysor baysor_tests --parallel

cmake/BaysorDependencies.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ function(baysor_find_package package_name)
44
set(multi_value_args COMPONENTS)
55
cmake_parse_arguments(BAYSOR_DEP "${options}" "${one_value_args}" "${multi_value_args}" ${ARGN})
66

7-
set(_find_args QUIET)
7+
set(_find_args)
88
if(BAYSOR_DEP_VERSION)
99
list(APPEND _find_args "${BAYSOR_DEP_VERSION}")
1010
endif()
11+
list(APPEND _find_args QUIET)
1112
if(BAYSOR_DEP_COMPONENTS)
1213
list(APPEND _find_args COMPONENTS ${BAYSOR_DEP_COMPONENTS})
1314
endif()

docs/installation.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,5 +194,7 @@ cmake -S . -B build -DArrow_DIR=/path/to/lib/cmake/arrow
194194
## Continuous Integration
195195

196196
The `platforms_build` workflow builds the `baysor` target on Ubuntu, macOS, and
197-
Windows using the vcpkg manifest. A separate Ubuntu job enables
198-
`BAYSOR_WITH_TESTS=ON`, builds `baysor_tests`, and runs `ctest`.
197+
Windows. Ubuntu and macOS use native binary packages so CI does not spend time
198+
building Apache Arrow and Thrift from source; Windows uses the vcpkg manifest.
199+
A separate Ubuntu job enables `BAYSOR_WITH_TESTS=ON`, builds `baysor_tests`, and
200+
runs `ctest`.

0 commit comments

Comments
 (0)