From e4283ec5dbde0e0c9f119c9b67fa6cba58cb3c99 Mon Sep 17 00:00:00 2001 From: max Date: Wed, 29 Jan 2025 22:24:52 -0500 Subject: [PATCH] [llvm] fix aarch64 cibuildwheel --- .github/workflows/build_test_release_eudsl.yml | 15 +++++---------- projects/eudsl-llvmpy/pyproject.toml | 7 +++---- projects/eudsl-nbgen/pyproject.toml | 8 ++++---- projects/eudsl-py/pyproject.toml | 8 ++++---- projects/eudsl-tblgen/pyproject.toml | 9 +++++---- 5 files changed, 21 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build_test_release_eudsl.yml b/.github/workflows/build_test_release_eudsl.yml index f3b09b4..dbcd439 100644 --- a/.github/workflows/build_test_release_eudsl.yml +++ b/.github/workflows/build_test_release_eudsl.yml @@ -142,16 +142,11 @@ jobs: - name: "Build eudsl-tblgen" run: | - if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then - if [[ "${{ matrix.os }}" == "ubuntu" ]]; then - export CCACHE_DIR=/host/$CCACHE_DIR - fi - $python3_command -m cibuildwheel "$PWD/projects/eudsl-tblgen" --output-dir wheelhouse - else - export CMAKE_PREFIX_PATH=$PWD/llvm-install - export PIP_FIND_LINKS=$PWD/wheelhouse - $python3_command -m pip wheel "$PWD/projects/eudsl-tblgen" -w wheelhouse -v --no-build-isolation + # this one is different from the rest as a smoketest re cibuildwheel + if [[ "${{ matrix.os }}" == "ubuntu" ]]; then + export CCACHE_DIR=/host/$CCACHE_DIR fi + $python3_command -m cibuildwheel "$PWD/projects/eudsl-tblgen" --output-dir wheelhouse - name: "Build eudsl-llvmpy" if: ${{ ! startsWith(matrix.os, 'windows') }} @@ -201,7 +196,7 @@ jobs: # just to/make sure total build continues to work - name: "Build all of eudsl" - if: ${{ github.event_name == 'pull_request' }} + if: ${{ github.event_name != 'workflow_dispatch' }} run: | $python3_command -m pip install eudsl-tblgen -f wheelhouse diff --git a/projects/eudsl-llvmpy/pyproject.toml b/projects/eudsl-llvmpy/pyproject.toml index 68bbf1a..a70c004 100644 --- a/projects/eudsl-llvmpy/pyproject.toml +++ b/projects/eudsl-llvmpy/pyproject.toml @@ -42,7 +42,7 @@ build-verbosity = 1 skip = ["*-manylinux_i686", "*-musllinux*", "pp*", "*-win32"] archs = ["auto64"] manylinux-x86_64-image = "manylinux_2_28" -manylinux-aarch64-image = "manylinux_2_34" +manylinux-aarch64-image = "quay.io/pypa/manylinux_2_34_aarch64" environment-pass = [ "LLVM_DIR", "CMAKE_GENERATOR", @@ -68,9 +68,8 @@ test-command = "ccache -sv" before-all = [ "yum install -y clang", # ccache - "curl -sLO https://github.com/ccache/ccache/releases/download/v4.10.2/ccache-4.10.2-linux-x86_64.tar.xz", - "tar -xf ccache-4.10.2-linux-x86_64.tar.xz", - "pushd ccache-4.10.2-linux-x86_64 && make install && popd", + "$(if [ \"$(arch)\" == \"x86_64\" ]; then curl -sLO https://github.com/ccache/ccache/releases/download/v4.10.2/ccache-4.10.2-linux-x86_64.tar.xz && tar -xf ccache-4.10.2-linux-x86_64.tar.xz && pushd ccache-4.10.2-linux-x86_64 && make install && popd; fi)", + "$(if [ \"$(arch)\" == \"aarch64\" ]; then dnf install -y ccache; fi)", "ccache -z" ] # synchronize TZ with host so ccache files have correct timestamp diff --git a/projects/eudsl-nbgen/pyproject.toml b/projects/eudsl-nbgen/pyproject.toml index e9d67ae..1f123db 100644 --- a/projects/eudsl-nbgen/pyproject.toml +++ b/projects/eudsl-nbgen/pyproject.toml @@ -41,7 +41,7 @@ build = ["cp39*"] skip = ["*-manylinux_i686", "*-musllinux*", "pp*", "*-win32"] archs = ["auto64"] manylinux-x86_64-image = "manylinux_2_28" -manylinux-aarch64-image = "manylinux_2_34" +manylinux-aarch64-image = "quay.io/pypa/manylinux_2_34_aarch64" environment-pass = [ "LLVM_DIR", "CMAKE_GENERATOR", @@ -70,9 +70,9 @@ repair-wheel-command = [] before-all = [ "yum install -y clang", # ccache - "curl -sLO https://github.com/ccache/ccache/releases/download/v4.10.2/ccache-4.10.2-linux-x86_64.tar.xz", - "tar -xf ccache-4.10.2-linux-x86_64.tar.xz", - "pushd ccache-4.10.2-linux-x86_64 && make install && popd" + "$(if [ \"$(arch)\" == \"x86_64\" ]; then curl -sLO https://github.com/ccache/ccache/releases/download/v4.10.2/ccache-4.10.2-linux-x86_64.tar.xz && tar -xf ccache-4.10.2-linux-x86_64.tar.xz && pushd ccache-4.10.2-linux-x86_64 && make install && popd; fi)", + "$(if [ \"$(arch)\" == \"aarch64\" ]; then dnf install -y ccache; fi)", + "ccache -z" ] # synchronize TZ with host so ccache files have correct timestamp container-engine = { name = "docker", create-args = ["-v", "/etc/timezone:/etc/timezone:ro", "-v", "/etc/localtime:/etc/localtime:ro"] } diff --git a/projects/eudsl-py/pyproject.toml b/projects/eudsl-py/pyproject.toml index 023eae4..d248a13 100644 --- a/projects/eudsl-py/pyproject.toml +++ b/projects/eudsl-py/pyproject.toml @@ -46,7 +46,7 @@ build-verbosity = 1 skip = ["*-manylinux_i686", "*-musllinux*", "pp*", "*-win32"] archs = ["auto64"] manylinux-x86_64-image = "manylinux_2_28" -manylinux-aarch64-image = "manylinux_2_34" +manylinux-aarch64-image = "quay.io/pypa/manylinux_2_34_aarch64" environment-pass = [ "LLVM_DIR", "MLIR_DIR", @@ -78,9 +78,9 @@ test-command = "ccache -s" before-all = [ "yum install -y clang", # ccache - "curl -sLO https://github.com/ccache/ccache/releases/download/v4.10.2/ccache-4.10.2-linux-x86_64.tar.xz", - "tar -xf ccache-4.10.2-linux-x86_64.tar.xz", - "pushd ccache-4.10.2-linux-x86_64 && make install && popd" + "$(if [ \"$(arch)\" == \"x86_64\" ]; then curl -sLO https://github.com/ccache/ccache/releases/download/v4.10.2/ccache-4.10.2-linux-x86_64.tar.xz && tar -xf ccache-4.10.2-linux-x86_64.tar.xz && pushd ccache-4.10.2-linux-x86_64 && make install && popd; fi)", + "$(if [ \"$(arch)\" == \"aarch64\" ]; then dnf install -y ccache; fi)", + "ccache -z" ] # synchronize TZ with host so ccache files have correct timestamp container-engine = { name = "docker", create-args = ["-v", "/etc/timezone:/etc/timezone:ro", "-v", "/etc/localtime:/etc/localtime:ro"] } diff --git a/projects/eudsl-tblgen/pyproject.toml b/projects/eudsl-tblgen/pyproject.toml index a8780ad..ea85c12 100644 --- a/projects/eudsl-tblgen/pyproject.toml +++ b/projects/eudsl-tblgen/pyproject.toml @@ -33,7 +33,7 @@ build-verbosity = 1 skip = ["*-manylinux_i686", "*-musllinux*", "pp*", "*-win32"] archs = ["auto64"] manylinux-x86_64-image = "manylinux_2_28" -manylinux-aarch64-image = "manylinux_2_34" +manylinux-aarch64-image = "quay.io/pypa/manylinux_2_34_aarch64" environment-pass = [ "LLVM_DIR", "CMAKE_GENERATOR", @@ -59,11 +59,12 @@ test-command = "ccache -s" [tool.cibuildwheel.linux] before-all = [ + "set -x", "yum install -y clang", # ccache - "curl -sLO https://github.com/ccache/ccache/releases/download/v4.10.2/ccache-4.10.2-linux-x86_64.tar.xz", - "tar -xf ccache-4.10.2-linux-x86_64.tar.xz", - "pushd ccache-4.10.2-linux-x86_64 && make install && popd" + "$(if [ \"$(arch)\" == \"x86_64\" ]; then curl -sLO https://github.com/ccache/ccache/releases/download/v4.10.2/ccache-4.10.2-linux-x86_64.tar.xz && tar -xf ccache-4.10.2-linux-x86_64.tar.xz && pushd ccache-4.10.2-linux-x86_64 && make install && popd; fi)", + "$(if [ \"$(arch)\" == \"aarch64\" ]; then dnf install -y ccache; fi)", + "ccache -z" ] # synchronize TZ with host so ccache files have correct timestamp container-engine = { name = "docker", create-args = ["-v", "/etc/timezone:/etc/timezone:ro", "-v", "/etc/localtime:/etc/localtime:ro"] }