Skip to content

Commit

Permalink
Merge pull request #13 from sbidoul/test-win-mac
Browse files Browse the repository at this point in the history
Test on win and mac
  • Loading branch information
sbidoul authored Oct 22, 2023
2 parents 1445312 + 4332585 commit a9c9b0d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ on:

jobs:
tests:
name: "Python ${{ matrix.python-version }}"
name: "Python ${{ matrix.python-version }} on ${{ matrix.machine }}"
runs-on: "${{ matrix.machine }}"
strategy:
fail-fast: false
matrix:
include:
# linux
- python-version: "3.7"
machine: ubuntu-22.04
- python-version: "3.8"
Expand All @@ -26,18 +27,26 @@ jobs:
machine: ubuntu-22.04
- python-version: "3.12"
machine: ubuntu-22.04
# mindows
- python-version: "3.7"
machine: windows-latest
- python-version: "3.12"
machine: windows-latest
# mac
- python-version: "3.7"
machine: macos-latest
- python-version: "3.12"
machine: macos-latest
steps:
- uses: "actions/checkout@v3"
- uses: "actions/setup-python@v4"
with:
python-version: "${{ matrix.python-version }}"
- name: "Install dependencies"
run: |
set -xe
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade virtualenv tox tox-gh-actions
python -m pip install --upgrade pip virtualenv tox tox-gh-actions
- name: "Run tox targets for ${{ matrix.python-version }}"
run: |
python -m tox
Expand Down
10 changes: 9 additions & 1 deletion src/whool/buildapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,15 @@ def _build_wheel(addon_dir: Path, wheel_directory: Path, editable: bool) -> str:
[odoo_addon_path / "pyproject.toml", odoo_addon_path / "PKG-INFO"]
)
subprocess.run(
[sys.executable, "-m", "wheel", "pack", "-d", wheel_directory, tmpdir],
[
sys.executable,
"-m",
"wheel",
"pack",
"-d",
os.fspath(wheel_directory), # conv required on Windows Python 3.7 only
tmpdir,
],
check=True,
)
return _get_wheel_name(metadata)
Expand Down

0 comments on commit a9c9b0d

Please sign in to comment.