Skip to content

Commit 7d77c0b

Browse files
author
Ivan
authored
Merge pull request #33 from advancedwebdeveloper/advancedwebdeveloper-patch-31
Adding Clang 10
2 parents ec9a54c + b9bd1d8 commit 7d77c0b

File tree

1 file changed

+50
-2
lines changed

1 file changed

+50
-2
lines changed

.github/workflows/llvm.yml

+50-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
pull_request:
66
branches: [ main ]
77
jobs:
8-
build:
8+
default-compiler: #in sense of CMake's identification - gollvm is indeed Clang oriented
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v2
@@ -15,16 +15,64 @@ jobs:
1515
run: pwd
1616
- name: Extracting llc's host target
1717
run: llc-9 --version | grep CPU
18+
#this is a recurrent task - so it's a TODO for forming a dependency
1819
- name: Compile test tool, for retrieveing CPU features
1920
run: clang -I/usr/lib/llvm-9/include/ -I/usr/lib/llvm-9/include/llvm-c -L/usr/lib/llvm-9/lib -lLLVM-9 -lstdc++ $GITHUB_WORKSPACE/llvm_cpu_features_investigation.cpp
2021
- name: Run the CPU feature extractor
2122
run: ./a.out
23+
#
2224
- name: Trying to check if we could install Ninja
2325
run: sudo apt install ninja-build -y
2426
- name: Checking the version of make, automake, autoconf, m4 and Ninja
2527
run: make --version && m4 --version && autoconf --version && automake --version && echo "Ninja's version is" && ninja --version
2628
- name: Clonning LLVM master branch && gollvm related repos.
2729
run: cd $GITHUB_WORKSPACE/clang_test_cpu_features && git clone https://github.com/llvm/llvm-project.git && cd llvm-project/llvm/tools && git clone https://go.googlesource.com/gollvm && cd gollvm && git clone https://go.googlesource.com/gofrontend && cd libgo && git clone https://github.com/libffi/libffi.git && git clone https://github.com/ianlancetaylor/libbacktrace.git
2830
- name: Compiling & linking gollvm
29-
run: cd $GITHUB_WORKSPACE/clang_test_cpu_features && mkdir build_release && cd build_release && cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=X86 -G Ninja ../llvm-project/llvm && ninja -j16 gollvm && ninja GoBackendCoreTests && ./tools/gollvm/unittests/BackendCore/GoBackendCoreTests && sudo ninja install-gollvm
31+
run: cd $GITHUB_WORKSPACE/clang_test_cpu_features && mkdir build_release && cd build_release && cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=X86 -G Ninja ../llvm-project/llvm && ninja -j16 gollvm && ninja GoBackendCoreTests && ./tools/gollvm/unittests/BackendCore/GoBackendCoreTests && sudo ninja install-gollvm
32+
clang9-build: #in sense of CMake's identification - gollvm is indeed Clang oriented
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v2
36+
- name: Get Clang's version
37+
run: clang --version
38+
- name: Check our path
39+
run: pwd
40+
- name: Extracting llc's host target
41+
run: llc-9 --version | grep CPU
42+
- name: Compile test tool, for retrieveing CPU features
43+
run: clang -I/usr/lib/llvm-9/include/ -I/usr/lib/llvm-9/include/llvm-c -L/usr/lib/llvm-9/lib -lLLVM-9 -lstdc++ $GITHUB_WORKSPACE/llvm_cpu_features_investigation.cpp
44+
- name: Run the CPU feature extractor
45+
run: ./a.out
46+
- name: Trying to check if we could install Ninja
47+
run: sudo apt install ninja-build -y
48+
- name: Checking the version of make, automake, autoconf, m4 and Ninja
49+
run: make --version && m4 --version && autoconf --version && automake --version && echo "Ninja's version is" && ninja --version
50+
- name: Clonning LLVM master branch && gollvm related repos.
51+
run: cd $GITHUB_WORKSPACE/clang_test_cpu_features && git clone https://github.com/llvm/llvm-project.git && cd llvm-project/llvm/tools && git clone https://go.googlesource.com/gollvm && cd gollvm && git clone https://go.googlesource.com/gofrontend && cd libgo && git clone https://github.com/libffi/libffi.git && git clone https://github.com/ianlancetaylor/libbacktrace.git
52+
- name: Compiling & linking gollvm
53+
run: cd $GITHUB_WORKSPACE/clang_test_cpu_features && mkdir build_release && cd build_release && cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=X86 -G Ninja ../llvm-project/llvm && ninja -j16 gollvm && ninja GoBackendCoreTests && ./tools/gollvm/unittests/BackendCore/GoBackendCoreTests
3054

55+
clang10_build: #in sense of CMake's identification - gollvm is indeed Clang oriented
56+
runs-on: ubuntu-20.04
57+
steps:
58+
- uses: actions/checkout@v2
59+
- name: Install Clang 10, using dpkg
60+
run: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 10
61+
- name: Check if Clang 10 is on board
62+
run: which clang-10
63+
- name: Check our path
64+
run: pwd
65+
- name: Extracting llc's host target
66+
run: llc-9 --version | grep CPU
67+
- name: Compile test tool, for retrieveing CPU features
68+
run: clang -I/usr/lib/llvm-9/include/ -I/usr/lib/llvm-9/include/llvm-c -L/usr/lib/llvm-9/lib -lLLVM-9 -lstdc++ $GITHUB_WORKSPACE/llvm_cpu_features_investigation.cpp
69+
- name: Run the CPU feature extractor
70+
run: ./a.out
71+
- name: Trying to check if we could install Ninja
72+
run: sudo apt install ninja-build -y
73+
- name: Checking the version of make, automake, autoconf, m4 and Ninja
74+
run: make --version && m4 --version && autoconf --version && automake --version && echo "Ninja's version is" && ninja --version
75+
- name: Clonning LLVM master branch && gollvm related repos.
76+
run: cd $GITHUB_WORKSPACE/clang_test_cpu_features && git clone https://github.com/llvm/llvm-project.git && cd llvm-project/llvm/tools && git clone https://go.googlesource.com/gollvm && cd gollvm && git clone https://go.googlesource.com/gofrontend && cd libgo && git clone https://github.com/libffi/libffi.git && git clone https://github.com/ianlancetaylor/libbacktrace.git
77+
- name: Compiling & linking gollvm
78+
run: cd $GITHUB_WORKSPACE/clang_test_cpu_features && mkdir build_release && cd build_release && cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_C_COMPILER=clang-10 -DCMAKE_CXX_COMPILER=clang++-10 -G Ninja ../llvm-project/llvm && ninja -j16 gollvm && ninja GoBackendCoreTests && ./tools/gollvm/unittests/BackendCore/GoBackendCoreTests

0 commit comments

Comments
 (0)