Skip to content

Commit 7be4248

Browse files
authored
Add regression test action (#2)
Add regression to build html documentation Signed-off-by: dhower-qc <[email protected]>
1 parent 04c6e42 commit 7be4248

File tree

4 files changed

+22
-5
lines changed

4 files changed

+22
-5
lines changed

.github/workflows/regress.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,24 @@ jobs:
1212
uses: actions/checkout@v4
1313
- name: Setup apptainer
1414
uses: eWaterCycle/[email protected]
15+
- name: Get container from cache
16+
id: cache-sif
17+
uses: actions/cache@v3
18+
with:
19+
path: .singularity/image.sif
20+
key: ${{ hashFiles('container.def') }}
21+
- name: Get gems and node files from cache
22+
id: cache-bundle-npm
23+
uses: actions/cache@v3
24+
with:
25+
path: |
26+
.home/.gems
27+
node_modules
28+
key: ${{ hashFiles('Gemfile.lock') }}-${{ hashFiles('package-lock.json') }}
29+
- if: ${{ steps.cache-sif.outputs.cache-hit != 'true' }}
30+
name: Build container
31+
run: ./bin/build_container
1532
- name: Setup project
16-
run: apptainer run --home ${{ github.workspace }}/.home oras://docker.io/riscvintl/spec-generator:0.1 ./bin/setup
33+
run: ./bin/setup
1734
- name: Build html documentation for generic_rv64
18-
run: apptainer run --home ${{ github.workspace }}/.home oras://docker.io/riscvintl/spec-generator:0.1 bundle exec rake gen:html[generic_rv64]
35+
run: ./do gen:html[generic_rv64]

bin/build_container

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if [ $NEED_SUDO -eq 0 ]; then
1818
FAKEROOT=--fakeroot
1919
echo "Using fakeroot"
2020
else
21-
if [[ `groups` == *"sudo"* ]]; then
21+
if [[ ! -z "$GITHUB_RUN_ID" || `groups` == *"sudo"* ]]; then
2222
# user has sudo permission
2323
SUDO=sudo
2424
FAKEROOT=""

bin/setup

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ if [ ! -d $ROOT/.home/.gems ]; then
3434
fi
3535

3636
if [ ! -f $ROOT/ext/riscv-opcodes/README.md ]; then
37-
git submodule init --update ext/riscv-opcodes
37+
git submodule update --init ext/riscv-opcodes
3838
fi
3939

4040
if [[ ! -z "$DEVELOPMENT" && $DEVELOPMENT -eq 1 ]]; then

cfgs/generic_rv64/arch_overlay/csr/marchid.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
marchid:
44
fields:
55
Architecture:
6-
description: My custom description.
6+
description: Custom overlay description

0 commit comments

Comments
 (0)