[DO NOT MERGE] just for test #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build & Test Linux arm64-2 | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| TAG_NAME: | |
| description: 'Release Version Tag' | |
| required: true | |
| release: | |
| types: [created] | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - '**/*.md' | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| branches: | |
| - main | |
| paths-ignore: | |
| - '**/*.md' | |
| jobs: | |
| build_universal_wheel: | |
| name: Build & Test Universal Wheel (Linux arm64)-2 | |
| runs-on: [self-hosted, linux, arm64, ubuntu-latest] | |
| if: ${{ !github.event.pull_request.draft }} | |
| steps: | |
| - name: Check CPU capabilities and requirements | |
| run: | | |
| echo "=== CPU Information ===" | |
| cat /proc/cpuinfo | |
| echo "" | |
| echo "=== Checking CPU requirements ===" | |
| if grep -P "^(?=.*atomic)(?=.*ssbs)" /proc/cpuinfo > /dev/null; then | |
| echo "CPU meets minimum requirements (atomic and ssbs flags found)" | |
| else | |
| echo "CPU does not meet minimum requirements" | |
| echo "Missing required flags: atomic and/or ssbs" | |
| echo "This may cause build failures. Consider using -DNO_ARMV81_OR_HIGHER=1" | |
| fi | |
| - name: Install Python build dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y make build-essential libssl-dev zlib1g-dev \ | |
| libbz2-dev libreadline-dev wget curl llvm \ | |
| libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev \ | |
| libffi-dev liblzma-dev libsqlite3-dev golang-go | |
| - name: Setup pyenv | |
| run: | | |
| # Remove existing pyenv installation if present | |
| rm -rf $HOME/.pyenv | |
| curl https://pyenv.run | bash | |
| export PATH="$HOME/.pyenv/bin:$PATH" | |
| eval "$(pyenv init -)" | |
| pyenv install 3.8:latest | |
| pyenv install 3.13:latest | |
| pyenv global 3.8 3.13 | |
| # Verify installations | |
| echo "Installed versions:" | |
| pyenv versions | |
| - name: Install dependencies for all Python versions | |
| run: | | |
| export PATH="$HOME/.pyenv/bin:$PATH" | |
| eval "$(pyenv init -)" | |
| for version in 3.8 3.13; do | |
| echo "Installing dependencies for Python $version" | |
| pyenv shell $version | |
| python -m pip install --upgrade pip | |
| python -m pip install setuptools tox pandas pyarrow twine psutil deltalake wheel jupyter nbconvert | |
| pyenv shell --unset | |
| done | |
| - name: Upgrade Rust toolchain | |
| run: | | |
| rustup toolchain install nightly-2025-07-07 | |
| rustup default nightly-2025-07-07 | |
| rustup component add rust-src | |
| rustc --version | |
| cargo --version | |
| - name: Install clang++ for Ubuntu | |
| run: | | |
| pwd | |
| uname -a | |
| wget https://apt.llvm.org/llvm.sh | |
| chmod +x llvm.sh | |
| sudo ./llvm.sh 19 | |
| which clang++-19 | |
| clang++-19 --version | |
| sudo apt-get install -y make cmake ccache ninja-build yasm gawk wget | |
| # Install WebAssembly linker (wasm-ld) | |
| sudo apt-get install -y lld-19 | |
| # Create symlink for wasm-ld | |
| if ! command -v wasm-ld &> /dev/null; then | |
| sudo ln -sf /usr/bin/wasm-ld-19 /usr/bin/wasm-ld || true | |
| fi | |
| which wasm-ld || echo "wasm-ld not found in PATH" | |
| ccache -s | |
| - name: Update git | |
| run: | | |
| sudo add-apt-repository ppa:git-core/ppa -y | |
| sudo apt-get update | |
| sudo apt-get install -y git | |
| git --version | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Update submodules | |
| run: | | |
| git submodule update --init --recursive --jobs 4 | |
| - name: Update version for release | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| run: | | |
| export PATH="$HOME/.pyenv/bin:$PATH" | |
| eval "$(pyenv init -)" | |
| pyenv shell 3.13 | |
| # Install bump-my-version | |
| python -m pip install bump-my-version | |
| TAG_NAME=${GITHUB_REF#refs/tags/v} | |
| bump-my-version replace --new-version $TAG_NAME | |
| echo "Version files updated to $TAG_NAME" | |
| pyenv shell --unset | |
| - name: ccache | |
| uses: hendrikmuhs/ccache-action@v1.2 | |
| with: | |
| key: ubuntu-24.04-aarch64 | |
| max-size: 5G | |
| append-timestamp: true | |
| - name: remove old clang and link clang-19 to clang | |
| run: | | |
| sudo rm -f /usr/bin/clang || true | |
| sudo ln -s /usr/bin/clang-19 /usr/bin/clang | |
| sudo rm -f /usr/bin/clang++ || true | |
| sudo ln -s /usr/bin/clang++-19 /usr/bin/clang++ | |
| which clang++ | |
| clang++ --version | |
| - name: Run chdb/build.sh | |
| timeout-minutes: 600 | |
| run: | | |
| export PATH="$HOME/.pyenv/bin:$PATH" | |
| eval "$(pyenv init -)" | |
| source ~/.cargo/env | |
| pyenv shell 3.8 | |
| export CC=/usr/bin/clang | |
| export CXX=/usr/bin/clang++ | |
| bash ./chdb/build.sh | |
| pyenv shell 3.13 | |
| bash -x ./chdb/test_smoke.sh | |
| continue-on-error: false | |
| - name: Check ccache statistics | |
| run: | | |
| ccache -s | |
| ls -lh chdb | |
| df -h | |
| - name: Build wheels | |
| run: | | |
| export PATH="$HOME/.pyenv/bin:$PATH" | |
| eval "$(pyenv init -)" | |
| export CC=/usr/bin/clang | |
| export CXX=/usr/bin/clang++ | |
| pyenv shell 3.13 | |
| make wheel | |
| - name: Install patchelf from github | |
| run: | | |
| wget https://github.com/NixOS/patchelf/releases/download/0.18.0/patchelf-0.18.0-aarch64.tar.gz -O patchelf.tar.gz | |
| tar -xvf patchelf.tar.gz | |
| sudo cp bin/patchelf /usr/bin/ | |
| sudo chmod +x /usr/bin/patchelf | |
| patchelf --version | |
| - name: Audit wheels | |
| run: | | |
| export PATH="$HOME/.pyenv/bin:$PATH" | |
| eval "$(pyenv init -)" | |
| pyenv shell 3.13 | |
| python -m pip install auditwheel | |
| auditwheel -v repair -w dist/ --plat manylinux_2_17_aarch64 dist/*.whl | |
| continue-on-error: false | |
| - name: Show files | |
| run: | | |
| # e.g: remove chdb-0.11.4-cp310-cp310-linux_aarch64.whl, keep chdb-0.11.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | |
| sudo rm -f dist/*linux_aarch64.whl | |
| ls -lh dist | |
| shell: bash | |
| - name: Setup core dump collection | |
| run: | | |
| mkdir -p tmp/core | |
| echo "tmp/core/core.%p" | sudo tee /proc/sys/kernel/core_pattern | |
| ulimit -c unlimited | |
| - name: Install GDB | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gdb | |
| - name: Test wheel with GDB exception catching (loop until failure) | |
| run: | | |
| export PATH="$HOME/.pyenv/bin:$PATH" | |
| eval "$(pyenv init -)" | |
| pyenv shell 3.13 | |
| python -m pip install dist/*.whl --force-reinstall | |
| echo "Starting loop test with GDB exception catching..." | |
| PYTHON_PATH=$(pyenv which python) | |
| for i in $(seq 1 5000); do | |
| if ! make test 2>&1; then | |
| echo "FAILED at iteration $i on make test" | |
| exit 1 | |
| fi | |
| echo "Iteration $i passed" | |
| done | |
| echo "All 5000 iterations passed!" | |
| pyenv shell --unset | |
| continue-on-error: false | |
| - name: Check and upload core files if present | |
| if: always() | |
| run: | | |
| if ls tmp/core/core.* >/dev/null 2>&1; then | |
| echo "CORE_FILES_FOUND=true" >> $GITHUB_ENV | |
| tar -czvf core-files-linux-aarch64.tar.gz tmp/core/core.* | |
| echo "Core files tar created: core-files-linux-aarch64.tar.gz" | |
| ls -lh core-files-linux-aarch64.tar.gz | |
| else | |
| echo "CORE_FILES_FOUND=false" >> $GITHUB_ENV | |
| echo "No core files found in tmp/core" | |
| fi | |
| continue-on-error: true | |
| - name: Keep killall ccache and wait for ccache to finish | |
| if: always() | |
| run: | | |
| sleep 60 | |
| while ps -ef | grep ccache | grep -v grep; do \ | |
| killall ccache; \ | |
| sleep 10; \ | |
| done | |
| - name: Upload core files if present | |
| if: always() && env.CORE_FILES_FOUND == 'true' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: core-files-linux-aarch64 | |
| path: core-files-linux-aarch64.tar.gz | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: chdb-artifacts-linux-aarch64 | |
| path: | | |
| ./dist/*.whl | |
| overwrite: true |