aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2023-02-17 09:32:06 -0800
committerTim Newsome <tim@sifive.com>2023-02-17 12:50:05 -0800
commit13b0afaf820fa5de0e603c6a65a3884bb01b4c57 (patch)
treee4bcc1d824b36e2ecd59e9ffa35a928facc8367e /.github
parent87f9e590b9d93d1be8f315ef1ab008b94a4e2098 (diff)
downloadriscv-openocd-13b0afaf820fa5de0e603c6a65a3884bb01b4c57.zip
riscv-openocd-13b0afaf820fa5de0e603c6a65a3884bb01b4c57.tar.gz
riscv-openocd-13b0afaf820fa5de0e603c6a65a3884bb01b4c57.tar.bz2
Smoke test OpenOCD against spike.
Choosing to grab the latest version of each component. I'd rather deal with the rare failure that causes, than realize that we've been testing against really old stuff. Change-Id: I17321d70e2b54086e8f3fbb01744746633d7a119 Signed-off-by: Tim Newsome <tim@sifive.com>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/spike-openocd-tests.yml76
1 files changed, 76 insertions, 0 deletions
diff --git a/.github/workflows/spike-openocd-tests.yml b/.github/workflows/spike-openocd-tests.yml
new file mode 100644
index 0000000..0f2bca3
--- /dev/null
+++ b/.github/workflows/spike-openocd-tests.yml
@@ -0,0 +1,76 @@
+# Build spike and run a couple of debug tests.
+
+name: Test OpenOCD against 2 spike configurations
+
+on: pull_request
+
+# There is some commented out code below that would be useful in adding this
+# workflow to other repos. Ideally we can come up with something that would
+# leave this file almost identical between repos, so they can all easily run
+# this test suite.
+
+jobs:
+ test:
+ name: Test debug (Ubuntu)
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Install Dependencies
+ run: |
+ sudo apt install build-essential device-tree-compiler
+
+# - name: Download OpenOCD
+# run: |
+# git clone --recurse-submodules https://github.com/riscv/riscv-openocd.git
+# cd riscv-openocd
+# git checkout 43ea20dfbb6c815004a51106a3b2009d7f6c4940
+
+ - name: Build OpenOCD
+ run: |
+ #cd riscv-openocd
+ ./bootstrap
+ ./configure
+ make -j"$(nproc 2> /dev/null || sysctl -n hw.ncpu)"
+ ls -l src/openocd
+
+ - name: Download Toolchain
+ run: wget --progress=dot:giga https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v12.2.0-1/xpack-riscv-none-elf-gcc-12.2.0-1-linux-x64.tar.gz
+
+ - name: Install Toolchain
+ run: tar zxf xpack-riscv-none-elf-gcc-12.2.0-1-linux-x64.tar.gz
+
+ - name: Download spike
+ run: |
+ git clone --recurse-submodules https://github.com/riscv-software-src/riscv-isa-sim
+ #cd riscv-isa-sim
+ #git checkout 43ea20dfbb6c815004a51106a3b2009d7f6c4940
+
+ - name: Build Spike
+ run: |
+ cd riscv-isa-sim
+ mkdir build install
+ cd build
+ ../configure --prefix=`pwd`/install
+ make -j"$(nproc 2> /dev/null || sysctl -n hw.ncpu)"
+ make install
+
+ - name: Download Tests
+ run: |
+ git clone --recurse-submodules https://github.com/riscv-software-src/riscv-tests.git
+ #cd riscv-tests
+ #git checkout c84daca8824635b7d896003c78f9c6245997cf7a
+
+ - name: Run Tests
+ run: |
+ cd riscv-tests/debug
+ ./gdbserver.py targets/RISC-V/spike32.py --print-failures \
+ --gcc $GITHUB_WORKSPACE/xpack-riscv-none-elf-gcc-12.2.0-1/bin/riscv-none-elf-gcc \
+ --gdb $GITHUB_WORKSPACE/xpack-riscv-none-elf-gcc-12.2.0-1/bin/riscv-none-elf-gdb \
+ --sim_cmd $GITHUB_WORKSPACE/riscv-isa-sim/build/install/bin/spike \
+ --server_cmd $GITHUB_WORKSPACE/src/openocd
+ ./gdbserver.py targets/RISC-V/spike64-2.py --print-failures \
+ --gcc $GITHUB_WORKSPACE/xpack-riscv-none-elf-gcc-12.2.0-1/bin/riscv-none-elf-gcc \
+ --gdb $GITHUB_WORKSPACE/xpack-riscv-none-elf-gcc-12.2.0-1/bin/riscv-none-elf-gdb \
+ --sim_cmd $GITHUB_WORKSPACE/riscv-isa-sim/build/install/bin/spike \
+ --server_cmd $GITHUB_WORKSPACE/src/openocd