From 63746f6e496d7f306173c4f34e74176bd3105ab0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Kijewski?= Date: Tue, 8 Oct 2024 23:52:47 +0200 Subject: [PATCH] ci: add new linux build script --- .../actions/build_linux_v2_setup/action.yml | 22 ++++ .github/workflows/build_linux_v2.yml | 112 ++++++++++++++++++ 2 files changed, 134 insertions(+) create mode 100644 .github/actions/build_linux_v2_setup/action.yml create mode 100644 .github/workflows/build_linux_v2.yml diff --git a/.github/actions/build_linux_v2_setup/action.yml b/.github/actions/build_linux_v2_setup/action.yml new file mode 100644 index 0000000..f01e751 --- /dev/null +++ b/.github/actions/build_linux_v2_setup/action.yml @@ -0,0 +1,22 @@ +name: Build Linux v2 + +runs: + using: composite + steps: + - name: Cache pip + uses: actions/cache@v4 + with: + key: cache--${{ hashFiles('./requirements-dev.txt') }} + path: ~/.cache/pip + + - run: python -m pip install -U pip wheel setuptools + shell: bash + + - run: python -m pip install -Ur requirements-dev.txt + shell: bash + + - run: python -m pip install -U 'cibuildwheel==2.*' + shell: bash + + - run: make prepare + shell: bash diff --git a/.github/workflows/build_linux_v2.yml b/.github/workflows/build_linux_v2.yml new file mode 100644 index 0000000..7215f39 --- /dev/null +++ b/.github/workflows/build_linux_v2.yml @@ -0,0 +1,112 @@ +name: Build Wheels (Linux) + +on: + workflow_dispatch: + inputs: {} + +jobs: + linux-x86_64: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - uses: ./.github/actions/build_linux_v2_setup + - run: python -m cibuildwheel --output-dir wheelhouse + shell: bash + env: + CIBW_BUILD_FRONTEND: build + CIBW_SKIP: 'cp27-* pp*' + CIBW_MANYLINUX_X86_64_IMAGE: dockcross/manylinux2014-x64 + CIBW_PLATFORM: linux + CIBW_ARCHS: x86_64 + CIBW_FREE_THREADED_SUPPORT: 'true' + - uses: actions/upload-artifact@v4 + with: + name: linux-x86_64 + path: ./wheelhouse + + linux-i686: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - uses: ./.github/actions/build_linux_v2_setup + - run: python -m cibuildwheel --output-dir wheelhouse + shell: bash + env: + CIBW_BUILD_FRONTEND: build + CIBW_SKIP: 'cp27-* pp*' + CIBW_MANYLINUX_I686_IMAGE: dockcross/manylinux2014-x86 + CIBW_PLATFORM: linux + CIBW_ARCHS: i686 + CIBW_FREE_THREADED_SUPPORT: 'true' + - uses: actions/upload-artifact@v4 + with: + name: linux-i686 + path: ./wheelhouse + + linux-aarch64: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - uses: ./.github/actions/build_linux_v2_setup + - run: python -m cibuildwheel --output-dir wheelhouse + shell: bash + env: + CIBW_BUILD_FRONTEND: build + CIBW_SKIP: 'cp27-* pp*' + CIBW_MANYLINUX_AARCH64_IMAGE: dockcross/linux-arm64-lts + CIBW_MUSLLINUX_AARCH64_IMAGE: dockcross/linux-arm64-musl + CIBW_PLATFORM: linux + CIBW_ARCHS: aarch64 + CIBW_FREE_THREADED_SUPPORT: 'true' + - uses: actions/upload-artifact@v4 + with: + name: linux-aarch64 + path: ./wheelhouse + + linux-ppc64le: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - uses: ./.github/actions/build_linux_v2_setup + - run: python -m cibuildwheel --output-dir wheelhouse + shell: bash + env: + CIBW_BUILD_FRONTEND: build + CIBW_SKIP: 'cp27-* pp* *musl*' + CIBW_MANYLINUX_PPC64LE_IMAGE: dockcross/linux-ppc64le-lts + CIBW_PLATFORM: linux + CIBW_ARCHS: ppc64le + CIBW_FREE_THREADED_SUPPORT: 'true' + - uses: actions/upload-artifact@v4 + with: + name: linux-ppc64le + path: ./wheelhouse + + linux-armv7l: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - uses: ./.github/actions/build_linux_v2_setup + - run: python -m cibuildwheel --output-dir wheelhouse + shell: bash + env: + CIBW_BUILD_FRONTEND: build + CIBW_SKIP: 'cp27-* pp*' + CIBW_MUSLLINUX_ARMV7L_IMAGE: dockcross/linux-armv7l-musl + CIBW_PLATFORM: linux + CIBW_ARCHS: armv7l + CIBW_FREE_THREADED_SUPPORT: 'true' + - uses: actions/upload-artifact@v4 + with: + name: linux-armv7l + path: ./wheelhouse