Switch to cmake cppfront delivery #44
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
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CLANG_VERSION: 18 | |
CXX: clang++-18 | |
CC: clang-18 | |
CXXFLAGS: "-stdlib=libc++ -I/usr/include/c++/v1" | |
LDFLAGS: "-L/usr/lib" | |
jobs: | |
build: | |
timeout-minutes: 30 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Clang | |
run: | | |
wget https://apt.llvm.org/llvm.sh | |
chmod +x llvm.sh | |
sudo ./llvm.sh ${{ env.CLANG_VERSION }} all | |
- name: Install libc++ and libc++abi | |
run: sudo apt install -y libc++-dev libc++abi-dev | |
- name: Install clang-tools | |
run: sudo apt install -y clang-tools-${{ env.CLANG_VERSION }} | |
- name: Update alternatives | |
run: | | |
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-${{ env.CLANG_VERSION }} 100 | |
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-${{ env.CLANG_VERSION }} 100 | |
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${{ env.CLANG_VERSION }} 100 | |
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${{ env.CLANG_VERSION }} 100 | |
- name: Install latest cmake and ninja | |
uses: lukka/get-cmake@latest | |
- name: Install Conan package manager | |
uses: turtlebrowser/get-conan@main | |
with: | |
version: 2.5.0 | |
- name: Print versions | |
run: | | |
c++ --version | |
cmake --version | |
ninja --version | |
conan --version | |
- name: Create default Conan profile | |
run: conan profile detect | |
- name: Replace default Conan profile | |
run: cp conan_profile/default ~/.conan2/profiles/default | |
- name: Install | |
run: ./project.py --install | |
- name: Build | |
run: ./project.py --build | |
- name: Run | |
run: ./project.py --run |