Skip to content

gollvm

gollvm #99

name: gollvm
on:
create:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
gcc_compat_build_release: #in sense of CMake's identification - gollvm is indeed Clang oriented
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Get GCC's version
run: gcc --version
- name: Check our path
run: pwd
- 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/gollvm_build_process && git clone -b llvm-for-gollvm https://github.com/plctlab/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/gollvm_build_process && 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_relwithdebuginfo: #we had some issues, with this configuration (llvm-goc related) - so adding this build, to ensure
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-10 --version | grep CPU
- name: Compile test tool, for retrieveing CPU features
run: clang-10 -I/usr/lib/llvm-10/include/ -I/usr/lib/llvm-10/include/llvm-c -L/usr/lib/llvm-10/lib -lLLVM-10 -lstdc++ $GITHUB_WORKSPACE/gollvm_build_process/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/gollvm_build_process && git clone -b llvm-for-gollvm https://github.com/plctlab/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/gollvm_build_process && mkdir build_debuggable_release && cd build_debuggable_release && cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -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
clang10_build_default: #we had some issues, with this configuration (llvm-goc related) - so adding this build, to ensure
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-10 --version | grep CPU
- name: Compile test tool, for retrieveing CPU features
run: clang-10 -I/usr/lib/llvm-10/include/ -I/usr/lib/llvm-10/include/llvm-c -L/usr/lib/llvm-10/lib -lLLVM-10 -lstdc++ $GITHUB_WORKSPACE/gollvm_build_process/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/gollvm_build_process && 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/gollvm_build_process && mkdir build_debuggable_release && cd build_debuggable_release && cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -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
clang10_build_minsizerel:
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-10 --version | grep CPU
- name: Compile test tool, for retrieveing CPU features
run: clang-10 -I/usr/lib/llvm-10/include/ -I/usr/lib/llvm-10/include/llvm-c -L/usr/lib/llvm-10/lib -lLLVM-10 -lstdc++ $GITHUB_WORKSPACE/gollvm_build_process/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/gollvm_build_process && git clone -b llvm-for-gollvm https://github.com/plctlab/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/gollvm_build_process && mkdir build_min && cd build_min && cmake -DCMAKE_BUILD_TYPE=MinSizeRel -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
clang13_build_release: #in sense of CMake's identification - gollvm is indeed Clang oriented
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install Clang 13, using dpkg
run: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 13
- name: Check if Clang 13 is on board
run: which clang-13
- name: Check our path
run: pwd
- name: Extracting llc's host target
run: llc-13 --version | grep CPU
- name: Compile test tool, for retrieveing CPU features
run: clang-13 -I/usr/lib/llvm-11/include/ -I/usr/lib/llvm-11/include/llvm-c -L/usr/lib/llvm-11/lib -lLLVM-11 -lstdc++ $GITHUB_WORKSPACE/gollvm_build_process/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/gollvm_build_process && git clone -b llvm-for-gollvm https://github.com/plctlab/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/gollvm_build_process && mkdir build_release && cd build_release && cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_C_COMPILER=clang-13 -DCMAKE_CXX_COMPILER=clang++-13 -G Ninja ../llvm-project/llvm && ninja -j16 gollvm && ninja GoBackendCoreTests && ./tools/gollvm/unittests/BackendCore/GoBackendCoreTests
clang12_build_minsizerel: #The build with a minimal footprint?
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install Clang 12, using dpkg
run: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 12
#- name: Check if Clang 12 is on board
# run: which clang-12
- name: Check our path
run: pwd
#- name: Extracting llc's host target
# run: llc-12 --version | grep CPU
#- name: Compile test tool, for retrieveing CPU features
# run: clang-12 -I/usr/lib/llvm-12/include/ -I/usr/lib/llvm-12/include/llvm-c -L/usr/lib/llvm-12/lib -lLLVM-12 -lstdc++ $GITHUB_WORKSPACE/gollvm_build_process/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/gollvm_build_process && git clone -b llvm-for-gollvm https://github.com/plctlab/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/gollvm_build_process && mkdir build_min && cd build_min && cmake -DCMAKE_BUILD_TYPE=MinSizeRel -DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_C_COMPILER=clang-12 -DCMAKE_CXX_COMPILER=clang++-12 -G Ninja ../llvm-project/llvm && ninja -j16 gollvm && ninja GoBackendCoreTests && ./tools/gollvm/unittests/BackendCore/GoBackendCoreTests
#Getting back to LLVM project