Skip to content

Commit

Permalink
Trying cibuildwheel with win and linux GH actions
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitri-justeau committed Oct 1, 2024
1 parent 07290ce commit 5f2a2a0
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: MacOS

on:
push:
branches: [ "master", "dev_actions" ]
branches: ["no"]
#branches: [ "master", "dev_actions" ]
tags: [ '**' ]

jobs:
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ name: Ubuntu

on:
push:
branches: ["no"]
# branches: [ "master", "dev_actions" ]
branches: [ "master", "dev_actions" ]
tags: [ '**' ]

jobs:
Expand All @@ -14,7 +13,8 @@ jobs:
fail-fast: true
matrix:
os : [ubuntu-latest]
python-version: ["3.12", "3.11", "3.10", "3.9"]
python-version: ["3.11"]
#python-version: ["3.12", "3.11", "3.10", "3.9"]
steps:
# if matrix.force is not true or event is not tag, skip
- if: ${{ matrix.force }} != true || (github.event_name == 'push' && !startsWith(github.ref, 'refs/tags'))
Expand Down Expand Up @@ -45,8 +45,12 @@ jobs:
git submodule update --init --recursive
- name: Build
run: |
sh build.sh
sh build.sh nowheel
pip install pychoco -f dist/
- name: Build wheels
uses: pypa/[email protected]
with:
output-dir: dist
- name: Test
run: |
pip install pytest
Expand All @@ -59,7 +63,7 @@ jobs:
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v3
- name: Upload to PyPi
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
#if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
Expand Down
21 changes: 13 additions & 8 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ name: Windows

on:
push:
branches: ["no"]
# branches: [ "master", "dev_actions" ]
branches: [ "master", "dev_actions" ]
tags: [ '**' ]

jobs:
build-windows:
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: true
fail-fast: false
matrix:
os : [windows-2022]
python-version: ["3.12", "3.11", "3.10", "3.9"]
# python-version: ["3.12", "3.11", "3.10", "3.9"]
python-version: ["3.11"]
steps:
# if matrix.force is not true or event is not tag, skip
- if: ${{ matrix.force }} != true || (github.event_name == 'push' && !startsWith(github.ref, 'refs/tags'))
Expand Down Expand Up @@ -46,15 +46,19 @@ jobs:
arch: x64
- name: Build
run: |
sh build.sh
sh build.sh nowheel
pip install pychoco -f dist/
- name: Build wheels
uses: pypa/[email protected]
with:
output-dir: dist
- name: Test
run: |
pip install -U pytest
pip install -r requirements_tests.txt
pytest
- name: Upload wheel artifacts
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
#if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: actions/upload-artifact@v3
with:
name: wheel-${{matrix.os}}-${{matrix.python-version}}-artifact
Expand All @@ -65,11 +69,12 @@ jobs:
upload-pypi-windows:
needs: build-windows
runs-on: ubuntu-20.04
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
#if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
strategy:
matrix:
os : [windows-2022]
python-version: ["3.12", "3.11", "3.10", "3.9"]
python-version: ["3.11"]
# python-version: ["3.12", "3.11", "3.10", "3.9"]
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
Expand Down

0 comments on commit 5f2a2a0

Please sign in to comment.