Skip to content

Commit

Permalink
ci: add ci test for run ACT on sail and Spike (#468)
Browse files Browse the repository at this point in the history
Signed-off-by: Qinghao Shi <shiqinghao.sqh@alibaba-inc.com>
  • Loading branch information
jamesbeyond committed Jun 9, 2024
1 parent ff31610 commit 7152865
Show file tree
Hide file tree
Showing 7 changed files with 183 additions and 21 deletions.
29 changes: 29 additions & 0 deletions .github/isa_templates/RV32IFZicsr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
hart_ids: [0]
hart0:
ISA: RV32IFZicsr
physical_addr_sz: 32
User_Spec_Version: '2.3'
supported_xlen: [32]
misa:
reset-val: 0x40000120
rv32:
accessible: true
mxl:
implemented: true
type:
warl:
dependency_fields: []
legal:
- mxl[1:0] in [0x1]
wr_illegal:
- Unchanged
extensions:
implemented: true
type:
warl:
dependency_fields: []
legal:
- extensions[25:0] bitmask [0x0000120, 0x0000000]
wr_illegal:
- Unchanged

29 changes: 29 additions & 0 deletions .github/isa_templates/RV32IMCZicsr_Zifencei.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
hart_ids: [0]
hart0:
ISA: RV32IMCZicsr_Zifencei
physical_addr_sz: 32
User_Spec_Version: '2.3'
supported_xlen: [32]
misa:
reset-val: 0x40001104
rv32:
accessible: true
mxl:
implemented: true
type:
warl:
dependency_fields: []
legal:
- mxl[1:0] in [0x1]
wr_illegal:
- Unchanged
extensions:
implemented: true
type:
warl:
dependency_fields: []
legal:
- extensions[25:0] bitmask [0x0001104, 0x0000000]
wr_illegal:
- Unchanged

29 changes: 29 additions & 0 deletions .github/isa_templates/RV32IZba_Zbb_Zbc_Zbs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
hart_ids: [0]
hart0:
ISA: RV32IZba_Zbb_Zbc_Zbs
physical_addr_sz: 32
User_Spec_Version: '2.3'
supported_xlen: [32]
misa:
reset-val: 0x40000100
rv32:
accessible: true
mxl:
implemented: true
type:
warl:
dependency_fields: []
legal:
- mxl[1:0] in [0x1]
wr_illegal:
- Unchanged
extensions:
implemented: true
type:
warl:
dependency_fields: []
legal:
- extensions[25:0] bitmask [0x0000100, 0x0000000]
wr_illegal:
- Unchanged

29 changes: 29 additions & 0 deletions .github/isa_templates/RV64IFZicsr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
hart_ids: [0]
hart0:
ISA: RV64IFZicsr
physical_addr_sz: 32
User_Spec_Version: '2.3'
supported_xlen: [64]
misa:
reset-val: 0x8000000000000120
rv64:
accessible: true
mxl:
implemented: true
type:
warl:
dependency_fields: []
legal:
- mxl[1:0] in [0x2]
wr_illegal:
- Unchanged
extensions:
implemented: true
type:
warl:
dependency_fields: []
legal:
- extensions[25:0] bitmask [0x0000120, 0x0000000]
wr_illegal:
- Unchanged

29 changes: 29 additions & 0 deletions .github/isa_templates/RV64IMCZicsr_Zifencei.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
hart_ids: [0]
hart0:
ISA: RV64IMCZicsr_Zifencei
physical_addr_sz: 32
User_Spec_Version: '2.3'
supported_xlen: [64]
misa:
reset-val: 0x8000000000001104
rv64:
accessible: true
mxl:
implemented: true
type:
warl:
dependency_fields: []
legal:
- mxl[1:0] in [0x2]
wr_illegal:
- Unchanged
extensions:
implemented: true
type:
warl:
dependency_fields: []
legal:
- extensions[25:0] bitmask [0x0001104, 0x0000000]
wr_illegal:
- Unchanged

Empty file.
59 changes: 38 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,52 @@
# This is a basic workflow to help you get started with Actions

name: test
name: CI test

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch

# Triggers the workflow on pull request events but only for the main & dev branch
pull_request:
branches: [ main ]
branches: [ main , dev ]

# Triggers the workflow on push events
push:
branches: [ main , dev ]

# Allows you to run this workflow manually from the Actions tab
# Allows you to run this workflow Actions manually
workflow_dispatch:

# Triggers the action 2am every day
schedule:
- cron: "0 2 * * *"


# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
check-version:

ACT-sail-spike:
runs-on: ubuntu-latest
container: ghcr.io/riscv-software-src/riscof/act:latest
strategy:
fail-fast: false
matrix:
isa_group:
- RV32IMCZicsr_Zifencei
- RV64IMCZicsr_Zifencei


steps:
- uses: actions/checkout@v2

- uses: actions-ecosystem/action-get-latest-tag@v1
id: get-latest-tag

- name: version check

- name: Checkout source
uses: actions/checkout@v4

- name: Config riscof
run: |
git config --global --add safe.directory '*'
riscof setup --dutname=spike
cp .github/isa_templates/${{ matrix.isa_group }}.yaml spike/spike_isa.yaml
- name: Run riscof
run: |
export CHNGVER=$(grep -P -o '(?<=## \[).*(?=\])' -m1 CHANGELOG.md);
echo "CHANGELOG VERSION: $CHNGVER"
export TAGVER=${{ steps.get-latest-tag.outputs.tag }};
echo "TAG VERSION: $TAGVER"
if [ "$CHNGVER" = "$TAGVER" ]; then
echo "No changelog update."
exit 1
else
echo "Changelog updated."
fi
riscof --verbose debug run --suite . --env ./riscv-test-suite/env

0 comments on commit 7152865

Please sign in to comment.