From 5c064937697aa78859f7b3300b2b03f3f6365bbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andy=20Dang=F0=9F=A4=96?= Date: Mon, 23 Aug 2021 14:56:46 -0700 Subject: [PATCH 01/16] Build wheel for Windows --- .github/workflows/build_publish.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_publish.yml b/.github/workflows/build_publish.yml index 04340a20..1bc6ed4c 100644 --- a/.github/workflows/build_publish.yml +++ b/.github/workflows/build_publish.yml @@ -21,13 +21,13 @@ jobs: test_target: test, cc: "gcc", cxx: "g++" } -# - { -# name: "Windows Latest, MSVC", -# os: v, -# test_target: RUN_TESTS, -# cc: "cl", cxx: "cl", -# environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat" -# } + - { + name: "Windows Latest, MSVC", + os: v, + test_target: RUN_TESTS, + cc: "cl", cxx: "cl", + environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat" + } #- { # name: "Windows Latest, MinGW+gcc", # os: windows-latest, @@ -52,7 +52,6 @@ jobs: run: python -m pip install --upgrade pip setuptools wheel numpy tox - name: Configure run: | - python setup.py bdist_wheel cibuildwheel --output-dir dist ls dist From 972361527db9d1fba4d061b48c536ce576b71f38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andy=20Dang=F0=9F=A4=96?= Date: Mon, 23 Aug 2021 15:12:37 -0700 Subject: [PATCH 02/16] Build wheel for Windows --- .github/workflows/build_publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_publish.yml b/.github/workflows/build_publish.yml index 1bc6ed4c..c127baf7 100644 --- a/.github/workflows/build_publish.yml +++ b/.github/workflows/build_publish.yml @@ -23,7 +23,7 @@ jobs: } - { name: "Windows Latest, MSVC", - os: v, + os: windows-latest, test_target: RUN_TESTS, cc: "cl", cxx: "cl", environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat" From e1010c98b811ddce104b9edb948ae14cee5b6de9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andy=20Dang=F0=9F=A4=96?= Date: Mon, 23 Aug 2021 15:25:13 -0700 Subject: [PATCH 03/16] Skip win32 builds --- .github/workflows/build_publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_publish.yml b/.github/workflows/build_publish.yml index c127baf7..b3a05e60 100644 --- a/.github/workflows/build_publish.yml +++ b/.github/workflows/build_publish.yml @@ -56,6 +56,7 @@ jobs: cibuildwheel --output-dir dist ls dist env: + CIBW_SKIP: "*-win32" CIBW_BUILD: "cp36-* cp37-* cp38-* cp39-*" CIBW_BEFORE_BUILD: "rm -fr python/datasketches.* && rm -fr build/* && pip install cython" - uses: actions/upload-artifact@v2 From 4ace0bbd5d452f5eff8caaabdcbd50b9b583550f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andy=20Dang=F0=9F=A4=96?= Date: Mon, 23 Aug 2021 15:36:34 -0700 Subject: [PATCH 04/16] Clean up dist folder --- .github/workflows/build_publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_publish.yml b/.github/workflows/build_publish.yml index b3a05e60..20edb832 100644 --- a/.github/workflows/build_publish.yml +++ b/.github/workflows/build_publish.yml @@ -58,7 +58,7 @@ jobs: env: CIBW_SKIP: "*-win32" CIBW_BUILD: "cp36-* cp37-* cp38-* cp39-*" - CIBW_BEFORE_BUILD: "rm -fr python/datasketches.* && rm -fr build/* && pip install cython" + CIBW_BEFORE_BUILD: "rm -fr python/datasketches.* && rm -fr build/* && rm -fr dist/* && pip install cython" - uses: actions/upload-artifact@v2 with: path: ./dist/*.whl From 2af43868613524c3763c43a7c5dc81432b969f9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andy=20Dang=F0=9F=A4=96?= Date: Mon, 23 Aug 2021 15:45:40 -0700 Subject: [PATCH 05/16] Don't clean up the dist file --- .github/workflows/build_publish.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_publish.yml b/.github/workflows/build_publish.yml index 20edb832..bf569c45 100644 --- a/.github/workflows/build_publish.yml +++ b/.github/workflows/build_publish.yml @@ -50,7 +50,9 @@ jobs: pip install -e ".[compat,dev]" cibuildwheel twine - name: Install Python dependencies run: python -m pip install --upgrade pip setuptools wheel numpy tox - - name: Configure + - name: Clean up dist + run: rm -fr ./dist/* + - name: Build wheels run: | python setup.py bdist_wheel cibuildwheel --output-dir dist @@ -58,7 +60,7 @@ jobs: env: CIBW_SKIP: "*-win32" CIBW_BUILD: "cp36-* cp37-* cp38-* cp39-*" - CIBW_BEFORE_BUILD: "rm -fr python/datasketches.* && rm -fr build/* && rm -fr dist/* && pip install cython" + CIBW_BEFORE_BUILD: "rm -fr python/datasketches.* && rm -fr build/* && pip install cython" - uses: actions/upload-artifact@v2 with: path: ./dist/*.whl From 0c29d6d3b6d7e14c5c533b06297d6a03a2879170 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andy=20Dang=F0=9F=A4=96?= Date: Mon, 23 Aug 2021 15:50:30 -0700 Subject: [PATCH 06/16] Fix workflow file --- .github/workflows/build_publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_publish.yml b/.github/workflows/build_publish.yml index bf569c45..f0449bcb 100644 --- a/.github/workflows/build_publish.yml +++ b/.github/workflows/build_publish.yml @@ -51,7 +51,7 @@ jobs: - name: Install Python dependencies run: python -m pip install --upgrade pip setuptools wheel numpy tox - name: Clean up dist - run: rm -fr ./dist/* + run: rm -fr ./dist/* - name: Build wheels run: | python setup.py bdist_wheel From 1a65945ba9fe699ebe4a23851b0231219974b6b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andy=20Dang=F0=9F=A4=96?= Date: Mon, 23 Aug 2021 15:54:19 -0700 Subject: [PATCH 07/16] Fix workflow file --- .github/workflows/build_publish.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_publish.yml b/.github/workflows/build_publish.yml index f0449bcb..25c7f52b 100644 --- a/.github/workflows/build_publish.yml +++ b/.github/workflows/build_publish.yml @@ -51,7 +51,8 @@ jobs: - name: Install Python dependencies run: python -m pip install --upgrade pip setuptools wheel numpy tox - name: Clean up dist - run: rm -fr ./dist/* + run: | + rm -fr ./dist/* - name: Build wheels run: | python setup.py bdist_wheel From 77e055331ae41585deaf464cba1fd4003845fbb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andy=20Dang=F0=9F=A4=96?= Date: Mon, 23 Aug 2021 16:01:45 -0700 Subject: [PATCH 08/16] Delete files for windows --- .github/workflows/build_publish.yml | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build_publish.yml b/.github/workflows/build_publish.yml index 25c7f52b..9a929046 100644 --- a/.github/workflows/build_publish.yml +++ b/.github/workflows/build_publish.yml @@ -9,18 +9,18 @@ jobs: strategy: matrix: config: - - { - name: "MacOS Latest, Clang", - os: macos-latest, - test_target: test, - cc: "clang", cxx: "clang++" - } - - { - name: "Ubuntu Latest, GCC", - os: ubuntu-latest, - test_target: test, - cc: "gcc", cxx: "g++" - } +# - { +# name: "MacOS Latest, Clang", +# os: macos-latest, +# test_target: test, +# cc: "clang", cxx: "clang++" +# } +# - { +# name: "Ubuntu Latest, GCC", +# os: ubuntu-latest, +# test_target: test, +# cc: "gcc", cxx: "g++" +# } - { name: "Windows Latest, MSVC", os: windows-latest, @@ -51,8 +51,7 @@ jobs: - name: Install Python dependencies run: python -m pip install --upgrade pip setuptools wheel numpy tox - name: Clean up dist - run: | - rm -fr ./dist/* + run: python -m pip install --upgrade pip setuptools wheel numpy tox - name: Build wheels run: | python setup.py bdist_wheel @@ -61,7 +60,7 @@ jobs: env: CIBW_SKIP: "*-win32" CIBW_BUILD: "cp36-* cp37-* cp38-* cp39-*" - CIBW_BEFORE_BUILD: "rm -fr python/datasketches.* && rm -fr build/* && pip install cython" + CIBW_BEFORE_BUILD: "DEL /Q /F /S python/datasketches.* && DEL /Q /F /S build/* && pip install cython" - uses: actions/upload-artifact@v2 with: path: ./dist/*.whl From dda6548165de84b34956d6add8a34fa212007416 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andy=20Dang=F0=9F=A4=96?= Date: Mon, 23 Aug 2021 16:11:37 -0700 Subject: [PATCH 09/16] Test different build strategy --- .github/workflows/build_publish.yml | 107 ++++++++++++++++++++-------- 1 file changed, 76 insertions(+), 31 deletions(-) diff --git a/.github/workflows/build_publish.yml b/.github/workflows/build_publish.yml index 9a929046..fba72a76 100644 --- a/.github/workflows/build_publish.yml +++ b/.github/workflows/build_publish.yml @@ -4,35 +4,84 @@ on: [ push, pull_request ] jobs: build_wheels: - name: Build Wheels On ${{ matrix.config.name }} - runs-on: ${{ matrix.config.os }} + name: Build wheels ${{ matrix.CIBW_BUILD }} + runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: - config: -# - { -# name: "MacOS Latest, Clang", -# os: macos-latest, -# test_target: test, -# cc: "clang", cxx: "clang++" -# } -# - { -# name: "Ubuntu Latest, GCC", -# os: ubuntu-latest, -# test_target: test, -# cc: "gcc", cxx: "g++" -# } - - { - name: "Windows Latest, MSVC", - os: windows-latest, - test_target: RUN_TESTS, - cc: "cl", cxx: "cl", - environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat" - } - #- { - # name: "Windows Latest, MinGW+gcc", - # os: windows-latest, - # cc: "gcc", cxx: "g++" - # } + include: +# - CIBW_BUILD: cp36-manylinux_x86_64 +# os: ubuntu-latest +# arch: x86_64 +# CIBW_PLATFORM: linux +# - CIBW_BUILD: cp37-manylinux_x86_64 +# os: ubuntu-latest +# arch: x86_64 +# CIBW_PLATFORM: linux +# - CIBW_BUILD: cp38-manylinux_x86_64 +# os: ubuntu-latest +# arch: x86_64 +# CIBW_PLATFORM: linux +# - CIBW_BUILD: cp39-manylinux_x86_64 +# os: ubuntu-latest +# arch: x86_64 +# CIBW_PLATFORM: linux +# +# - CIBW_BUILD: cp37-manylinux_aarch64 +# os: ubuntu-latest +# arch: aarch64 +# CIBW_PLATFORM: linux +# - CIBW_BUILD: cp38-manylinux_aarch64 +# os: ubuntu-latest +# arch: aarch64 +# CIBW_PLATFORM: linux +# - CIBW_BUILD: cp39-manylinux_aarch64 +# os: ubuntu-latest +# arch: aarch64 +# CIBW_PLATFORM: linux +# +# - CIBW_BUILD: cp36-macosx_x86_64 +# os: macos-latest +# arch: x86_64 +# CIBW_PLATFORM: macos +# - CIBW_BUILD: cp37-macosx_x86_64 +# os: macos-latest +# arch: x86_64 +# CIBW_PLATFORM: macos +# - CIBW_BUILD: cp38-macosx_x86_64 +# os: macos-latest +# arch: x86_64 +# CIBW_PLATFORM: macos +# - CIBW_BUILD: cp39-macosx_x86_64 +# os: macos-latest +# arch: x86_64 +# CIBW_PLATFORM: macos +# +# - CIBW_BUILD: cp38-macosx_arm64 +# os: macos-latest +# arch: arm64 +# CIBW_PLATFORM: macos +# - CIBW_BUILD: cp39-macosx_arm64 +# os: macos-latest +# arch: arm64 +# CIBW_PLATFORM: macos + + - CIBW_BUILD: cp36-win_amd64 + os: windows-latest + arch: AMD64 + CIBW_PLATFORM: windows + - CIBW_BUILD: cp37-win_amd64 + os: windows-latest + arch: AMD64 + CIBW_PLATFORM: windows + - CIBW_BUILD: cp38-win_amd64 + os: windows-latest + arch: AMD64 + CIBW_PLATFORM: windows + - CIBW_BUILD: cp39-win_amd64 + os: windows-latest + arch: AMD64 + CIBW_PLATFORM: windows steps: - uses: actions/checkout@v2 @@ -50,16 +99,12 @@ jobs: pip install -e ".[compat,dev]" cibuildwheel twine - name: Install Python dependencies run: python -m pip install --upgrade pip setuptools wheel numpy tox - - name: Clean up dist - run: python -m pip install --upgrade pip setuptools wheel numpy tox - name: Build wheels run: | python setup.py bdist_wheel cibuildwheel --output-dir dist ls dist env: - CIBW_SKIP: "*-win32" - CIBW_BUILD: "cp36-* cp37-* cp38-* cp39-*" CIBW_BEFORE_BUILD: "DEL /Q /F /S python/datasketches.* && DEL /Q /F /S build/* && pip install cython" - uses: actions/upload-artifact@v2 with: From 20a132fb32784cf63740d886d402536b12f67aa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andy=20Dang=F0=9F=A4=96?= Date: Mon, 23 Aug 2021 16:16:30 -0700 Subject: [PATCH 10/16] Update prebuild command --- .github/workflows/build_publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_publish.yml b/.github/workflows/build_publish.yml index fba72a76..5cdf926f 100644 --- a/.github/workflows/build_publish.yml +++ b/.github/workflows/build_publish.yml @@ -105,7 +105,7 @@ jobs: cibuildwheel --output-dir dist ls dist env: - CIBW_BEFORE_BUILD: "DEL /Q /F /S python/datasketches.* && DEL /Q /F /S build/* && pip install cython" + CIBW_BEFORE_BUILD: "pip install cython" - uses: actions/upload-artifact@v2 with: path: ./dist/*.whl From 2397d561c43a3ee80506b964346edff6ab7ca32b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andy=20Dang=F0=9F=A4=96?= Date: Mon, 23 Aug 2021 16:29:32 -0700 Subject: [PATCH 11/16] Add env variable --- .github/workflows/build_publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_publish.yml b/.github/workflows/build_publish.yml index 5cdf926f..0793648d 100644 --- a/.github/workflows/build_publish.yml +++ b/.github/workflows/build_publish.yml @@ -105,6 +105,7 @@ jobs: cibuildwheel --output-dir dist ls dist env: + CIBW_BUILD: ${{ matrix.CIBW_BUILD }} CIBW_BEFORE_BUILD: "pip install cython" - uses: actions/upload-artifact@v2 with: From fc9499b4c706ff1eaeb84c6363028f1c84b96c0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andy=20Dang=F0=9F=A4=96?= Date: Mon, 23 Aug 2021 16:33:10 -0700 Subject: [PATCH 12/16] Add arch and platfomr --- .github/workflows/build_publish.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build_publish.yml b/.github/workflows/build_publish.yml index 0793648d..c93d26a6 100644 --- a/.github/workflows/build_publish.yml +++ b/.github/workflows/build_publish.yml @@ -106,6 +106,8 @@ jobs: ls dist env: CIBW_BUILD: ${{ matrix.CIBW_BUILD }} + CIBW_PLATFORM: ${{ matrix.CIBW_PLATFORM }} + CIBW_ARCHS: ${{matrix.arch}} CIBW_BEFORE_BUILD: "pip install cython" - uses: actions/upload-artifact@v2 with: From ff19defd871015a06c8b0fce2215d0f7b2249115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andy=20Dang=F0=9F=A4=96?= Date: Mon, 23 Aug 2021 16:43:38 -0700 Subject: [PATCH 13/16] Cmake --- .github/workflows/build_publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_publish.yml b/.github/workflows/build_publish.yml index c93d26a6..03083a88 100644 --- a/.github/workflows/build_publish.yml +++ b/.github/workflows/build_publish.yml @@ -108,7 +108,7 @@ jobs: CIBW_BUILD: ${{ matrix.CIBW_BUILD }} CIBW_PLATFORM: ${{ matrix.CIBW_PLATFORM }} CIBW_ARCHS: ${{matrix.arch}} - CIBW_BEFORE_BUILD: "pip install cython" + CIBW_BEFORE_BUILD: "pip install cython && pip install cmake && cmake" - uses: actions/upload-artifact@v2 with: path: ./dist/*.whl From 0a003c8389489b179f88135213dc2ae86c608349 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andy=20Dang=F0=9F=A4=96?= Date: Mon, 23 Aug 2021 16:56:20 -0700 Subject: [PATCH 14/16] Try to run cmake --- .github/workflows/build_publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_publish.yml b/.github/workflows/build_publish.yml index 03083a88..b9d9c927 100644 --- a/.github/workflows/build_publish.yml +++ b/.github/workflows/build_publish.yml @@ -108,7 +108,7 @@ jobs: CIBW_BUILD: ${{ matrix.CIBW_BUILD }} CIBW_PLATFORM: ${{ matrix.CIBW_PLATFORM }} CIBW_ARCHS: ${{matrix.arch}} - CIBW_BEFORE_BUILD: "pip install cython && pip install cmake && cmake" + CIBW_BEFORE_BUILD: "pip install cython && pip install cmake && cmake ." - uses: actions/upload-artifact@v2 with: path: ./dist/*.whl From 423f968591616d9de97dca8a5246f9a1525981ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andy=20Dang=F0=9F=A4=96?= Date: Mon, 23 Aug 2021 17:05:36 -0700 Subject: [PATCH 15/16] Test more env variables --- .github/workflows/build_publish.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_publish.yml b/.github/workflows/build_publish.yml index b9d9c927..09a282c7 100644 --- a/.github/workflows/build_publish.yml +++ b/.github/workflows/build_publish.yml @@ -108,7 +108,9 @@ jobs: CIBW_BUILD: ${{ matrix.CIBW_BUILD }} CIBW_PLATFORM: ${{ matrix.CIBW_PLATFORM }} CIBW_ARCHS: ${{matrix.arch}} - CIBW_BEFORE_BUILD: "pip install cython && pip install cmake && cmake ." + CIBW_BEFORE_BUILD: "pip install cython cmake delvewheel" + CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel show {wheel} && delvewheel repair -w {dest_dir} {wheel}" + - uses: actions/upload-artifact@v2 with: path: ./dist/*.whl From 57aebb8c9769cfcce00ba76a07330b66d4c1ebb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andy=20Dang=F0=9F=A4=96?= Date: Mon, 23 Aug 2021 17:13:58 -0700 Subject: [PATCH 16/16] Disable cp38 --- .github/workflows/build_publish.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_publish.yml b/.github/workflows/build_publish.yml index 09a282c7..1f20c985 100644 --- a/.github/workflows/build_publish.yml +++ b/.github/workflows/build_publish.yml @@ -74,10 +74,10 @@ jobs: os: windows-latest arch: AMD64 CIBW_PLATFORM: windows - - CIBW_BUILD: cp38-win_amd64 - os: windows-latest - arch: AMD64 - CIBW_PLATFORM: windows +# - CIBW_BUILD: cp38-win_amd64 +# os: windows-latest +# arch: AMD64 +# CIBW_PLATFORM: windows - CIBW_BUILD: cp39-win_amd64 os: windows-latest arch: AMD64