From cf4a1aabed0ef919059b29f308436dbae21d1ad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Flamary?= Date: Thu, 15 Apr 2021 14:03:45 +0200 Subject: [PATCH 1/4] add optional build wheels in PR --- .github/workflows/build_wheels_pr.yml | 51 +++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/build_wheels_pr.yml diff --git a/.github/workflows/build_wheels_pr.yml b/.github/workflows/build_wheels_pr.yml new file mode 100644 index 000000000..c11536ace --- /dev/null +++ b/.github/workflows/build_wheels_pr.yml @@ -0,0 +1,51 @@ +name: Build dist and wheels in PR + +on: + release: + push: + branches: + - "*" + +jobs: + build_wheels_pr: + name: ${{ matrix.os }} + runs-on: ${{ matrix.os }} + if: "contains(github.event.head_commit.message, 'build wheels')" + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + # macos-latest, windows-latest + + steps: + - uses: actions/checkout@v1 + - name: Set up Python 3.8 + uses: actions/setup-python@v1 + with: + python-version: 3.8 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install -U "cython" + + - name: Install cibuildwheel + run: | + python -m pip install cibuildwheel==1.10.0 + + - name: Install Visual C++ for Python 2.7 + if: startsWith(matrix.os, 'windows') + run: | + choco install vcpython27 -f -y + + - name: Build wheel + env: + CIBW_SKIP: "pp*-win* pp*-macosx* cp2* pp*" # remove pypy on mac and win (wrong version) + CIBW_BEFORE_BUILD: "pip install numpy cython" + run: | + python -m cibuildwheel --output-dir wheelhouse + + - uses: actions/upload-artifact@v1 + with: + name: wheels + path: ./wheelhouse From e0241e7928741e5d8c725b6bfa47af1fdb2101c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Flamary?= Date: Thu, 15 Apr 2021 14:20:37 +0200 Subject: [PATCH 2/4] test if in build wheels --- .github/workflows/build_wheels.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 662a60495..d2cf88526 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -4,12 +4,14 @@ on: release: push: branches: - - "master" + - "*" jobs: build_wheels: name: ${{ matrix.os }} runs-on: ${{ matrix.os }} + if: "contains(github.event.head_commit.message, 'build wheels') || + github.event.branch == 'master' " strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] From 5ad0121552553765df4d25a3d5801570878d6b61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Flamary?= Date: Thu, 15 Apr 2021 14:24:10 +0200 Subject: [PATCH 3/4] remove wheels builders --- .github/workflows/build_wheels.yml | 2 +- .github/workflows/build_wheels_pr.yml | 51 --------------------------- 2 files changed, 1 insertion(+), 52 deletions(-) delete mode 100644 .github/workflows/build_wheels_pr.yml diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index d2cf88526..e877aaaab 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -11,7 +11,7 @@ jobs: name: ${{ matrix.os }} runs-on: ${{ matrix.os }} if: "contains(github.event.head_commit.message, 'build wheels') || - github.event.branch == 'master' " + github.event.head_commit.branch == 'master' " strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] diff --git a/.github/workflows/build_wheels_pr.yml b/.github/workflows/build_wheels_pr.yml deleted file mode 100644 index c11536ace..000000000 --- a/.github/workflows/build_wheels_pr.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Build dist and wheels in PR - -on: - release: - push: - branches: - - "*" - -jobs: - build_wheels_pr: - name: ${{ matrix.os }} - runs-on: ${{ matrix.os }} - if: "contains(github.event.head_commit.message, 'build wheels')" - strategy: - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - # macos-latest, windows-latest - - steps: - - uses: actions/checkout@v1 - - name: Set up Python 3.8 - uses: actions/setup-python@v1 - with: - python-version: 3.8 - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - pip install -U "cython" - - - name: Install cibuildwheel - run: | - python -m pip install cibuildwheel==1.10.0 - - - name: Install Visual C++ for Python 2.7 - if: startsWith(matrix.os, 'windows') - run: | - choco install vcpython27 -f -y - - - name: Build wheel - env: - CIBW_SKIP: "pp*-win* pp*-macosx* cp2* pp*" # remove pypy on mac and win (wrong version) - CIBW_BEFORE_BUILD: "pip install numpy cython" - run: | - python -m cibuildwheel --output-dir wheelhouse - - - uses: actions/upload-artifact@v1 - with: - name: wheels - path: ./wheelhouse From 794cd7a087cc4a604ed2628afc2f35d19cb150a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Flamary?= Date: Thu, 15 Apr 2021 14:25:43 +0200 Subject: [PATCH 4/4] update build wheels et tets run --- .github/workflows/build_wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index e877aaaab..f779d934f 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -32,7 +32,7 @@ jobs: - name: Install cibuildwheel run: | - python -m pip install cibuildwheel==1.3.0 + python -m pip install cibuildwheel==1.10.0 - name: Install Visual C++ for Python 2.7 if: startsWith(matrix.os, 'windows')