From 5852d0b4df05e926e1c2df05e1cf28078527215d Mon Sep 17 00:00:00 2001 From: Tpt Date: Sun, 19 Mar 2023 17:17:02 +0100 Subject: [PATCH] CI: Evaluates Python tests on Windows --- .github/workflows/artifacts.yml | 4 ++-- .github/workflows/manylinux_build.sh | 2 +- .github/workflows/musllinux_build.sh | 2 +- .github/workflows/tests.yml | 20 ++++++++++++++++++++ 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/.github/workflows/artifacts.yml b/.github/workflows/artifacts.yml index 7bf7ad29..21e09f03 100644 --- a/.github/workflows/artifacts.yml +++ b/.github/workflows/artifacts.yml @@ -180,7 +180,7 @@ jobs: python-version: "3.10" cache: pip cache-dependency-path: '**/requirements.dev.txt' - - run: pip install -r python/requirements.dev.txt + - run: pip install "maturin~=0.14.0" - run: maturin build --release -m python/Cargo.toml --features abi3 - run: pip install --no-index --find-links=target/wheels/ pyoxigraph - run: rm -r target/wheels @@ -216,7 +216,7 @@ jobs: cache: pip cache-dependency-path: '**/requirements.dev.txt' - run: Remove-Item -LiteralPath "C:\msys64\" -Force -Recurse - - run: pip install -r python/requirements.dev.txt + - run: pip install "maturin~=0.14.0" - run: maturin build --release -m python/Cargo.toml --features abi3 - run: pip install --no-index --find-links=target/wheels/ pyoxigraph - run: rm -r target/wheels diff --git a/.github/workflows/manylinux_build.sh b/.github/workflows/manylinux_build.sh index 1ed3f3e2..30e35e41 100644 --- a/.github/workflows/manylinux_build.sh +++ b/.github/workflows/manylinux_build.sh @@ -10,7 +10,7 @@ export PATH="${PATH}:/opt/python/cp37-cp37m/bin:/opt/python/cp38-cp38/bin:/opt/p cd python python3.10 -m venv venv source venv/bin/activate -pip install -r requirements.dev.txt +pip install "maturin~=0.14.0" maturin develop --release -m Cargo.toml python generate_stubs.py pyoxigraph pyoxigraph.pyi --black maturin build --release -m Cargo.toml --features abi3 --compatibility manylinux2014 diff --git a/.github/workflows/musllinux_build.sh b/.github/workflows/musllinux_build.sh index 7dd2fb4c..6f73137a 100644 --- a/.github/workflows/musllinux_build.sh +++ b/.github/workflows/musllinux_build.sh @@ -8,7 +8,7 @@ export PATH="${PATH}:/opt/python/cp37-cp37m/bin:/opt/python/cp38-cp38/bin:/opt/p cd python python3.10 -m venv venv source venv/bin/activate -pip install -r requirements.dev.txt +pip install "maturin~=0.14.0" maturin develop --release -m Cargo.toml python generate_stubs.py pyoxigraph pyoxigraph.pyi --black maturin build --release -m Cargo.toml --features abi3 --compatibility musllinux_1_1 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 12654852..097c191a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -268,6 +268,26 @@ jobs: - run: python -m unittest working-directory: ./python/tests + python_windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: true + - run: rustup update + - uses: Swatinem/rust-cache@v2 + - uses: actions/setup-python@v4 + with: + python-version: "3.10" + cache: pip + cache-dependency-path: '**/requirements.dev.txt' + - run: pip install "maturin~=0.14.0" + - run: maturin build -m python/Cargo.toml + - run: pip install --no-index --find-links=target/wheels/ pyoxigraph + - run: rm -r target/wheels + - run: python -m unittest + working-directory: ./python/tests + typos: runs-on: ubuntu-latest steps: