Upgrade llvm version to v18.1.1. #163
This file contains 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: libclang-linux-amd64 | |
on: [push, pull_request] | |
env: | |
LLVM_VER: 18.1.1 | |
concurrency: | |
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
build-and-deploy: | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: free disk spaces | |
run: | | |
./.github/free-disk-space.sh || true | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: install wheel dependencies | |
run: | | |
pip3 install wheel | |
- name: get llvm-project | |
run: | | |
wget -q https://github.com/llvm/llvm-project/releases/download/llvmorg-$LLVM_VER/llvm-project-$LLVM_VER.src.tar.xz | |
tar xf llvm-project-$LLVM_VER.src.tar.xz | |
mv llvm-project-$LLVM_VER.src llvm-project-$LLVM_VER | |
- name: make build directory | |
run: mkdir -p llvm-project-$LLVM_VER/build | |
- name: pull docker | |
run: | | |
sudo docker pull quay.io/pypa/manylinux2010_x86_64:latest | |
- name: cmake & build in docker | |
run: | | |
cp .github/script-to-build-manylinux2010.sh ./llvm-project-$LLVM_VER/ | |
cd llvm-project-$LLVM_VER | |
bash ./script-to-build-manylinux2010.sh | |
- name: print dependencies | |
run: | | |
du -csh $(realpath llvm-project-$LLVM_VER/build/lib/libclang.so) | |
file $(realpath llvm-project-$LLVM_VER/build/lib/libclang.so) | |
ldd llvm-project-$LLVM_VER/build/lib/libclang.so | |
strings llvm-project-$LLVM_VER/build/lib/libclang.so | grep GLIBC | |
nm --dynamic --undefined-only --with-symbol-versions llvm-project-$LLVM_VER/build/lib/libclang.so | |
- name: create and print sha512sum | |
run: | | |
cd llvm-project-$LLVM_VER/build/lib | |
sha512sum libclang.so > libclang.so.$LLVM_VER.linux-amd64.sha512sum | |
echo "Checksum is: " | |
cat libclang.so.$LLVM_VER.linux-amd64.sha512sum | |
tar zcvfh libclang.so.$LLVM_VER.linux-amd64.tar.gz libclang.so libclang.so.$LLVM_VER.linux-amd64.sha512sum | |
shasum -a512 libclang.so.$LLVM_VER.linux-amd64.tar.gz | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: libclang.so.${{env.LLVM_VER}}.linux-amd64.tar.gz | |
path: llvm-project-${{env.LLVM_VER}}/build/lib/libclang.so.${{env.LLVM_VER}}.linux-amd64.tar.gz | |
- name: generate wheel package | |
run: | | |
cp llvm-project-$LLVM_VER/build/lib/libclang.so native/ | |
python3 setup_ext.py bdist_wheel --universal --plat-name=manylinux2010_x86_64 | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: wheel-${{env.LLVM_VER}}-manylinux2010_x86_64 | |
path: dist/*.whl | |
- name: Publish to PyPI | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages_dir: dist/ | |
password: ${{ secrets.PYPI_TOKEN }} | |
verbose: true | |
print_hash: true | |
build-and-deploy-sdist: | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
runs-on: ubuntu-20.04 | |
needs: [build-and-deploy] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: install wheel dependencies | |
run: | | |
pip3 install wheel | |
- name: get llvm-project | |
run: | | |
wget -q https://github.com/llvm/llvm-project/releases/download/llvmorg-$LLVM_VER/llvm-project-$LLVM_VER.src.tar.xz | |
tar xf llvm-project-$LLVM_VER.src.tar.xz | |
mv llvm-project-$LLVM_VER.src llvm-project-$LLVM_VER | |
- name: generate wheel package | |
run: | | |
python3 setup.py sdist | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: wheel-${{env.LLVM_VER}}-sdist | |
path: dist/*.tar.gz | |
- name: Publish to PyPI | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages_dir: dist/ | |
password: ${{ secrets.PYPI_TOKEN }} | |
verbose: true | |
print_hash: true |