From 2b9fb27a8002a3d2ab430b633d2a2cda10b91c12 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Wed, 10 Jul 2024 11:27:03 -0700 Subject: [PATCH 1/7] Run on bare metal arm --- .github/workflows/build-wheels.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 5b2f23458..c2fd44adf 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -126,7 +126,6 @@ jobs: context: "Build wheels (sdist)" manylinux: - runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: @@ -139,17 +138,17 @@ jobs: "cp312" ] platform: [ - "x86_64", - "aarch64" + ["x86_64", "ubuntu-22.04"], + ["aarch64", "aerospike_arm_runners_2"] ] - + runs-on: ${{ matrix.platform[1] }} steps: - name: Show job status for commit uses: myrotvorets/set-commit-status-action@v2.0.0 if: ${{ github.event_name != 'push' && github.event_name != 'pull_request' }} with: sha: ${{ github.sha }} - context: "Build wheels (${{ matrix.python }}-manylinux_${{ matrix.platform }})" + context: "Build wheels (${{ matrix.python }}-manylinux_${{ matrix.platform[0] }})" - uses: actions/checkout@v4 with: @@ -158,7 +157,7 @@ jobs: fetch-depth: 0 - name: Set up QEMU for cross compiling arm64 - if: ${{ matrix.platform == 'aarch64' }} + if: ${{ matrix.platform[0] == 'aarch64' }} uses: docker/setup-qemu-action@v2 with: platforms: arm64 @@ -187,13 +186,13 @@ jobs: uses: pypa/cibuildwheel@v2.19.2 env: CIBW_ENVIRONMENT_PASS_LINUX: ${{ inputs.apply-no-optimizations && 'UNOPTIMIZED' || '' }} - CIBW_BUILD: ${{ matrix.python }}-manylinux_${{ matrix.platform }} + CIBW_BUILD: ${{ matrix.python }}-manylinux_${{ matrix.platform[0] }} CIBW_BUILD_FRONTEND: build CIBW_BEFORE_ALL_LINUX: > yum install openssl-devel -y && yum install python-devel -y && yum install python-setuptools -y - CIBW_ARCHS: "${{ matrix.platform }}" + CIBW_ARCHS: "${{ matrix.platform[0] }}" CIBW_TEST_COMMAND: ${{ env.TEST_COMMAND }} - name: Upload wheels to GitHub @@ -201,7 +200,7 @@ jobs: if: ${{ always() }} with: path: ./wheelhouse/*.whl - name: ${{ matrix.python }}-manylinux_${{ matrix.platform }}.build + name: ${{ matrix.python }}-manylinux_${{ matrix.platform[0] }}.build - name: Set final commit status uses: myrotvorets/set-commit-status-action@v2.0.0 @@ -209,7 +208,7 @@ jobs: with: sha: ${{ github.sha }} status: ${{ job.status }} - context: "Build wheels (${{ matrix.python }}-manylinux_${{ matrix.platform }})" + context: "Build wheels (${{ matrix.python }}-manylinux_${{ matrix.platform[0] }})" macOS-x86: strategy: From f8d4a0a0e534240547319fc1387bba0fde66ce83 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Wed, 10 Jul 2024 11:29:36 -0700 Subject: [PATCH 2/7] Dont need qemu anymore --- .github/workflows/build-wheels.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index c2fd44adf..23f9ed04b 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -156,12 +156,6 @@ jobs: ref: ${{ inputs.ref }} fetch-depth: 0 - - name: Set up QEMU for cross compiling arm64 - if: ${{ matrix.platform[0] == 'aarch64' }} - uses: docker/setup-qemu-action@v2 - with: - platforms: arm64 - - uses: ./.github/actions/run-ee-server-for-ext-container if: ${{ inputs.run_tests }} with: From 2e32dc4db1487baeafb708fb0d7a755cf1281ac6 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Wed, 10 Jul 2024 11:32:07 -0700 Subject: [PATCH 3/7] try --- .github/actions/run-ee-server/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/run-ee-server/action.yml b/.github/actions/run-ee-server/action.yml index f08bc76b1..87dedf77d 100644 --- a/.github/actions/run-ee-server/action.yml +++ b/.github/actions/run-ee-server/action.yml @@ -19,7 +19,7 @@ runs: using: "composite" steps: - name: Install crudini to manipulate config.conf - run: pip3 install crudini -c requirements.txt + run: pipx install crudini --pip-args -c requirements.txt working-directory: .github/workflows shell: bash From 2b143eb8755ebb80aa509a3d5068209989e790bc Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Wed, 10 Jul 2024 11:33:47 -0700 Subject: [PATCH 4/7] Treat pip args as one value --- .github/actions/run-ee-server/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/run-ee-server/action.yml b/.github/actions/run-ee-server/action.yml index 87dedf77d..856208c3a 100644 --- a/.github/actions/run-ee-server/action.yml +++ b/.github/actions/run-ee-server/action.yml @@ -19,7 +19,7 @@ runs: using: "composite" steps: - name: Install crudini to manipulate config.conf - run: pipx install crudini --pip-args -c requirements.txt + run: pipx install crudini --pip-args "-c requirements.txt" working-directory: .github/workflows shell: bash From eeac0aeafa21123dfadc4847e03ad140b6ac3e53 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Wed, 10 Jul 2024 14:19:23 -0700 Subject: [PATCH 5/7] Use abs path as temporary fix for pipx 1.5.0 bug --- .github/actions/run-ee-server/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/run-ee-server/action.yml b/.github/actions/run-ee-server/action.yml index 856208c3a..40d691129 100644 --- a/.github/actions/run-ee-server/action.yml +++ b/.github/actions/run-ee-server/action.yml @@ -19,7 +19,7 @@ runs: using: "composite" steps: - name: Install crudini to manipulate config.conf - run: pipx install crudini --pip-args "-c requirements.txt" + run: pipx install crudini --pip-args "-c ${{ github.workspace }}/.github/workflows/requirements.txt" working-directory: .github/workflows shell: bash From 65f92e58cef2a40cb45345578de134099ccf0406 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Wed, 10 Jul 2024 15:36:27 -0700 Subject: [PATCH 6/7] update rest of cicd code that uses arm --- .github/workflows/stage-tests.yml | 8 +------- .github/workflows/test-server-rc.yml | 17 +++++------------ 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/.github/workflows/stage-tests.yml b/.github/workflows/stage-tests.yml index e73f2ab40..29a3a5164 100644 --- a/.github/workflows/stage-tests.yml +++ b/.github/workflows/stage-tests.yml @@ -64,7 +64,7 @@ jobs: fail-fast: false env: LINUX_DISTRO_CONTAINER_NAME: linux-distro - runs-on: ubuntu-22.04 + runs-on: ${{ matrix.test-case[2] == 'linux/amd64' && 'ubuntu-22.04' || 'aerospike_arm_runners_2' }} steps: # TODO: the checkout code is also duplicated in the macOS stage tests # But it's only a few lines of code so I didn't bother to create a composite action for it. @@ -96,12 +96,6 @@ jobs: JFROG_ACCESS_TOKEN: ${{ secrets.JFROG_ACCESS_TOKEN }} JFROG_REPO_NAME: ${{ vars.JFROG_REPO_NAME }} - - name: Set up QEMU for cross compiling arm64 - if: ${{ env.DISTRO_DOCKER_IMAGE_PLATFORM == 'linux/arm64' }} - uses: docker/setup-qemu-action@v2 - with: - platforms: arm64 - - uses: ./.github/actions/run-ee-server with: use-server-rc: ${{ inputs.use-server-rc }} diff --git a/.github/workflows/test-server-rc.yml b/.github/workflows/test-server-rc.yml index 33a642f1c..4a65c06bc 100644 --- a/.github/workflows/test-server-rc.yml +++ b/.github/workflows/test-server-rc.yml @@ -13,7 +13,6 @@ on: jobs: manylinux: - runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: @@ -26,20 +25,14 @@ jobs: ["3.12", "cp312"] ] platform: [ - "x86_64", - "aarch64" + ["x86_64", "ubuntu-22.04"], + ["aarch64", "aerospike_arm_runners_2"] ] - + runs-on: ${{ matrix.platform[1] }} steps: - uses: actions/checkout@v4 - - name: Set up QEMU for cross compiling arm64 - if: ${{ matrix.platform == 'aarch64' }} - uses: docker/setup-qemu-action@v2 - with: - platforms: arm64 - - - run: docker run -d --name manylinux quay.io/pypa/manylinux2014_${{ matrix.platform }} tail -f /dev/null + - run: docker run -d --name manylinux quay.io/pypa/manylinux2014_${{ matrix.platform[0] }} tail -f /dev/null - uses: ./.github/actions/run-ee-server-for-ext-container with: @@ -50,7 +43,7 @@ jobs: - uses: actions/download-artifact@v4 with: - name: ${{ matrix.python[1] }}-manylinux_${{ matrix.platform }}.build + name: ${{ matrix.python[1] }}-manylinux_${{ matrix.platform[0] }}.build path: ./ - name: Copy repo and wheel into manylinux container From 58a0eb04db148452b9b07ca754be3748194ce155 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 11 Jul 2024 09:55:14 -0700 Subject: [PATCH 7/7] Add comment --- .github/actions/run-ee-server/action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/actions/run-ee-server/action.yml b/.github/actions/run-ee-server/action.yml index 40d691129..79f76a2e2 100644 --- a/.github/actions/run-ee-server/action.yml +++ b/.github/actions/run-ee-server/action.yml @@ -19,6 +19,8 @@ runs: using: "composite" steps: - name: Install crudini to manipulate config.conf + # This will only work on the Github hosted runners. + # TODO: self hosted runners do not have pipx installed by default run: pipx install crudini --pip-args "-c ${{ github.workspace }}/.github/workflows/requirements.txt" working-directory: .github/workflows shell: bash