From 7b3881a9712bcb7bfea90614a44888ae5df6e849 Mon Sep 17 00:00:00 2001 From: xinyangli Date: Wed, 14 Aug 2024 15:29:58 +0800 Subject: [PATCH] ci: build nix packages --- .gdbinit | 8 ++++++++ .gitea/workflows/build.yml | 20 ++++++++++++++++++++ difftest.toml | 15 +++++++++------ 3 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 .gdbinit create mode 100644 .gitea/workflows/build.yml diff --git a/.gdbinit b/.gdbinit new file mode 100644 index 0000000..c1022cc --- /dev/null +++ b/.gdbinit @@ -0,0 +1,8 @@ +file /nix/store/ijxm784gr0sx5p4d92rlag0ippyd0mvm-am-kernel-riscv32-none-elf-2024-07-10/libexec/am-kernels/bench + +set substitute-path /build/am-kernels /home/xin/repo/ysyx-workbench/am-kernels +set substitute-path /build/abstract-machine /home/xin/repo/ysyx-workbench/abstract-machine +# set debug remote 1 +target remote /tmp/gdbstub-diffu.sock +break *halt + 24 + diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..80bedb4 --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,20 @@ +name: Build nix packages +on: [push] + +jobs: + build-matrix: + runs-on: nix + strategy: + matrix: + package: [ "default" ] + steps: + - uses: https://github.com/cachix/cachix-action@v14 + with: + name: ysyx + authToken: '${{ secrets.CACHIX_SIGNING_KEY }}' + + - uses: actions/checkout@v4 + + - name: Build + run: | + nix build -L .#${{ matrix.package }} diff --git a/difftest.toml b/difftest.toml index 9d9bad8..3fdac6d 100644 --- a/difftest.toml +++ b/difftest.toml @@ -1,14 +1,17 @@ # ref = "/home/xin/repo/spike-diff/build/lib/libspike-diff.so" # ref-prefix = "spike_" +ref= "/home/xin/repo/ysyx-workbench/nemu/build/riscv32-nemu-interpreter-so" +ref-prefix = "nemu_" # dut = "/home/xin/repo/ysyx-workbench/nemu/build/riscv32-nemu-interpreter-so" # dut-prefix = "nemu_" -ref = /home/xin/repo/ysyx-workbench/nemu/build/riscv32-nemu-interpreter-so -ref-prefix = nemu_ -dut = "/home/xin/repo/spike-diff/build/lib/libspike-diff.so" -dut-prefix = "spike_" +dut = "/home/xin/repo/ysyx-workbench/npc/build/csrc/Flow/libFlow.so" +dut-prefix = "npc_" + +# dut = "/home/xin/repo/ysyx-workbench/nemu/build/riscv32-nemu-interpreter-so" +# dut-prefix = "nemu_" listen = "/tmp/gdbstub-diffu.sock" # listen = "127.0.0.1:1234" -# memory = "/nix/store/37986mdgsqm5m8w74k0f5llzqhxgsbnv-am-kernel-riscv32-none-elf-2024-07-10/share/am-kernels/string.bin" -memory = "./add.bin" +images-path = "/nix/store/z7mc0y608145cfwlb2g1gsii7bij7li1-am-kernel-riscv32-none-elf-2024-07-10/share/am-kernels" +memory = "bench.bin" # g = true