Skip to content

External dependencies management #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 56 additions & 11 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ defaults:
shell: bash -l -eo pipefail {0}

jobs:
build_linux:
linux_build_from_conda_forge:
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -20,22 +20,67 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Create build environment
uses: mamba-org/setup-micromamba@v2
with:
environment-file: ./environment-dev.yml
environment-name: build_env
cache-environment: true
- name: Build sparrow-ipc

- name: Install external dependencies
run: micromamba install -n build_env -y -f ./environment-dev.yml

Comment on lines +31 to +33
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is redundant and should be completely removed.

- name: Configure using cmake
run: |
cmake -B build/ -G Ninja \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
-DCMAKE_PREFIX_PATH=$CONDA_PREFIX \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove this?

-DSPARROW_IPC_BUILD_SHARED=${{ matrix.build_shared }} \
-DBUILD_TESTS=ON
cmake --build build/ --parallel
cmake -G Ninja \
-Bbuild \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX% \
-DCMAKE_PREFIX_PATH=%CONDA_PREFIX% \
-DSPARROW_IPC_BUILD_SHARED=${{ matrix.build_shared }} \
-DSPARROW_IPC_BUILD_TESTS=ON \
-DFETCH_DEPENDENCIES_WITH_CMAKE=MISSING

- name: Build sparrow-ipc
working-directory: build
run: cmake --build . --target sparrow-ipc

- name: Build tests
working-directory: build
run: cmake --build . --target test_sparrow_ipc_lib

- name: Run tests
working-directory: build
run: cmake --build . --target run_tests_with_junit_report

linux_build_fetch_from_source:
runs-on: ubuntu-latest
strategy:
matrix:
build_type: [Release, Debug]
build_shared: [ON, OFF]
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Configure using cmake
run: |
cd build
ctest --output-on-failure
cmake -G Ninja \
-Bbuild \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DSPARROW_IPC_BUILD_SHARED=${{ matrix.build_shared }} \
-DSPARROW_IPC_BUILD_TESTS=ON \
-DFETCH_DEPENDENCIES_WITH_CMAKE=MISSING

- name: Build sparrow-ipc
working-directory: build
run: cmake --build . --target sparrow-ipc

- name: Build tests
working-directory: build
run: cmake --build . --target test_sparrow_ipc_lib

- name: Run tests
working-directory: build
run: cmake --build . --target run_tests_with_junit_report
75 changes: 63 additions & 12 deletions .github/workflows/osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,82 @@ defaults:
shell: bash -l -eo pipefail {0}

jobs:
build_osx:
runs-on: macos-latest
osx_build_from_conda_forge:
runs-on: macos-15
strategy:
matrix:
build_type: [Release, Debug]
build_shared: [ON, OFF]
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Select XCode version
run: |
sudo xcode-select --switch /Applications/Xcode_16.4.app/Contents/Developer
xcodebuild -version

- name: Create build environment
uses: mamba-org/setup-micromamba@v2
with:
environment-file: ./environment-dev.yml
environment-name: build_env
cache-environment: true
- name: Build sparrow-ipc

- name: Configure using cmake
run: |
cmake -B build/ -G Ninja \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
-DCMAKE_PREFIX_PATH=$CONDA_PREFIX \
-DSPARROW_IPC_BUILD_SHARED=${{ matrix.build_shared }} \
-DBUILD_TESTS=ON
cmake --build build/ --parallel
cmake -G Ninja \
-Bbuild \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX% \
-DCMAKE_PREFIX_PATH=%CONDA_PREFIX% \
-DSPARROW_IPC_BUILD_SHARED=${{ matrix.build_shared }} \
-DSPARROW_IPC_BUILD_TESTS=ON

- name: Build sparrow-ipc
working-directory: build
run: cmake --build . --target sparrow-ipc

- name: Build tests
working-directory: build
run: cmake --build . --target test_sparrow_ipc_lib

- name: Run tests
working-directory: build
run: cmake --build . --target run_tests_with_junit_report

osx_build_fetch_from_source:
runs-on: macos-15
strategy:
matrix:
build_type: [Release, Debug]
build_shared: [ON, OFF]
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Select XCode version
run: |
sudo xcode-select --switch /Applications/Xcode_16.4.app/Contents/Developer
xcodebuild -version

- name: Configure using cmake
run: |
cd build
ctest --output-on-failure
cmake -G Ninja \
-Bbuild \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DSPARROW_IPC_BUILD_SHARED=${{ matrix.build_shared }} \
-DSPARROW_IPC_BUILD_TESTS=ON \
-DFETCH_DEPENDENCIES_WITH_CMAKE=MISSING

- name: Build sparrow-ipc
working-directory: build
run: cmake --build . --target sparrow-ipc

- name: Build tests
working-directory: build
run: cmake --build . --target test_sparrow_ipc_lib

- name: Run tests
working-directory: build
run: cmake --build . --target run_tests_with_junit_report
73 changes: 54 additions & 19 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ on:

defaults:
run:
# micromamba activation
shell: cmd /C call {0}
shell: bash -e -l {0}

jobs:
build_windows:
windows_build_from_conda_forge:
runs-on: windows-latest
strategy:
matrix:
Expand All @@ -21,27 +20,63 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Create build environment
uses: mamba-org/setup-micromamba@v2
with:
environment-file: ./environment-dev.yml
environment-name: build_env
init-shell: bash
cache-environment: true
init-shell: cmd.exe

- name: Configure using cmake
run: |
cmake -S ./ -B ./build \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX% \
-DCMAKE_PREFIX_PATH=%CONDA_PREFIX% \
-DSPARROW_IPC_BUILD_SHARED=${{ matrix.build_shared }} \
-DSPARROW_IPC_BUILD_TESTS=ON

- name: Build sparrow-ipc
working-directory: build
run: cmake --build . --target sparrow-ipc

- name: Build tests
working-directory: build
run: cmake --build . --target test_sparrow_ipc_lib

- name: Run tests
working-directory: build
run: |
cmake -B build/ -G Ninja ^
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ^
-DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX% ^
-DCMAKE_PREFIX_PATH=%CONDA_PREFIX% ^
-DSPARROW_IPC_BUILD_SHARED=${{ matrix.build_shared }} ^
-DBUILD_TESTS=ON
if %errorlevel% neq 0 exit /b %errorlevel%
cmake --build build/ --parallel
if %errorlevel% neq 0 exit /b %errorlevel%
# TODO this is failing (to debug when dependencies can be fetched and built locally with debug mode)
#- name: Run tests
#run: |
#cd build
#ctest --output-on-failure
#if %errorlevel% neq 0 exit /b %errorlevel%
cmake --build . --target run_tests

windows_build_fetch_from_source:
runs-on: windows-latest
strategy:
matrix:
build_type: [Release, Debug]
build_shared: [ON, OFF]
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Configure using cmake
run: |
cmake -S ./ -B ./build \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DSPARROW_IPC_BUILD_SHARED=${{ matrix.build_shared }} \
-DSPARROW_IPC_BUILD_TESTS=ON \
-DFETCH_DEPENDENCIES_WITH_CMAKE=MISSING

- name: Build sparrow-ipc
working-directory: build
run: cmake --build . --target sparrow-ipc

- name: Build tests
working-directory: build
run: cmake --build . --target test_sparrow_ipc_lib

- name: Run tests
working-directory: build
run: cmake --build . --target run_tests_with_junit_report
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@

# Build directories
/build*/
.cache
.vscode
Loading
Loading