Merge pull request #28 from Minres/feature/better_mstatus #35
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: CI C++ Std compliance | |
| on: | |
| push: | |
| paths: | |
| - '**.hpp' | |
| - '**.cpp' | |
| - '**.h' | |
| - '**.c' | |
| - '**CMakeLists.txt' | |
| - '.github/workflows/**' | |
| - 'conanfile.py' | |
| pull_request: | |
| paths: | |
| - '**.hpp' | |
| - '**.cpp' | |
| - '**.h' | |
| - '**.c' | |
| - '**CMakeLists.txt' | |
| - '.github/workflows/**' | |
| - 'conanfile.py' | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| cpp_std: [17, 20] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Update submodules | |
| run: git submodule update --init --recursive | |
| - name: Cache Conan | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.conan2 | |
| key: conan-${{ runner.os }}-unit-cpp${{ matrix.cpp_std }}-${{ hashFiles('conanfile.py') }} | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y g++ python3-pip cmake | |
| pip3 install conan | |
| cmake --version | |
| - name: Configure | |
| run: WITH_LLVM=1 cmake --preset Release -B build -DCMAKE_CXX_STANDARD=${{ matrix.cpp_std }} -DWITH_LLVM=ON | |
| - name: Build | |
| run: WITH_LLVM=1 cmake --build build -j | |
| - name: Run smoke test | |
| run: ./build/riscv-sim -h |