Fixes CI for macos arm64 runner (migrate to the github M1 runner). #108
Workflow file for this run
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-alpine-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 frolvlad/alpine-gxx | |
- name: cmake & build in docker | |
run: | | |
cp .github/script-to-build-alpine.sh ./llvm-project-$LLVM_VER/ | |
cd llvm-project-$LLVM_VER | |
bash ./script-to-build-alpine.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) | |
- name: create and print sha512sum | |
run: | | |
cd llvm-project-$LLVM_VER/build/lib | |
sha512sum libclang.so > libclang.so.$LLVM_VER.alpine-amd64.sha512sum | |
echo "Checksum is: " | |
cat libclang.so.$LLVM_VER.alpine-amd64.sha512sum | |
tar zcvfh libclang.so.$LLVM_VER.alpine-amd64.tar.gz libclang.so libclang.so.$LLVM_VER.alpine-amd64.sha512sum | |
shasum -a512 libclang.so.$LLVM_VER.alpine-amd64.tar.gz | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: libclang.so.${{env.LLVM_VER}}.alpine-amd64.tar.gz | |
path: llvm-project-${{env.LLVM_VER}}/build/lib/libclang.so.${{env.LLVM_VER}}.alpine-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=musllinux_1_2_x86_64 | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: wheel-${{env.LLVM_VER}}-musllinux_1_2_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 |