From 644d05e59f7e106fea7dc5918fb0a82efe1fab75 Mon Sep 17 00:00:00 2001 From: Tom Schoonjans Date: Tue, 30 Aug 2022 08:03:46 +0530 Subject: [PATCH 1/2] Enable visual studio builds --- .github/workflows/ci.yml | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9308c76..44b206f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,22 +11,21 @@ on: - master jobs: -# disable visual studio build until the exported symbols problem is fixed once and for all -# visual-studio: -# timeout-minutes: 60 -# runs-on: windows-latest + visual-studio: + timeout-minutes: 60 + runs-on: windows-latest -# steps: -# - uses: actions/checkout@v2 -# - name: Setup python -# uses: actions/setup-python@v1 -# with: -# python-version: 3.8 -# - uses: ilammy/msvc-dev-cmd@v1 -# - uses: BSFishy/meson-build@v1.0.1 -# with: -# action: test -# setup-options: -Dwith-fortran=false + steps: + - uses: actions/checkout@v2 + - name: Setup python + uses: actions/setup-python@v1 + with: + python-version: 3.8 + - uses: ilammy/msvc-dev-cmd@v1 + - uses: BSFishy/meson-build@v1.0.1 + with: + action: test + # setup-options: -Dwith-fortran=false macos: timeout-minutes: 60 From 5c373110f7da0b4544aeda2690e060e3491382db Mon Sep 17 00:00:00 2001 From: Tom Schoonjans Date: Tue, 30 Aug 2022 08:15:02 +0530 Subject: [PATCH 2/2] Use miniconda for visual studio build --- .github/workflows/ci.yml | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 44b206f..6c7921e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,18 +14,34 @@ jobs: visual-studio: timeout-minutes: 60 runs-on: windows-latest - + strategy: + matrix: + python-version: ['3.8', '3.9', '3.10'] + compiler: + - cl + - clang-cl + - clang + name: Visual Studio with ${{matrix.compiler}} and Python ${{ matrix.python-version }} steps: - - uses: actions/checkout@v2 - - name: Setup python - uses: actions/setup-python@v1 - with: - python-version: 3.8 - - uses: ilammy/msvc-dev-cmd@v1 - - uses: BSFishy/meson-build@v1.0.1 - with: - action: test - # setup-options: -Dwith-fortran=false + - uses: actions/checkout@v3 + - uses: conda-incubator/setup-miniconda@v2.1.1 + with: + auto-update-conda: true + channels: conda-forge + python-version: ${{ matrix.python-version }} + - name: Install meson, ninja, numpy and cython + run: | + conda install -q -y meson ninja clang m2w64-gcc-fortran + - uses: ilammy/msvc-dev-cmd@v1.11.0 + - name: Build with meson + run: | + meson setup meson-build --buildtype=release -Dwith-fortran=true + meson compile -C meson-build + meson test -C meson-build + # ninja -v -C meson-build dist + env: + CC: ${{ matrix.compiler }} + CXX: ${{ matrix.compiler }} macos: timeout-minutes: 60