Skip to content

Commit 19ee9cc

Browse files
authored
External dependencies management (#6)
1 parent f7dd61b commit 19ee9cc

File tree

8 files changed

+320
-74
lines changed

8 files changed

+320
-74
lines changed

.github/workflows/linux.yml

Lines changed: 52 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ defaults:
1111
shell: bash -l -eo pipefail {0}
1212

1313
jobs:
14-
build_linux:
14+
linux_build_from_conda_forge:
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:
@@ -20,22 +20,63 @@ jobs:
2020
steps:
2121
- name: Checkout repository
2222
uses: actions/checkout@v4
23+
2324
- name: Create build environment
2425
uses: mamba-org/setup-micromamba@v2
2526
with:
2627
environment-file: ./environment-dev.yml
2728
environment-name: build_env
2829
cache-environment: true
29-
- name: Build sparrow-ipc
30+
31+
- name: Configure using cmake
3032
run: |
31-
cmake -B build/ -G Ninja \
32-
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
33-
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
34-
-DCMAKE_PREFIX_PATH=$CONDA_PREFIX \
35-
-DSPARROW_IPC_BUILD_SHARED=${{ matrix.build_shared }} \
36-
-DBUILD_TESTS=ON
37-
cmake --build build/ --parallel
33+
cmake -G Ninja \
34+
-Bbuild \
35+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
36+
-DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX% \
37+
-DCMAKE_PREFIX_PATH=%CONDA_PREFIX% \
38+
-DSPARROW_IPC_BUILD_SHARED=${{ matrix.build_shared }} \
39+
-DSPARROW_IPC_BUILD_TESTS=ON
40+
41+
- name: Build sparrow-ipc
42+
working-directory: build
43+
run: cmake --build . --target sparrow-ipc
44+
45+
- name: Build tests
46+
working-directory: build
47+
run: cmake --build . --target test_sparrow_ipc_lib
48+
3849
- name: Run tests
50+
working-directory: build
51+
run: cmake --build . --target run_tests_with_junit_report
52+
53+
linux_build_fetch_from_source:
54+
runs-on: ubuntu-latest
55+
strategy:
56+
matrix:
57+
build_type: [Release, Debug]
58+
build_shared: [ON, OFF]
59+
steps:
60+
- name: Checkout repository
61+
uses: actions/checkout@v4
62+
63+
- name: Configure using cmake
3964
run: |
40-
cd build
41-
ctest --output-on-failure
65+
cmake -G Ninja \
66+
-Bbuild \
67+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
68+
-DSPARROW_IPC_BUILD_SHARED=${{ matrix.build_shared }} \
69+
-DSPARROW_IPC_BUILD_TESTS=ON \
70+
-DFETCH_DEPENDENCIES_WITH_CMAKE=MISSING
71+
72+
- name: Build sparrow-ipc
73+
working-directory: build
74+
run: cmake --build . --target sparrow-ipc
75+
76+
- name: Build tests
77+
working-directory: build
78+
run: cmake --build . --target test_sparrow_ipc_lib
79+
80+
- name: Run tests
81+
working-directory: build
82+
run: cmake --build . --target run_tests_with_junit_report

.github/workflows/osx.yml

Lines changed: 62 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ defaults:
1111
shell: bash -l -eo pipefail {0}
1212

1313
jobs:
14-
build_osx:
14+
osx_build_from_conda_forge:
1515
runs-on: macos-latest
1616
strategy:
1717
matrix:
@@ -20,22 +20,73 @@ jobs:
2020
steps:
2121
- name: Checkout repository
2222
uses: actions/checkout@v4
23+
24+
- name: Select XCode version
25+
run: |
26+
sudo xcode-select --switch /Applications/Xcode_16.4.app/Contents/Developer
27+
xcodebuild -version
28+
2329
- name: Create build environment
2430
uses: mamba-org/setup-micromamba@v2
2531
with:
2632
environment-file: ./environment-dev.yml
2733
environment-name: build_env
2834
cache-environment: true
29-
- name: Build sparrow-ipc
35+
36+
- name: Configure using cmake
3037
run: |
31-
cmake -B build/ -G Ninja \
32-
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
33-
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
34-
-DCMAKE_PREFIX_PATH=$CONDA_PREFIX \
35-
-DSPARROW_IPC_BUILD_SHARED=${{ matrix.build_shared }} \
36-
-DBUILD_TESTS=ON
37-
cmake --build build/ --parallel
38+
cmake -G Ninja \
39+
-Bbuild \
40+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
41+
-DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX% \
42+
-DCMAKE_PREFIX_PATH=%CONDA_PREFIX% \
43+
-DSPARROW_IPC_BUILD_SHARED=${{ matrix.build_shared }} \
44+
-DSPARROW_IPC_BUILD_TESTS=ON
45+
46+
- name: Build sparrow-ipc
47+
working-directory: build
48+
run: cmake --build . --target sparrow-ipc
49+
50+
- name: Build tests
51+
working-directory: build
52+
run: cmake --build . --target test_sparrow_ipc_lib
53+
3854
- name: Run tests
55+
working-directory: build
56+
run: cmake --build . --target run_tests_with_junit_report
57+
58+
osx_build_fetch_from_source:
59+
runs-on: macos-latest
60+
strategy:
61+
matrix:
62+
build_type: [Release, Debug]
63+
build_shared: [ON, OFF]
64+
steps:
65+
- name: Checkout repository
66+
uses: actions/checkout@v4
67+
68+
- name: Select XCode version
3969
run: |
40-
cd build
41-
ctest --output-on-failure
70+
sudo xcode-select --switch /Applications/Xcode_16.4.app/Contents/Developer
71+
xcodebuild -version
72+
73+
- name: Configure using cmake
74+
run: |
75+
cmake -G Ninja \
76+
-Bbuild \
77+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
78+
-DSPARROW_IPC_BUILD_SHARED=${{ matrix.build_shared }} \
79+
-DSPARROW_IPC_BUILD_TESTS=ON \
80+
-DFETCH_DEPENDENCIES_WITH_CMAKE=MISSING
81+
82+
- name: Build sparrow-ipc
83+
working-directory: build
84+
run: cmake --build . --target sparrow-ipc
85+
86+
- name: Build tests
87+
working-directory: build
88+
run: cmake --build . --target test_sparrow_ipc_lib
89+
90+
- name: Run tests
91+
working-directory: build
92+
run: cmake --build . --target run_tests_with_junit_report

.github/workflows/windows.yml

Lines changed: 54 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ on:
88

99
defaults:
1010
run:
11-
# micromamba activation
12-
shell: cmd /C call {0}
11+
shell: bash -e -l {0}
1312

1413
jobs:
15-
build_windows:
14+
windows_build_from_conda_forge:
1615
runs-on: windows-latest
1716
strategy:
1817
matrix:
@@ -21,27 +20,63 @@ jobs:
2120
steps:
2221
- name: Checkout repository
2322
uses: actions/checkout@v4
23+
2424
- name: Create build environment
2525
uses: mamba-org/setup-micromamba@v2
2626
with:
2727
environment-file: ./environment-dev.yml
2828
environment-name: build_env
29+
init-shell: bash
2930
cache-environment: true
30-
init-shell: cmd.exe
31+
32+
- name: Configure using cmake
33+
run: |
34+
cmake -S ./ -B ./build \
35+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
36+
-DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX% \
37+
-DCMAKE_PREFIX_PATH=%CONDA_PREFIX% \
38+
-DSPARROW_IPC_BUILD_SHARED=${{ matrix.build_shared }} \
39+
-DSPARROW_IPC_BUILD_TESTS=ON
40+
3141
- name: Build sparrow-ipc
42+
working-directory: build
43+
run: cmake --build . --target sparrow-ipc
44+
45+
- name: Build tests
46+
working-directory: build
47+
run: cmake --build . --target test_sparrow_ipc_lib
48+
49+
- name: Run tests
50+
working-directory: build
3251
run: |
33-
cmake -B build/ -G Ninja ^
34-
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ^
35-
-DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX% ^
36-
-DCMAKE_PREFIX_PATH=%CONDA_PREFIX% ^
37-
-DSPARROW_IPC_BUILD_SHARED=${{ matrix.build_shared }} ^
38-
-DBUILD_TESTS=ON
39-
if %errorlevel% neq 0 exit /b %errorlevel%
40-
cmake --build build/ --parallel
41-
if %errorlevel% neq 0 exit /b %errorlevel%
42-
# TODO this is failing (to debug when dependencies can be fetched and built locally with debug mode)
43-
#- name: Run tests
44-
#run: |
45-
#cd build
46-
#ctest --output-on-failure
47-
#if %errorlevel% neq 0 exit /b %errorlevel%
52+
cmake --build . --target run_tests
53+
54+
windows_build_fetch_from_source:
55+
runs-on: windows-latest
56+
strategy:
57+
matrix:
58+
build_type: [Release, Debug]
59+
build_shared: [ON, OFF]
60+
steps:
61+
- name: Checkout repository
62+
uses: actions/checkout@v4
63+
64+
- name: Configure using cmake
65+
run: |
66+
cmake -S ./ -B ./build \
67+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
68+
-DSPARROW_IPC_BUILD_SHARED=${{ matrix.build_shared }} \
69+
-DSPARROW_IPC_BUILD_TESTS=ON \
70+
-DFETCH_DEPENDENCIES_WITH_CMAKE=MISSING
71+
72+
- name: Build sparrow-ipc
73+
working-directory: build
74+
run: cmake --build . --target sparrow-ipc
75+
76+
- name: Build tests
77+
working-directory: build
78+
run: cmake --build . --target test_sparrow_ipc_lib
79+
80+
- name: Run tests
81+
working-directory: build
82+
run: cmake --build . --target run_tests_with_junit_report

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,5 @@
3333

3434
# Build directories
3535
/build*/
36+
.cache
37+
.vscode

0 commit comments

Comments
 (0)