Skip to content

Merge pull request #299 from JulianGro/patch-1 #215

Merge pull request #299 from JulianGro/patch-1

Merge pull request #299 from JulianGro/patch-1 #215

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Build Wheels
on:
push:
create:
tags: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, windows-latest]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- uses: satackey/action-docker-layer-caching@v0.0.8
if: runner.os != 'Windows'
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v1
with:
platforms: all
- name: Build the Docker image
working-directory: ${{runner.workspace}}/libsurvive/useful_files
if: runner.os != 'Windows'
run: |
sudo apt-get update && sudo apt-get install -y --no-install-recommends qemu-user-static binfmt-support
sudo update-binfmts --enable qemu-arm
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker build . -f ./Docker.centos --tag libsurvive_manylinux2014_x86_64
docker build . -f ./Docker.centos --tag libsurvive_manylinux2014_aarch64 --build-arg BASE_IMAGE=manylinux2014_aarch64
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.7'
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==2.3.1
- name: Build wheels - Linux
if: runner.os != 'Windows'
run: python -m cibuildwheel
env:
CIBW_BEFORE_ALL: "git config --global --add safe.directory /project"
CIBW_MANYLINUX_X86_64_IMAGE: libsurvive_manylinux2014_x86_64
CIBW_MANYLINUX_AARCH64_IMAGE: libsurvive_manylinux2014_aarch64
CIBW_BUILD: cp3*manylinux_x86_64 cp3*manylinux_aarch64*
CIBW_ARCHS_LINUX: x86_64 i686 aarch64
- name: Build wheels - Windows
if: runner.os == 'Windows'
run: python -m cibuildwheel
env:
CIBW_BEFORE_ALL: "git config --global --add safe.directory /project"
CIBW_BUILD: cp3*win*64
CIBW_ENVIRONMENT: "CMAKE_GENERATOR='Visual Studio 17 2022'"
- uses: actions/upload-artifact@v2
name: Upload
with:
path: ${{runner.workspace}}/libsurvive/wheelhouse/*.whl
- name: Upload with twine
run: |
python -m pip install twine
python -m twine upload wheelhouse/*.whl --skip-existing
continue-on-error: true
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_TOKEN }}