update to gcc 12 #135
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: push | |
jobs: | |
build: | |
strategy: | |
matrix: | |
platform: [ubuntu-latest, windows-latest, macos-latest] | |
compiler: [msvc, gcc, llvm] | |
exclude: | |
- platform: windows-latest | |
compiler: gcc | |
- platform: windows-latest | |
compiler: llvm | |
- platform: ubuntu-latest | |
compiler: msvc | |
- platform: macos-latest | |
compiler: msvc | |
- platform: macos-latest | |
compiler: gcc | |
runs-on: ${{matrix.platform}} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: "true" | |
- uses: lukka/get-cmake@latest | |
- name: Run vcpkg | |
uses: lukka/run-vcpkg@v10 | |
- name: Update gcc | |
run: | | |
sudo apt update | |
sudo apt install gcc-12 g++-12 | |
echo "CC=gcc-12" >> $GITHUB_ENV | |
echo "CXX=g++-12" >> $GITHUB_ENV | |
shell: bash | |
if: matrix.platform == 'ubuntu-latest' | |
- name: Set llvm (Ubuntu) | |
run: | | |
wget https://apt.llvm.org/llvm.sh | |
chmod +x llvm.sh | |
sudo ./llvm.sh 16 | |
sudo apt install libc++-16-dev | |
echo "CC=clang-16" >> $GITHUB_ENV | |
echo "CXX=clang++-16" >> $GITHUB_ENV | |
shell: bash | |
if: matrix.platform == 'ubuntu-latest' && matrix.compiler == 'llvm' | |
- name: Set llvm (MacOS) | |
run: | | |
brew update | |
# Temporary fix, see https://github.com/actions/setup-python/issues/577 | |
rm /usr/local/bin/2to3 || true | |
rm /usr/local/bin/idle3 || true | |
rm /usr/local/bin/pydoc3 || true | |
rm /usr/local/bin/python3 || true | |
rm /usr/local/bin/python3-config || true | |
brew install llvm | |
echo "CC=/usr/local/opt/llvm/bin/clang" >> $GITHUB_ENV | |
echo "CXX=/usr/local/opt/llvm/bin/clang++" >> $GITHUB_ENV | |
echo "LDFLAGS=-L/usr/local/opt/llvm/lib" >> $GITHUB_ENV | |
echo "CXXFLAGS=-isystem /usr/local/opt/llvm/include" >> $GITHUB_ENV | |
shell: bash | |
if: matrix.platform == 'macos-latest' | |
- name: Run cmake | |
uses: lukka/run-cmake@v10 | |
with: | |
configurePreset: "default" | |
buildPreset: "release" |