This is an automated email from the ASF dual-hosted git repository.
alsay pushed a commit to branch workflows
in repository https://gitbox.apache.org/repos/asf/datasketches-python.git
The following commit(s) were added to refs/heads/workflows by this push:
new 8e89b6b github actions
8e89b6b is described below
commit 8e89b6b833b7188d0fd29c1390afe04cfeaa8919
Author: AlexanderSaydakov <[email protected]>
AuthorDate: Tue Sep 5 16:44:44 2023 -0700
github actions
---
.github/workflows/build_wheels.yml | 100 +++++++++++++++++++++++++++++++++++++
.github/workflows/ci.yml | 46 +++++++++++++++++
2 files changed, 146 insertions(+)
diff --git a/.github/workflows/build_wheels.yml
b/.github/workflows/build_wheels.yml
new file mode 100644
index 0000000..ffccd3b
--- /dev/null
+++ b/.github/workflows/build_wheels.yml
@@ -0,0 +1,100 @@
+name: Build Python Wheels
+
+on:
+ workflow_dispatch:
+
+env:
+ BUILD_TYPE: Release
+
+jobs:
+ build_sdist:
+ name: Source distribution
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+
+ - uses: actions/setup-python@v4
+ name: Install Python
+ with:
+ python-version: '3.x'
+
+ - name: Install build package
+ run: python -m pip install build --user
+
+ - name: Build sdist
+ run: python -m build --sdist --outdir dist
+
+ - uses: actions/upload-artifact@v3
+ with:
+ path: dist/*.tar.gz
+
+ build_wheels:
+ name: ${{ matrix.config.name }}
+ runs-on: ${{ matrix.config.os }}
+ strategy:
+ matrix:
+ config:
+ - {
+ name: "MacOS Latest (Intel)",
+ os: macos-latest,
+ cibw-arch: macosx_x86_64
+ }
+ - {
+ name: "MacOS Latest (Apple Silicon)",
+ os: macos-latest,
+ cibw-arch: macosx_arm64
+ }
+ - {
+ name: "Ubuntu Latest (x86_64)",
+ os: ubuntu-latest,
+ cibw-arch: manylinux_x86_64
+ }
+ - {
+ name: "Ubuntu Latest (ARM64)",
+ os: ubuntu-latest,
+ cibw-arch: manylinux_aarch64,
+ use-qemu: true
+ }
+ - {
+ name: "Ubuntu Latest (i686)",
+ os: ubuntu-latest,
+ cibw-arch: manylinux_i686
+ }
+ - {
+ name: "Windows Latest",
+ os: windows-latest,
+ cibw-arch: win_amd64
+ }
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+
+ - name: Set up Python 3.x
+ uses: actions/setup-python@v4
+ with:
+ python-version: '3.x'
+
+ - name: Set up QEMU for linux/arm64 builds
+ if: runner.os == 'Linux' && matrix.config.use-qemu == true
+ uses: docker/setup-qemu-action@v2
+ with:
+ platforms: arm64
+
+ - name: Install Python dependencies
+ run: python -m pip install cibuildwheel==2.12.0
+
+ - name: Build wheels
+ run: python -m cibuildwheel --output-dir dist
+ env:
+ CIBW_ARCHS_LINUX: "auto aarch64"
+ CIBW_ARCHS_MACOS: "x86_64 arm64"
+ CIBW_ENVIRONMENT_MACOS: CMAKE_OSX_ARCHITECTURES=${{
matrix.config.cibw-arch == 'macosx_x86_64' && 'x86_64' ||
matrix.config.cibw-arch == 'macosx_arm64' && 'arm64' || '' }}
+ CIBW_BUILD: "*-${{ matrix.config.cibw-arch }}"
+ CIBW_BEFORE_BUILD_LINUX: "yum remove -y cmake"
+ CIBW_BEFORE_BUILD: "python -m pip install cmake>=3.18"
+ CIBW_SKIP: "*-win32 pp*-aarch64 pp*-macosx"
+
+ - uses: actions/upload-artifact@v3
+ with:
+ path: ./dist/*.whl
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..ee691cd
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,46 @@
+name: Continuous Integration
+
+on: [push, pull_request]
+
+env:
+ BUILD_TYPE: Release
+
+jobs:
+ build:
+ name: ${{ matrix.config.name }}
+ runs-on: ${{ matrix.config.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"
+ }
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ - name: Set up Python 3.x
+ uses: actions/setup-python@v4
+ with:
+ python-version: '3.8' # 3.x grabs latest minor version of python3,
but 3.9 not fully supported yet
+ - name: Install Python dependencies
+ run: python -m pip install --upgrade pip setuptools wheel tox
+ - name: Build and run Python tests
+ run: python -m tox
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]