From 7ce3eb367458f5bf008a55397a1dfd6f61b29c78 Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Sun, 21 Apr 2024 16:33:27 +0530 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=9B=A9=EF=B8=8F=20Try=20buildjet=20aa?= =?UTF-8?q?rch64=20Linux=20runners?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3df457f..a30bc2e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -76,6 +76,43 @@ jobs: - name: Test entry points for package run: nox -s venv + build_wheels_linux_aarch64: + needs: [style] + name: linux-aarch64-buildjet + if: >- + contains(github.event.head_commit.message, '[buildjet]') && + github.repository == 'agriyakhetarpal/hugo-python-distributions' + runs-on: buildjet-2vcpu-ubuntu-2204-arm + steps: + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + - uses: buildjet/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 + with: + python-version: 3.12 + + - name: Set up Go toolchain + id: setup-go + uses: buildjet/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + with: + go-version: '1.22.2' + cache: false + check-latest: true + + - name: Restore Hugo builder cache + uses: buildjet/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 + with: + path: ./hugo_cache/ + key: linux-aarch64-buildjet-hugo-${{ steps.setup-go.outputs.go-version }} + + - name: Install Python dependencies + run: python -m pip install build virtualenv nox + + - name: Build binary distribution (wheel) on Linux + run: | + python -m build --wheel . --outdir wheelhouse/ + + - name: Test entry points for package + run: nox -s venv + experimental: needs: [style] name: ${{ matrix.runs-on }}-${{ matrix.architecture }}-python-${{ matrix.python-version }} From 554d13e0e6ad6d2e15eb22a0dada81feb88697f1 Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Sun, 21 Apr 2024 16:39:26 +0530 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=A7=AA=20Test=20Linux=20aarch64=20run?= =?UTF-8?q?=20[buildjet]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a30bc2e..0ec3169 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,15 +79,10 @@ jobs: build_wheels_linux_aarch64: needs: [style] name: linux-aarch64-buildjet - if: >- - contains(github.event.head_commit.message, '[buildjet]') && - github.repository == 'agriyakhetarpal/hugo-python-distributions' runs-on: buildjet-2vcpu-ubuntu-2204-arm steps: - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - - uses: buildjet/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 - with: - python-version: 3.12 + - uses: buildjet/setup-python@v5 - name: Set up Go toolchain id: setup-go From 683f16c660df3ceff37451cb4888df70a557d890 Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Mon, 22 Apr 2024 13:33:33 +0530 Subject: [PATCH 3/3] Use `cibuildwheel` with BuildJet runners --- .github/workflows/ci.yml | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0ec3169..a53504f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,8 @@ concurrency: env: FORCE_COLOR: 3 + CIBW_BUILD_VERBOSITY: 2 + CIBW_BUILD_FRONTEND: "pip" # use pip for now, not build – missing buildDate otherwise jobs: style: @@ -78,35 +80,31 @@ jobs: build_wheels_linux_aarch64: needs: [style] - name: linux-aarch64-buildjet + name: linux-aarch64-buildjet-python-3.12 runs-on: buildjet-2vcpu-ubuntu-2204-arm steps: - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - uses: buildjet/setup-python@v5 - - - name: Set up Go toolchain - id: setup-go - uses: buildjet/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + - uses: buildjet/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: go-version: '1.22.2' cache: false check-latest: true - - name: Restore Hugo builder cache - uses: buildjet/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 - with: - path: ./hugo_cache/ - key: linux-aarch64-buildjet-hugo-${{ steps.setup-go.outputs.go-version }} - - - name: Install Python dependencies - run: python -m pip install build virtualenv nox - - - name: Build binary distribution (wheel) on Linux + - name: Build binary distribution (wheel) on Linux (aarch64) run: | - python -m build --wheel . --outdir wheelhouse/ - - - name: Test entry points for package - run: nox -s venv + python -m pip install cibuildwheel + python -m cibuildwheel --output-dir wheelhouse + env: + CIBW_BUILD: "cp312-*" + CIBW_ARCHS_LINUX: aarch64 + CIBW_BEFORE_ALL_LINUX: bash scripts/ci/tools/linux/install_go.sh + CIBW_ENVIRONMENT_LINUX: PATH=$PATH:$HOME/go_installed/go/bin + CIBW_SKIP: "pp* *musllinux*" + CIBW_MANYLINUX_AARCH64_IMAGE: "manylinux_2_28" + CIBW_TEST_COMMAND: > + hugo version + hugo env --logLevel debug experimental: needs: [style]