From c5aa2d381b7e2d16814db37ee275703949629c35 Mon Sep 17 00:00:00 2001 From: Johan Mabille Date: Mon, 12 Feb 2024 19:41:10 +0100 Subject: [PATCH] Added Windows workflow --- .github/workflows/windows.yml | 61 +++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/windows.yml diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 0000000..592a479 --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,61 @@ +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 -DBUILD_TESTS=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