-
Notifications
You must be signed in to change notification settings - Fork 23
54 lines (50 loc) · 2.04 KB
/
libclang-linux-amd64.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: libclang-linux-amd64
on: [push, pull_request]
env:
LLVM_VER: 13.0.0
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-18.04
steps:
- uses: actions/checkout@v2
- name: get llvm-project
run: |
wget 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: cmake
run: |
cd llvm-project-$LLVM_VER/build
cmake ../llvm \
-DLLVM_ENABLE_PROJECTS=clang \
-DBUILD_SHARED_LIBS=OFF \
-DLLVM_ENABLE_TERMINFO=OFF \
-DLLVM_TARGETS_TO_BUILD=X86 \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_CXX_FLAGS_MINSIZEREL="-Os -DNDEBUG -static-libgcc -static-libstdc++ -s" \
-DCMAKE_C_COMPILER=gcc-7 \
-DCMAKE_CXX_COMPILER=g++-7
- name: build
run: cd llvm-project-$LLVM_VER/build && make libclang -j$(nproc)
- name: print dependencies
run: |
file llvm-project-$LLVM_VER/build/lib/libclang.so
ldd 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@v2
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