Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/isa-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,34 @@ jobs:
- name: Get current date
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV

# Cache the Docker image to avoid a full pull on every run.
- name: Cache Docker image
id: docker-cache
uses: actions/cache@v4
with:
path: /tmp/riscv-docs-image.tar
key: docker-${{ hashFiles('.github/workflows/isa-build.yml') }}

- name: Load or pull Docker image
run: |
if [ -f /tmp/riscv-docs-image.tar ]; then
docker load < /tmp/riscv-docs-image.tar
else
docker pull ghcr.io/riscv/riscv-docs-base-container-image:latest
docker save ghcr.io/riscv/riscv-docs-base-container-image:latest > /tmp/riscv-docs-image.tar
fi

# Build PDF and HTML ISA manual versions and normative rule files using the container
- name: Build Files
id: build_files
run: make -j$(nproc)

# Check cross-references (removed from default build target to avoid a
# redundant full HTML pass locally, but kept here for CI validation).
- name: Check cross-references
if: steps.build_files.outcome == 'success'
run: make check-xrefs

# Upload the riscv-spec PDF file
- name: Upload riscv-spec.pdf
if: steps.build_files.outcome == 'success'
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ endif
RELEASE_DESCRIPTION_HTML := $(RELEASE_DESCRIPTION). © RISC-V International, $(YEAR).

DOCKER_BIN ?= docker
DOCKER_INTERACTIVE=$(shell [ -t 0 ] && echo "-it --init")
DOCKER_INTERACTIVE=--init $(shell [ -t 0 ] && echo "-t")
SKIP_DOCKER ?= $(shell if command -v ${DOCKER_BIN} >/dev/null 2>&1 ; then echo false; else echo true; fi)
DOCKER_IMG := ghcr.io/riscv/riscv-docs-base-container-image:latest
ifneq ($(SKIP_DOCKER),true)
Expand Down Expand Up @@ -173,7 +173,7 @@ update-ref: $(DOCS_NORM_TAGS)
build-norm-rules-json: $(NORM_RULES_JSON)
build-norm-rules-html: $(NORM_RULES_HTML)
build-norm-rules: build-norm-rules-json build-norm-rules-html check-tags
build: build-pdf build-html build-epub build-tags build-norm-rules-json build-norm-rules-html check-xrefs
build: build-pdf build-html build-epub build-tags build-norm-rules-json build-norm-rules-html

ALL_SRCS := $(shell git ls-files $(SRC_DIR))

Expand Down
Loading