From cf52850f0ffcdca029699180f3efefea300f5acc Mon Sep 17 00:00:00 2001 From: Yang Liu Date: Fri, 11 Aug 2023 20:12:01 +0000 Subject: [PATCH] Added untested CI --- .github/workflows/build-and-test.yml | 45 ++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/build-and-test.yml diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml new file mode 100644 index 0000000..bbe1502 --- /dev/null +++ b/.github/workflows/build-and-test.yml @@ -0,0 +1,45 @@ +name: Build and Test + +on: + push: + branches: + - main + + pull_request: + types: [opened, reopened, synchronize, ready_for_review] + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: true + + - uses: actions/setup-go@v4 + + - name: Install Toolchain + run: | + mkdir -p build/ + cd build + wget -O- -q https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2023.07.07/riscv64-elf-ubuntu-22.04-gcc-nightly-2023.07.07-nightly.tar.gz | tar -xzf - + + - name: Build Spike + run: | + sudo apt-get install device-tree-compiler + cd build + git clone --depth=1 https://github.com/riscv-software-src/riscv-isa-sim.git + cd riscv-isa-sim + mkdir build + cd build + ../configure --prefix=${{ github.workspace }}/build/riscv + make + sudo make install + + - name: Build and Test + run: | + export PATH="${{ github.workspace }}/build/riscv/bin:$PATH" + export RISCV="${{ github.workspace }}/build/riscv" + make -j4 + +