Merge pull request #56 from ucb-bar/trace-hello #105
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: C/C++ CI | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| # Do not ignore bash profile files. From: | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set up toolchain | |
| run: | | |
| wget https://github.com/ucb-bar/RISC-V-Ready-To-Run/releases/download/v2024.06.04/riscv64-unknown-toolchain.tar.xz | |
| tar -xf riscv64-unknown-toolchain.tar.xz | |
| - name: Make default | |
| run: | | |
| rm -rf ./build/ | |
| export RISCV="$GITHUB_WORKSPACE/riscv64-unknown-toolchain" | |
| export PATH="$RISCV/bin:$PATH" | |
| cmake -S ./ -B ./build/ -D CMAKE_BUILD_TYPE=Debug -D CMAKE_TOOLCHAIN_FILE=./riscv-gcc.cmake | |
| cmake --build ./build/ --target app | |
| - name: Make for BearlyML | |
| run: | | |
| rm -rf ./build/ | |
| export RISCV="$GITHUB_WORKSPACE/riscv64-unknown-toolchain" | |
| export PATH="$RISCV/bin:$PATH" | |
| cmake -S ./ -B ./build/ -D CMAKE_BUILD_TYPE=Debug -D CMAKE_TOOLCHAIN_FILE=./riscv-gcc.cmake -D CHIP=bearlyml | |
| cmake --build ./build/ --target app | |