From aa5adde1ca70067cf163ecc1287b52a06bbb3a9c Mon Sep 17 00:00:00 2001 From: Benedikt Reinartz Date: Wed, 9 Dec 2020 19:48:32 +0100 Subject: [PATCH 1/4] Add macos and windows to build-matrix --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 84d3d8706..4244a18f8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,11 +5,12 @@ on: [ pull_request, push ] jobs: build-test: name: Build and Test - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }}-latest strategy: fail-fast: false matrix: + os: [windows, ubuntu, macos] python: [3.6, 3.7, 3.8, 3.9] shutdown_mode: [Normal, Soft] @@ -44,5 +45,4 @@ jobs: run: dotnet test src/embed_tests/ # TODO: Run perf tests - # TODO: Run tests on macos and windows as well - # TODO: Run tests on Windows on .NET Framework + # TODO: Run mono tests on Windows? From 7acdc1bc2f50bd98ac9ba79855bf77afb81de46e Mon Sep 17 00:00:00 2001 From: Benedikt Reinartz Date: Thu, 10 Dec 2020 15:55:46 +0100 Subject: [PATCH 2/4] Force platform for tests --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4244a18f8..03fb1bef6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,6 +12,7 @@ jobs: matrix: os: [windows, ubuntu, macos] python: [3.6, 3.7, 3.8, 3.9] + platform: [x64] shutdown_mode: [Normal, Soft] env: @@ -42,7 +43,7 @@ jobs: run: pytest - name: Run Embedding tests - run: dotnet test src/embed_tests/ + run: dotnet test --runtime any-${{ matrix.platform }} src/embed_tests/ # TODO: Run perf tests # TODO: Run mono tests on Windows? From efe169eaa834f229e9e60c6c54f84345924f48cb Mon Sep 17 00:00:00 2001 From: Benedikt Reinartz Date: Thu, 10 Dec 2020 16:04:11 +0100 Subject: [PATCH 3/4] Set proper build environment for Mono on macOS --- .github/workflows/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 03fb1bef6..ffa2fb93c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,6 +19,12 @@ jobs: PYTHONNET_SHUTDOWN_MODE: ${{ matrix.SHUTDOWN_MODE }} steps: + - name: Set Environment on macOS + uses: maxim-lobanov/setup-xamarin@v1 + if: ${{ matrix.os == 'macos' }} + with: + mono-version: latest + - name: Checkout code uses: actions/checkout@v2 From c4977dd755073b37b1d2626f913ab7f22c16c59d Mon Sep 17 00:00:00 2001 From: Benedikt Reinartz Date: Thu, 10 Dec 2020 17:27:55 +0100 Subject: [PATCH 4/4] Disable embed tests on macOS --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ffa2fb93c..8137d0b0a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -35,6 +35,7 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python }} + architecture: ${{ matrix.platform }} - name: Install dependencies run: | @@ -50,6 +51,7 @@ jobs: - name: Run Embedding tests run: dotnet test --runtime any-${{ matrix.platform }} src/embed_tests/ + if: ${{ matrix.os != 'macos' }} # Not working right now, doesn't find libpython # TODO: Run perf tests # TODO: Run mono tests on Windows?