Merge pull request #98 from zaskar9/llvm-22 #71
This file contains hidden or 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: Ubuntu Linux (x64) | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| env: | |
| build_type: Release | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| cc: [gcc, clang] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install package dependencies | |
| run: | | |
| sudo apt-get update && | |
| sudo apt-get install ninja-build libboost-all-dev python3-pip | |
| - name: Install LLVM 17 | |
| run: | | |
| wget https://apt.llvm.org/llvm.sh | |
| chmod +x ./llvm.sh | |
| sudo ./llvm.sh 17 all | |
| - name: Install Python dependencies | |
| run: | | |
| sudo pip3 install lit | |
| sudo pip3 install filecheck | |
| sudo pip3 install sphinx | |
| sudo pip3 install sphinx_rtd_theme | |
| - name: Configure CMake | |
| run: | | |
| if ["$MATRIX_CC" == "gcc"] | |
| then | |
| cmake -B ${{ github.workspace }}/build -S ${{ github.workspace }} -G "Ninja" -DCMAKE_BUILD_TYPE=${{ env.build_type }} -DLLVM_ROOT=/usr/lib/llvm-17 -DBoost_NO_BOOST_CMAKE=ON | |
| else | |
| cmake -B ${{ github.workspace }}/build -S ${{ github.workspace }} -G "Ninja" -DCMAKE_BUILD_TYPE=${{ env.build_type }} -DLLVM_ROOT=/usr/lib/llvm-17 -DBoost_NO_BOOST_CMAKE=ON -DCMAKE_CXX_COMPILER=clang++-17 -DCMAKE_C_COMPILER=clang-17 | |
| fi | |
| - name: Build compiler | |
| run: cmake --build ${{ github.workspace }}/build --parallel | |
| - name: Build documentation | |
| run: cmake --build ${{ github.workspace }}/build --target docs | |
| - name: Install compiler | |
| run: cmake --install ${{ github.workspace }}/build --prefix install | |
| - name: Run unit tests | |
| run: cmake --build ${{ github.workspace }}/build --target test | tee ${{ github.workspace }}/build/test_report_linux_${{ matrix.cc }}.txt | |
| - name: Upload build | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: binary-linux-${{ matrix.cc }}-release | |
| path: ${{ github.workspace }}/install/**/* | |
| - name: Upload report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test_report_linux_${{ matrix.cc }}.txt | |
| path: ${{ github.workspace }}/build/test_report_linux_${{ matrix.cc }}.txt | |