llvm-project
59 строк · 2.9 Кб
1def clang(arch):
2return {
3"kind": "pipeline",
4"name": "%s-clang" % arch,
5"steps": [
6{
7"name": "test",
8"image": "ubuntu",
9"commands": [
10"apt-get update && apt-get install -y clang-8 cmake ninja-build lld-8 llvm-8-dev libc++-8-dev libc++abi-8-dev libz-dev git",
11"git clone --depth=1 -b f18 https://github.com/flang-compiler/f18-llvm-project.git llvm-project",
12"mkdir llvm-project/build && cd llvm-project/build",
13'env CC=clang-8 CXX=clang++-8 CXXFLAGS="-stdlib=libc++" LDFLAGS="-fuse-ld=lld" cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../install -DLLVM_TARGETS_TO_BUILD=host -DLLVM_INSTALL_UTILS=On -DLLVM_ENABLE_PROJECTS="mlir" ../llvm',
14"ninja install",
15"cd ../..",
16"mkdir build && cd build",
17'env CC=clang-8 CXX=clang++-8 CXXFLAGS="-UNDEBUG -stdlib=libc++" LDFLAGS="-fuse-ld=lld" cmake -GNinja -DCMAKE_BUILD_TYPE=Release .. -DLLVM_DIR=/drone/src/llvm-project/install/lib/cmake/llvm -DMLIR_DIR=/drone/src/llvm-project/install/lib/cmake/mlir -DLLVM_EXTERNAL_LIT=/drone/src/llvm-project/build/bin/llvm-lit',
18"ninja -j8",
19"ctest --output-on-failure -j24",
20"ninja check-all",
21],
22},
23],
24
25}
26
27def gcc(arch):
28return {
29"kind": "pipeline",
30"name": "%s-gcc" % arch,
31"steps": [
32{
33"name": "test",
34"image": "gcc",
35"commands": [
36"apt-get update && apt-get install -y cmake ninja-build llvm-dev libz-dev git",
37"git clone --depth=1 -b f18 https://github.com/flang-compiler/f18-llvm-project.git llvm-project",
38"mkdir llvm-project/build && cd llvm-project/build",
39'env CC=gcc CXX=g++ LDFLAGS="-fuse-ld=gold" cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../install -DLLVM_TARGETS_TO_BUILD=host -DLLVM_INSTALL_UTILS=On -DLLVM_ENABLE_PROJECTS="mlir" ../llvm',
40"ninja install",
41"cd ../..",
42"mkdir build && cd build",
43'env CC=gcc CXX=g++ CXXFLAGS="-UNDEBUG" LDFLAGS="-fuse-ld=gold" cmake -GNinja -DCMAKE_BUILD_TYPE=Release .. -DLLVM_DIR=/drone/src/llvm-project/install/lib/cmake/llvm -DMLIR_DIR=/drone/src/llvm-project/install/lib/cmake/mlir -DLLVM_EXTERNAL_LIT=/drone/src/llvm-project/build/bin/llvm-lit',
44"ninja -j8",
45"ctest --output-on-failure -j24",
46"ninja check-all",
47],
48},
49],
50
51}
52
53def main(ctx):
54return [
55clang("amd64"),
56clang("arm64"),
57gcc("amd64"),
58gcc("arm64"),
59]
60
61