Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add build CI for windows #7

Merged
merged 12 commits into from
Jan 25, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 17 additions & 15 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,21 @@ jobs:
name: wheels
path: dist

# windows:
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v3
# - uses: messense/maturin-action@v1
# with:
# command: build
# args: --release -o dist --find-interpreter
# - name: Upload wheels
# uses: actions/upload-artifact@v3
# with:
# name: wheels
# path: dist
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Cache
uses: Swatinem/rust-cache@v2
- uses: messense/maturin-action@v1
with:
command: build
args: --release -o dist --find-interpreter
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

macos:
runs-on: macos-latest
Expand All @@ -52,7 +54,7 @@ jobs:
- uses: messense/maturin-action@v1
with:
command: build
args: --release -o dist --universal2 --find-interpreter
ringsaturn marked this conversation as resolved.
Show resolved Hide resolved
args: --release -o dist
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
Expand All @@ -63,7 +65,7 @@ jobs:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: [macos, linux]
needs: [macos, linux, windows]
steps:
- uses: actions/download-artifact@v3
with:
Expand Down
17 changes: 14 additions & 3 deletions .github/workflows/Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ concurrency:
cancel-in-progress: true

jobs:
linux:
runs-on: ubuntu-latest
Testing:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3

Expand All @@ -39,10 +40,20 @@ jobs:
run: |
python -m venv venv

- name: Install tzfpy and test
- name: Install tzfpy and test(not windows)
if: matrix.os != 'windows-latest'
run: |
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements_dev.txt
maturin develop
pytest --cov

- name: Install tzfpy and test(windows)
if: matrix.os == 'windows-latest'
run: |
. venv\Scripts\activate.bat
python -m pip install --upgrade pip
python -m pip install -r requirements_dev.txt
maturin develop
pytest --cov
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ pyo3 = { version = "0.18.0", features = ["extension-module"] }
lazy_static = "1.4.0"

# tzf-rs = { git = "http://github.com/ringsaturn/tzf-rs", rev = "8f6873966079f8c27b6816cdfe3a1652469ebd24"}
tzf-rs = "0.2.0"
tzf-rs = "0.2.1"

2 changes: 1 addition & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
citiespy==0.3.2
citiespy==0.3.3
maturin==0.14.8
pytest
pytest-benchmark
Expand Down