Skip to content

Commit

Permalink
fix: clang path with diff os
Browse files Browse the repository at this point in the history
  • Loading branch information
Yvictor committed May 14, 2024
1 parent 933404f commit 2af9f64
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,35 @@ jobs:
DEPS_PATH: ${{ github.workspace }}/dependencies
TA_INCLUDE_PATH: ${{ github.workspace }}/dependencies/include
TA_LIBRARY_PATH: ${{ github.workspace }}/dependencies/lib
- name: Build wheels
- name: Build wheels for x86_64
if: matrix.target == 'x86_64'
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
manylinux: auto
docker-options: -e LIBCLANG_PATH=/opt/rh/llvm-toolset-7/root/usr/lib64/ -e LIBCLANG_STATIC_PATH=/opt/rh/llvm-toolset-7/root/usr/lib64/ -e CLANG_PATH=/opt/rh/llvm-toolset-7/root/usr/bin/clang
before-script-linux: |
# If we're running on rhel centos, install needed packages.
if command -v yum &> /dev/null; then
yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic centos-release-scl llvm-toolset-7 && echo 'source scl_source enable llvm-toolset-7' >> ~/.bashrc
# && source scl_source enable llvm-toolset-7
# If we're running on i686 we need to symlink libatomic
# in order to build openssl with -latomic flag.
if [[ ! -d "/usr/lib64" ]]; then
ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so
fi
else
# If we're running on debian-based system.
apt update -y && apt-get install -y libssl-dev openssl pkg-config libclang-dev gcc-multilib
fi
env:
DEPS_PATH: ${{ github.workspace }}/dependencies
TA_INCLUDE_PATH: ${{ github.workspace }}/dependencies/include
TA_LIBRARY_PATH: ${{ github.workspace }}/dependencies/lib
- name: Build wheels for aarch64-unknown-linux-gnu
if: matrix.target == 'aarch64-unknown-linux-gnu'
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
Expand Down

0 comments on commit 2af9f64

Please sign in to comment.