Skip to content
Merged
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
89 changes: 73 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:

jobs:


linux:

strategy:
Expand All @@ -18,12 +19,17 @@ jobs:
- {compiler: gcc, version: '11', name: c++17, flags: -DCPP17=ON}
- {compiler: clang, version: '15', name: assert, flags: -DXTENSOR_ENABLE_ASSERT=ON}
- {compiler: clang, version: '16', name: column-major, flags: -DDEFAULT_COLUMN_MAJOR=ON}
- {compiler: default, version: '', name: tbb, flags: -DXTENSOR_USE_TBB=ON -DTBB_INCLUDE_DIR=$CONDA_PREFIX/include -DTBB_LIBRARY=$CONDA_PREFIX/lib}
- {compiler: default, version: '', name: openmp, flags: -DXTENSOR_USE_OPENMP=ON}
- {compiler: default, version: '', name: noexcept, flags: -DXTENSOR_DISABLE_EXCEPTIONS=ON}
- {compiler: default, version: '', name: xsimd, flags: -DXTENSOR_USE_XSIMD=ON}
- {compiler: default, version: '', name: xsimd-tbb, flags: -DXTENSOR_USE_XSIMD=ON -DXTENSOR_USE_TBB=ON}

defaults:
run:
shell: bash -l {0}
shell: bash -e -l {0}

name: ${{ matrix.runs-on }} • ${{ matrix.sys.compiler }} ${{ matrix.sys.version }} - ${{ matrix.sys.name }}
name: ${{ matrix.runs-on }} • ${{ matrix.sys.compiler }}${{ matrix.sys.version }} - ${{ matrix.sys.name }}
runs-on: ${{ matrix.runs-on }}
steps:

Expand Down Expand Up @@ -56,10 +62,14 @@ jobs:
uses: actions/checkout@v3

- name: Set conda environment
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@main
with:
environment-name: myenv
environment-file: environment-dev.yml
init-shell: bash
cache-downloads: true
create-args: |
${{ (matrix.sys.name == 'tbb' || matrix.sys.name == 'xsimd-tbb' ) && 'tbb-devel' || '' }}

- name: Configure using CMake
run: cmake -Bbuild -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DBUILD_TESTS=ON ${{ matrix.sys.flags }}
Expand All @@ -76,43 +86,90 @@ jobs:
working-directory: build
run: ctest -R ^xtest$ --output-on-failure

default:

macos:

strategy:
fail-fast: false
matrix:
runs-on: [macos-latest, windows-latest]
runs-on: [macos-latest]

defaults:
run:
shell: bash -l {0}
shell: bash -e -l {0}

name: ${{ matrix.runs-on }} • default - default
runs-on: ${{ matrix.runs-on }}
steps:

- name: Setup MSVC
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1

- name: Checkout code
uses: actions/checkout@v3

- name: Set conda environment
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@main
with:
environment-name: myenv
environment-file: environment-dev.yml
extra-specs: |
sel(win): ninja
sel(win): tbb-devel
init-shell: bash
cache-downloads: true

- name: Configure using CMake
if: runner.os != 'Windows'
run: cmake -Bbuild -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DBUILD_TESTS=ON

- name: Install
working-directory: build
run: cmake --install .

- name: Build
working-directory: build
run: cmake --build . --target test_xtensor_lib --parallel 8

- name: Run tests
working-directory: build
run: ctest -R ^xtest$ --output-on-failure

windows:

strategy:
fail-fast: false
matrix:
runs-on: [windows-latest]
sys:
- {compiler: default}
- {compiler: clang}

defaults:
run:
shell: bash -e -l {0}

name: ${{ matrix.runs-on }} • ${{ matrix.sys.compiler }} - default
runs-on: ${{ matrix.runs-on }}
steps:

- name: Setup MSVC
if: matrix.sys.compiler == 'default'
uses: ilammy/msvc-dev-cmd@v1

- name: Setup clang
if: matrix.sys.compiler == 'clang'
run: |
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV

- name: Checkout code
uses: actions/checkout@v3

- name: Set conda environment
uses: mamba-org/setup-micromamba@main
with:
environment-name: myenv
environment-file: environment-dev.yml
init-shell: bash
cache-downloads: true
create-args: |
ninja

- name: Configure using CMake
if: runner.os == 'Windows'
run: cmake -Bbuild -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DBUILD_TESTS=ON -G Ninja

- name: Install
Expand Down
103 changes: 0 additions & 103 deletions .github/workflows/ci_extended.yaml

This file was deleted.