Add a workflow compiling Marian using clang-14 (#940)

* Add a cpu-only compilation using clang-14
* Always install gcc/g++
* Use ubuntu-20.04 image
* Define clang variable in all jobs
This commit is contained in:
Roman Grundkiewicz 2022-09-02 07:19:33 +01:00 committed by GitHub
parent e27da62393
commit f9a1ed10ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,6 +16,17 @@ jobs:
os: ubuntu-18.04
cuda: ""
gcc: 7
clang: ""
cpu: true
gpu: false
unit_tests: true
examples: false
# Using Clang compiler
- name: "Ubuntu CPU-only clang-12"
os: ubuntu-20.04
cuda: ""
gcc: ""
clang: 12
cpu: true
gpu: false
unit_tests: true
@ -25,6 +36,7 @@ jobs:
os: ubuntu-18.04
cuda: "10.2"
gcc: 7
clang: ""
cpu: false
gpu: true
unit_tests: false
@ -35,6 +47,7 @@ jobs:
os: ubuntu-20.04
cuda: "11.2"
gcc: 9
clang: ""
cpu: false
gpu: true
unit_tests: false
@ -45,6 +58,7 @@ jobs:
os: ubuntu-18.04
cuda: "10.2"
gcc: 8
clang: ""
cpu: true
gpu: true
unit_tests: false
@ -64,10 +78,11 @@ jobs:
# The following packages are already installed on GitHub-hosted runners: build-essential openssl libssl-dev
# No need to install libprotobuf{17,10,9v5} on Ubuntu {20,18,16}.04 because it is installed together with libprotobuf-dev
# Boost is no longer pre-installed on GitHub-hosted runners
# Clang 12.0 is pre-installed on the ubuntu-20.04 image
- name: Install dependencies
run: |
sudo apt-get install -y libgoogle-perftools-dev libprotobuf-dev protobuf-compiler libboost-system-dev \
gcc-${{ matrix.gcc }} g++-${{ matrix.gcc }}
sudo apt-get install -y libgoogle-perftools-dev libprotobuf-dev protobuf-compiler libboost-system-dev
[ -z "${{ matrix.gcc }}" ] || sudo apt-get install -y gcc-${{ matrix.gcc }} g++-${{ matrix.gcc }}
# https://software.intel.com/content/www/us/en/develop/articles/installing-intel-free-libs-and-python-apt-repo.html
- name: Install MKL
@ -86,9 +101,10 @@ jobs:
# https://github.com/actions/virtual-environments/issues/687#issuecomment-610471671
- name: Configure CMake
run: |
[ -z "${{ matrix.gcc }}" ] || export CC=/usr/bin/gcc-${{ matrix.gcc }} CXX=/usr/bin/g++-${{ matrix.gcc }} CUDAHOSTCXX=/usr/bin/g++-${{ matrix.gcc }}
[ -z "${{ matrix.clang }}" ] || export CC=/usr/bin/clang-${{ matrix.clang }} CXX=/usr/bin/clang++-${{ matrix.clang }}
mkdir -p build
cd build
CC=/usr/bin/gcc-${{ matrix.gcc }} CXX=/usr/bin/g++-${{ matrix.gcc }} CUDAHOSTCXX=/usr/bin/g++-${{ matrix.gcc }} \
cmake .. \
-DBoost_ARCHITECTURE=-x64 \
-DCMAKE_BUILD_TYPE=Release \