Skip to content

Adding Clang 10 #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 19, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 50 additions & 2 deletions .github/workflows/llvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
pull_request:
branches: [ main ]
jobs:
build:
default-compiler: #in sense of CMake's identification - gollvm is indeed Clang oriented
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -15,16 +15,64 @@ jobs:
run: pwd
- name: Extracting llc's host target
run: llc-9 --version | grep CPU
#this is a recurrent task - so it's a TODO for forming a dependency
- name: Compile test tool, for retrieveing CPU features
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
- name: Run the CPU feature extractor
run: ./a.out
#
- name: Trying to check if we could install Ninja
run: sudo apt install ninja-build -y
- name: Checking the version of make, automake, autoconf, m4 and Ninja
run: make --version && m4 --version && autoconf --version && automake --version && echo "Ninja's version is" && ninja --version
- name: Clonning LLVM master branch && gollvm related repos.
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
- name: Compiling & linking gollvm
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
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
clang9-build: #in sense of CMake's identification - gollvm is indeed Clang oriented
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get Clang's version
run: clang --version
- name: Check our path
run: pwd
- name: Extracting llc's host target
run: llc-9 --version | grep CPU
- name: Compile test tool, for retrieveing CPU features
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
- name: Run the CPU feature extractor
run: ./a.out
- name: Trying to check if we could install Ninja
run: sudo apt install ninja-build -y
- name: Checking the version of make, automake, autoconf, m4 and Ninja
run: make --version && m4 --version && autoconf --version && automake --version && echo "Ninja's version is" && ninja --version
- name: Clonning LLVM master branch && gollvm related repos.
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
- name: Compiling & linking gollvm
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

clang10_build: #in sense of CMake's identification - gollvm is indeed Clang oriented
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install Clang 10, using dpkg
run: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 10
- name: Check if Clang 10 is on board
run: which clang-10
- name: Check our path
run: pwd
- name: Extracting llc's host target
run: llc-9 --version | grep CPU
- name: Compile test tool, for retrieveing CPU features
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
- name: Run the CPU feature extractor
run: ./a.out
- name: Trying to check if we could install Ninja
run: sudo apt install ninja-build -y
- name: Checking the version of make, automake, autoconf, m4 and Ninja
run: make --version && m4 --version && autoconf --version && automake --version && echo "Ninja's version is" && ninja --version
- name: Clonning LLVM master branch && gollvm related repos.
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
- name: Compiling & linking gollvm
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