diff --git a/.github/workflows/regress.yml b/.github/workflows/regress.yml index b34a18dc4..fb132d4b2 100644 --- a/.github/workflows/regress.yml +++ b/.github/workflows/regress.yml @@ -12,7 +12,24 @@ jobs: uses: actions/checkout@v4 - name: Setup apptainer uses: eWaterCycle/setup-apptainer@v2.0.0 + - name: Get container from cache + id: cache-sif + uses: actions/cache@v3 + with: + path: .singularity/image.sif + key: ${{ hashFiles('container.def') }} + - name: Get gems and node files from cache + id: cache-bundle-npm + uses: actions/cache@v3 + with: + path: | + .home/.gems + node_modules + key: ${{ hashFiles('Gemfile.lock') }}-${{ hashFiles('package-lock.json') }} + - if: ${{ steps.cache-sif.outputs.cache-hit != 'true' }} + name: Build container + run: ./bin/build_container - name: Setup project - run: apptainer run --home ${{ github.workspace }}/.home oras://docker.io/riscvintl/spec-generator:0.1 ./bin/setup + run: ./bin/setup - name: Build html documentation for generic_rv64 - run: apptainer run --home ${{ github.workspace }}/.home oras://docker.io/riscvintl/spec-generator:0.1 bundle exec rake gen:html[generic_rv64] + run: ./do gen:html[generic_rv64] diff --git a/bin/build_container b/bin/build_container index 6eb1666f5..6a0e01a88 100755 --- a/bin/build_container +++ b/bin/build_container @@ -18,7 +18,7 @@ if [ $NEED_SUDO -eq 0 ]; then FAKEROOT=--fakeroot echo "Using fakeroot" else - if [[ `groups` == *"sudo"* ]]; then + if [[ ! -z "$GITHUB_RUN_ID" || `groups` == *"sudo"* ]]; then # user has sudo permission SUDO=sudo FAKEROOT="" diff --git a/bin/setup b/bin/setup index f93ec0208..0233477ad 100755 --- a/bin/setup +++ b/bin/setup @@ -34,7 +34,7 @@ if [ ! -d $ROOT/.home/.gems ]; then fi if [ ! -f $ROOT/ext/riscv-opcodes/README.md ]; then - git submodule init --update ext/riscv-opcodes + git submodule update --init ext/riscv-opcodes fi if [[ ! -z "$DEVELOPMENT" && $DEVELOPMENT -eq 1 ]]; then diff --git a/cfgs/generic_rv64/arch_overlay/csr/marchid.yaml b/cfgs/generic_rv64/arch_overlay/csr/marchid.yaml index 84fb5b06e..4d531edde 100644 --- a/cfgs/generic_rv64/arch_overlay/csr/marchid.yaml +++ b/cfgs/generic_rv64/arch_overlay/csr/marchid.yaml @@ -3,4 +3,4 @@ marchid: fields: Architecture: - description: My custom description. + description: Custom overlay description