Skip to content

Commit

Permalink
build: use pdm to build C extension
Browse files Browse the repository at this point in the history
  • Loading branch information
winstxnhdw committed Aug 11, 2024
1 parent 339e97b commit 508b130
Show file tree
Hide file tree
Showing 12 changed files with 364 additions and 71 deletions.
8 changes: 0 additions & 8 deletions .github/dependabot.yml

This file was deleted.

12 changes: 0 additions & 12 deletions .github/workflows/dependabot.yml

This file was deleted.

41 changes: 19 additions & 22 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ jobs:
- name: Checkout repository
uses: actions/[email protected]

- name: Setup Python
uses: actions/setup-[email protected]
- name: Setup PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: '*'
cache: pip
cache: true

- name: Install the development dependencies
run: pip install -r requirements.txt
- name: Install dependencies
run: pdm install

- name: Run typechecker
run: pyright
run: pdm run pyright

lint:
runs-on: windows-latest
Expand All @@ -34,39 +34,36 @@ jobs:
- name: Checkout repository
uses: actions/[email protected]

- name: Setup Python
uses: actions/setup-[email protected]
- name: Setup PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: '*'
cache: pip
cache: true

- name: Install the development dependencies
run: pip install -r requirements.txt
- name: Install dependencies
run: pdm install

- name: Run linter
run: pylint --recursive=y .
run: pdm run pylint --recursive=y .

build:
test:
runs-on: windows-latest

steps:
- name: Checkout repository
uses: actions/[email protected]

- name: Setup Python
uses: actions/setup-[email protected]
- name: Setup PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: '*'
cache: pip
cache: true

- name: Install the development dependencies
run: pip install -r requirements.txt

- name: Build the extension
run: python setup.py build_ext --inplace
- name: Install dependencies
run: pdm install

- name: Run tests
run: pytest
run: pdm run pytest

install:
runs-on: windows-latest
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.vscode/
build/
dist/
*.egg-info/

*.pyc
*.pyd
*.pyd
.pdm*
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# KeyWin

[![python](https://img.shields.io/badge/python-3.9%20|%203.10%20|%203.11%20|%203.12-blue)](https://www.python.org/)
[![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/PyCQA/pylint)
[![main.yml](https://github.com/winstxnhdw/KeyWin/actions/workflows/main.yml/badge.svg)](https://github.com/winstxnhdw/KeyWin/actions/workflows/main.yml)
[![formatter.yml](https://github.com/winstxnhdw/KeyWin/actions/workflows/formatter.yml/badge.svg)](https://github.com/winstxnhdw/KeyWin/actions/workflows/formatter.yml)
Expand Down
257 changes: 257 additions & 0 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 508b130

Please sign in to comment.