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 9723b10 commit a201b06
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 45 deletions.
48 changes: 5 additions & 43 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ name: MacOS

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

jobs:
Expand All @@ -16,24 +15,6 @@ jobs:
os: [macos-14, macos-13, macos-12]
platform: [arm64, x86_x64]
python-version: ["3.11"]
#python-version: ["3.12", "3.11", "3.10", "3.9"]
# include:
# - os: macos-14
# platform: arm64
# python-version: "3.12"
# force: true
# - os: macos-14
# platform: arm64
# python-version: "3.11"
# force: true
# - os: macos-14
# platform: x86_x64
# python-version: "3.12"
# force: true
# - os: macos-14
# platform: x86_x64
# python-version: "3.11"
# force: true
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 @@ -75,7 +56,7 @@ jobs:
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@v4
with:
name: wheel-${{matrix.os}}-${{matrix.python-version}}-${{matrix.platform}}-artifact
Expand All @@ -85,32 +66,12 @@ jobs:
upload-pypi-macos:
needs: build-macos
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: [macos-14, macos-13, macos-12]
platform: [arm64, x86_x64]
python-version: [ "3.11" ]
# os: [macos-13, macos-12]
# platform: [arm64, x86_x64]
# python-version: ["3.12", "3.11", "3.10", "3.9"]
# include:
# - os: macos-14
# platform: arm64
# python-version: "3.12"
# force: true
# - os: macos-14
# platform: arm64
# python-version: "3.11"
# force: true
# - os: macos-14
# platform: x86_x64
# python-version: "3.12"
# force: true
# - os: macos-14
# platform: x86_x64
# python-version: "3.11"
# force: true
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
Expand All @@ -120,9 +81,10 @@ jobs:
- name: List files
run: ls -R
- 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__
password: ${{ secrets.PYPI_API_TOKEN }}
verbose: true
skip-existing: true
3 changes: 2 additions & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_ARCHS: x86_x64
with:
output-dir: dist
- name: Test
Expand All @@ -71,3 +71,4 @@ jobs:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
verbose: true
skip-existing: true
3 changes: 2 additions & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,10 @@ jobs:
- name: List files
run: ls -R
- 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__
password: ${{ secrets.PYPI_API_TOKEN }}
verbose: true
skip-existing: true

0 comments on commit a201b06

Please sign in to comment.