From ee793a2207acc30441bd022a7350fa841edb3ab8 Mon Sep 17 00:00:00 2001 From: Johan Mabille Date: Wed, 31 Jan 2024 15:18:45 +0100 Subject: [PATCH] Added Windows workflow --- .github/workflows/windows.yml | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 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..59dbb47 --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,48 @@ +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: msys2 {0} +jobs: + build: + runs-on: [windows-latest] + name: Windows + + steps: + - name: Use MinGW from MSYS2 + uses: msys2/setup-msys2@v2 + with: + msystem: MINGW64 + update: true + + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set conda environment + uses: mamba-org/setup-micromamba@v1 + with: + environment-file: environment-dev.yml + cache-environment: true + + - name: Configure using CMake + run: cmake -Bbuild -DXTENSOR_INSTALL_R_PACKAGES=OFF -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DDOWNLOAD_GTEST=ON $(Build.SourcesDirectory) + + - name: Install + working-directory: build + run: cmake --install . + + - name: Build + working-directory: build + run: cmake --build . --target test_xtensor_r --parallel 8 + + - name: Run tests (C++) + working-directory: build/test + run: ./test_xtensor_r +