update xeus 5 #45
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
defaults: | |
run: | |
shell: bash -l {0} | |
jobs: | |
test-unix: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-22.04, macos-12] | |
build_type: [static_build, shared_build] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get number of CPU cores | |
uses: SimenB/github-actions-cpu-cores@v2 | |
- name: Install micromamba | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: environment-dev.yml | |
- name: Make build directory | |
run: mkdir build | |
- name: Static build option | |
if: matrix.build_type == 'static_build' | |
run: | | |
CMAKE_EXTRA_ARGS="$CMAKE_EXTRA_ARGS -DXSQL_BUILD_SHARED=OFF -DXSQL_USE_SHARED_XEUS_SQL=OFF" | |
echo "CMAKE_EXTRA_ARGS=$CMAKE_EXTRA_ARGS" >> $GITHUB_ENV | |
- name: Shared build option | |
if: matrix.build_type == 'shared_build' | |
run: | | |
CMAKE_EXTRA_ARGS="$CMAKE_EXTRA_ARGS -DXSQL_BUILD_STATIC=OFF" | |
echo "CMAKE_EXTRA_ARGS=$CMAKE_EXTRA_ARGS" >> $GITHUB_ENV | |
- name: Configure cmake | |
run: | | |
cmake .. \ | |
-D CMAKE_PREFIX_PATH=$CONDA_PREFIX \ | |
-D CMAKE_INSTALL_PREFIX=$CONDA_PREFIX \ | |
-D CMAKE_INSTALL_LIBDIR=lib \ | |
-D XSQL_BUILD_TESTS=ON \ | |
-D CMAKE_C_COMPILER=$CC \ | |
-D CMAKE_CXX_COMPILER=$CXX \ | |
${{ env.CMAKE_EXTRA_ARGS }} | |
working-directory: build | |
- name: Install | |
run: make -j ${{ steps.cpu-cores.outputs.count }} install | |
working-directory: build | |
- name: Test xeus-sql C++ | |
run: ./test_xeus_sql | |
timeout-minutes: 4 | |
working-directory: build/test | |
test-win: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-2022] | |
build_type: [static_build, shared_build] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install micromamba | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
init-shell: >- | |
powershell | |
cmd.exe | |
environment-file: environment-dev.yml | |
- name: Make build directory | |
run: mkdir build | |
- name: Static build option | |
if: matrix.build_type == 'static_build' | |
run: | | |
CMAKE_EXTRA_ARGS="$CMAKE_EXTRA_ARGS -DXSQL_BUILD_SHARED=OFF -DXSQL_USE_SHARED_XEUS_SQL=OFF" | |
echo "CMAKE_EXTRA_ARGS=$CMAKE_EXTRA_ARGS" >> $GITHUB_ENV | |
- name: Shared build option | |
if: matrix.build_type == 'shared_build' | |
run: | | |
CMAKE_EXTRA_ARGS="$CMAKE_EXTRA_ARGS -DXSQL_BUILD_STATIC=OFF" | |
echo "CMAKE_EXTRA_ARGS=$CMAKE_EXTRA_ARGS" >> $GITHUB_ENV | |
- name: Configure cmake | |
shell: cmd /C call {0} | |
run: | | |
cmake .. ^ | |
-GNinja ^ | |
-DCMAKE_BUILD_TYPE=Release ^ | |
-DCMAKE_INSTALL_PREFIX="%CONDA_PREFIX%\Library" ^ | |
-DXEXTRA_JUPYTER_DATA_DIR=%CONDA_PREFIX%\share\jupyter ^ | |
-D XSQL_BUILD_TESTS=ON ^ | |
${{ env.CMAKE_EXTRA_ARGS }} | |
working-directory: build | |
- name: Build | |
shell: cmd /C call {0} | |
run: | | |
set CL=/MP | |
ninja install | |
working-directory: build | |
- name: Test xeus-sql C++ | |
shell: cmd /C call {0} | |
run: test_xeus_sql | |
timeout-minutes: 4 | |
working-directory: build\test |