Skip to content

Commit

Permalink
fix compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolae-Andrei Cociorba committed Jun 1, 2024
1 parent 003c001 commit 22d3f9c
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@ jobs:
matrix:
os: [ubuntu-latest]
build_type: [Release]
c_compiler: [clang]
include:
- os: ubuntu-latest
c_compiler: clang
cpp_compiler: clang++
c_compiler: /usr/bin/clang-18
cpp_compiler: /usr/bin/clang++-18

steps:
- uses: actions/checkout@v4
Expand All @@ -40,10 +39,18 @@ jobs:
sudo apt-get install -y wget lsb-release software-properties-common
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 16
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-16 90
sudo ./llvm.sh 18
git clone --depth=1 https://github.com/llvm/llvm-project.git
cd llvm-project
git fetch --unshallow
mkdir build
cd build
cmake -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" ../llvm
make -j24
make install
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-18 90
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-18 90
- name: Set reusable strings
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
id: strings
Expand Down

0 comments on commit 22d3f9c

Please sign in to comment.