From 668fe97e9947f55f33ce56da81e310dddb16a03b Mon Sep 17 00:00:00 2001 From: Robert McLeod Date: Sat, 5 Dec 2020 16:57:55 -0800 Subject: [PATCH 1/3] Test use of GitHub Actions to build wheels --- .github/workflows/build.yml | 68 +++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..e2e52a50 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,68 @@ +name: Build + +on: [push, pull_request] + +env: + # CIBW_BUILD_VERBOSITY: 1 + # CIBW_TEST_REQUIRES: pytest + CIBW_TEST_COMMAND: python -c "import sys, numexpr; sys.exit(0 if numexpr.test().wasSuccessful() else 1)" + +jobs: + build_wheels: + name: Build wheels on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-18.04, windows-latest, macos-latest] + + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-python@v2 + name: Install Python + with: + python-version: '3.7' + + - name: Install cibuildwheel + run: | + python -m pip install cibuildwheel==1.6.4 + + - name: Build wheels for CPython 2.7 + run: | + python -m cibuildwheel --output-dir wheelhouse + env: + CIBW_BUILD: "cp27-*" + + - name: Build wheels for CPython 3.5 + run: | + python -m cibuildwheel --output-dir wheelhouse + env: + CIBW_BUILD: "cp35-*" + + - name: Build wheels for CPython 3.6 + run: | + python -m cibuildwheel --output-dir wheelhouse + env: + CIBW_BUILD: "cp36-*" + + - name: Build wheels for CPython 3.7 + run: | + python -m cibuildwheel --output-dir wheelhouse + env: + CIBW_BUILD: "cp37-*" + + - name: Build wheels for CPython 3.8 + run: | + python -m cibuildwheel --output-dir wheelhouse + env: + CIBW_BUILD: "cp38-*" + + - name: Build wheels for CPython 3.9 + run: | + python -m cibuildwheel --output-dir wheelhouse + env: + CIBW_BUILD: "cp39-*" + + - uses: actions/upload-artifact@v2 + with: + path: ./wheelhouse/*.whl \ No newline at end of file From d65ee86b9952af5b5a1f65936555d581666a8151 Mon Sep 17 00:00:00 2001 From: Robert McLeod Date: Sat, 5 Dec 2020 17:17:01 -0800 Subject: [PATCH 2/3] Install requirements as part of cibuildwheel config --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e2e52a50..c1777146 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,6 +3,7 @@ name: Build on: [push, pull_request] env: + CIBW_BEFORE_BUILD: pip install setuptools numpy # CIBW_BUILD_VERBOSITY: 1 # CIBW_TEST_REQUIRES: pytest CIBW_TEST_COMMAND: python -c "import sys, numexpr; sys.exit(0 if numexpr.test().wasSuccessful() else 1)" @@ -25,7 +26,7 @@ jobs: - name: Install cibuildwheel run: | - python -m pip install cibuildwheel==1.6.4 + python -m pip install cibuildwheel==1.6.4 - name: Build wheels for CPython 2.7 run: | From 154566612f75373d4eb7834584acc3e8db20a117 Mon Sep 17 00:00:00 2001 From: Robert McLeod Date: Sat, 5 Dec 2020 17:59:50 -0800 Subject: [PATCH 3/3] Add vcpython27 from choco on Windows --- .github/workflows/build.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c1777146..36e8baa0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,7 +26,12 @@ jobs: - name: Install cibuildwheel run: | - python -m pip install cibuildwheel==1.6.4 + python -m pip install cibuildwheel==1.6.4 + + - name: Install Visual C++ for Python 2.7 + if: runner.os == 'Windows' + run: | + choco install vcpython27 -f -y - name: Build wheels for CPython 2.7 run: |