Skip to content

Commit

Permalink
Added Windows workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanMabille committed Feb 13, 2024
1 parent d627cc2 commit 7dddefe
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 1 deletion.
62 changes: 62 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Windows
on:
workflow_dispatch:
pull_request:
push:
branches: [master]
concurrency:
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash -e -l {0}
jobs:
build:
runs-on: ${{ matrix.runs-on }}
name: ${{ matrix.sys.compiler }}
strategy:
fail-fast: false
matrix:
runs-on: [windows-latest]
sys:
- {compiler: default}
- {compiler: clang}

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: Install mkl
run: micromamba install mkl-devel

- name: Configure using CMake
run: cmake -Bbuild -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DDOWNLOAD_GTEST=ON -G Ninja

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

- name: Run tests
working-directory: build/test
run: ./test_xtensor_blas
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# The full license is in the file LICENSE, distributed with this software. #
############################################################################

cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.8)

if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
project(xtensor-blas-test)
Expand Down

0 comments on commit 7dddefe

Please sign in to comment.