From f2fa38009d1bfb5cc2b533d461fc7487253e6bcf Mon Sep 17 00:00:00 2001 From: Rodolfo Wottrich Date: Fri, 17 Jul 2026 16:56:27 +0100 Subject: [PATCH 1/5] QoL changes to build and serve HTML pages - Remove ./tmp after using (caused a huse slowdown in builds). - Do not rebuild docker image if it exists. - Add timing info on processing each markdown file. --- .gitignore | 1 + build_with_docker.sh | 1 + tools/build-github-pages.sh | 20 +++++++++--- tools/generate-pdfs.sh | 1 + tools/jekyll-page-timing.rb | 64 +++++++++++++++++++++++++++++++++++++ 5 files changed, 83 insertions(+), 4 deletions(-) create mode 100644 tools/jekyll-page-timing.rb diff --git a/.gitignore b/.gitignore index 271193c4..6ac289d6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +_site tmp pdfs tex2pdf* diff --git a/build_with_docker.sh b/build_with_docker.sh index 713b7ca2..d37453e8 100755 --- a/build_with_docker.sh +++ b/build_with_docker.sh @@ -10,3 +10,4 @@ docker build -t $IMAGE_NAME tools/docker # Run the image, mounting the current folder into the /src folder of # the docker image. Run as the host user so that the output files are owned by them. docker run --rm -u $(id -u):$(id -g) --mount type=bind,source="$(pwd)",target=/src $IMAGE_NAME +rm -rf ./tmp diff --git a/tools/build-github-pages.sh b/tools/build-github-pages.sh index c2800283..26d9d143 100755 --- a/tools/build-github-pages.sh +++ b/tools/build-github-pages.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# SPDX-FileCopyrightText: Copyright 2023 Arm Limited and/or its affiliates +# SPDX-FileCopyrightText: Copyright 2023, 2026 Arm Limited and/or its affiliates # SPDX-License-Identifier: Apache-2.0 ########################### BUILD GITHUB PAGES ################################ @@ -36,7 +36,8 @@ TEMPDIR=$(mktemp -d) cd $TEMPDIR git clone --depth 1 https://github.com/github/pages-gem.git cd pages-gem -docker build -t gh-pages --build-arg RUBY_VERSION=3.2 . +docker image inspect gh-pages >/dev/null 2>&1 || \ + docker build -t gh-pages --build-arg RUBY_VERSION=3.2 . cd $ROOTDIR echo -e "plugins:\n \ - jekyll-coffeescript\n \ @@ -50,11 +51,22 @@ echo -e "plugins:\n \ - jekyll-relative-links\n" >> _config.yml cd $TEMPDIR/pages-gem +docker_run_params="--rm \ + -u "$(id -u):$(id -g)" \ + -v $TEMPDIR/pages-gem:/src/gh/pages-gem \ + -v $ROOTDIR:/src/site \ + -w /src/site \ + --entrypoint /usr/local/bin/ruby \ + gh-pages \ + -r/src/site/tools/jekyll-page-timing.rb \ + /usr/local/bundle/bin/jekyll" + if [ "$1" == "build" ]; then SITE=$ROOTDIR - docker run --rm -p 4000:4000 -v `realpath ${SITE}`:/src/site gh-pages jekyll build + docker run $docker_run_params build elif [ "$1" == "serve" ]; then - SITE=$ROOTDIR make server + SITE=$ROOTDIR + docker run -p 4000:4000 $docker_run_params serve --host 0.0.0.0 fi return_code=$? diff --git a/tools/generate-pdfs.sh b/tools/generate-pdfs.sh index 104cacc3..e634d5db 100755 --- a/tools/generate-pdfs.sh +++ b/tools/generate-pdfs.sh @@ -49,3 +49,4 @@ generate_pdfs_from_md ./morello/morello.md ./pdfs/morello.pdf generate_pdfs_from_md ./main/acle.md ./pdfs/acle.pdf generate_pdfs_from_md ./tmp/mve.for-pdf.md ./pdfs/mve.pdf generate_pdfs_from_md ./tmp/advsimd.for-pdf.md ./pdfs/advsimd.pdf +rm -rf ./tmp diff --git a/tools/jekyll-page-timing.rb b/tools/jekyll-page-timing.rb new file mode 100644 index 00000000..cf522736 --- /dev/null +++ b/tools/jekyll-page-timing.rb @@ -0,0 +1,64 @@ +# SPDX-FileCopyrightText: Copyright 2026 Arm Limited and/or its affiliates +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# frozen_string_literal: true + +require "jekyll" + +module JekyllPageTiming + @start_times = {} + + def self.name(item) + if item.respond_to?(:relative_path) && item.relative_path + item.relative_path + elsif item.respond_to?(:path) && item.path + item.path + elsif item.respond_to?(:url) && item.url + item.url + else + item.inspect + end + end + + def self.start(item) + @start_times[item.object_id] = + Process.clock_gettime(Process::CLOCK_MONOTONIC) + + warn "START PAGE: #{name(item)}" + end + + def self.finish(item) + started_at = @start_times.delete(item.object_id) + + if started_at + elapsed = + Process.clock_gettime(Process::CLOCK_MONOTONIC) - started_at + + warn format("END PAGE: %s (%.3fs)", name(item), elapsed) + else + warn "END PAGE: #{name(item)}" + end + end +end + +[:pages, :documents].each do |owner| + Jekyll::Hooks.register owner, :pre_render do |item| + JekyllPageTiming.start(item) + end + + Jekyll::Hooks.register owner, :post_render do |item| + JekyllPageTiming.finish(item) + end +end \ No newline at end of file From 64955740f7ec8951d90b38d3f99942b14567df5a Mon Sep 17 00:00:00 2001 From: Rodolfo Wottrich Date: Sat, 18 Jul 2026 14:03:00 +0100 Subject: [PATCH 2/5] More QoL changes in building and serving pages and also PDFs --- build_with_docker.sh | 2 +- tools/build-github-pages.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build_with_docker.sh b/build_with_docker.sh index d37453e8..819171ed 100755 --- a/build_with_docker.sh +++ b/build_with_docker.sh @@ -6,7 +6,7 @@ set -x IMAGE_NAME=acle_build # Build the image. -docker build -t $IMAGE_NAME tools/docker +docker build -t $IMAGE_NAME --network host tools/docker # Run the image, mounting the current folder into the /src folder of # the docker image. Run as the host user so that the output files are owned by them. docker run --rm -u $(id -u):$(id -g) --mount type=bind,source="$(pwd)",target=/src $IMAGE_NAME diff --git a/tools/build-github-pages.sh b/tools/build-github-pages.sh index 26d9d143..12ace982 100755 --- a/tools/build-github-pages.sh +++ b/tools/build-github-pages.sh @@ -66,7 +66,7 @@ if [ "$1" == "build" ]; then docker run $docker_run_params build elif [ "$1" == "serve" ]; then SITE=$ROOTDIR - docker run -p 4000:4000 $docker_run_params serve --host 0.0.0.0 + docker run --network host $docker_run_params serve --host 127.0.0.1 --port 4000 fi return_code=$? From ff5d038554e06d5c3772fb3af675e4aa9f84a071 Mon Sep 17 00:00:00 2001 From: Rodolfo Wottrich Date: Sat, 18 Jul 2026 14:04:00 +0100 Subject: [PATCH 3/5] Remove Liquid warning on building pages Warning: Liquid syntax error (line 14): [:colon, ":"] is not a valid expression in "{{:toc}}" --- mve_intrinsics/mve.template.md | 2 +- neon_intrinsics/advsimd.template.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mve_intrinsics/mve.template.md b/mve_intrinsics/mve.template.md index 92f4575e..2f016250 100644 --- a/mve_intrinsics/mve.template.md +++ b/mve_intrinsics/mve.template.md @@ -24,7 +24,7 @@ to generate the Table of Contents via Jekyll. They are automatically removed by the scripts that generate the pdfs. --> * TOC -{{:toc}} +{:toc} # Preface ## Abstract diff --git a/neon_intrinsics/advsimd.template.md b/neon_intrinsics/advsimd.template.md index c87f2781..4f49bfb7 100644 --- a/neon_intrinsics/advsimd.template.md +++ b/neon_intrinsics/advsimd.template.md @@ -25,7 +25,7 @@ to generate the Table of Contents via Jekyll. They are automatically removed by the scripts that generate the pdfs. --> * TOC -{{:toc}} +{:toc} # Preface ## Abstract From 5e357f069e2bdffde61e0e27ad00e8a354f77e37 Mon Sep 17 00:00:00 2001 From: Rodolfo Wottrich Date: Sat, 18 Jul 2026 19:01:09 +0100 Subject: [PATCH 4/5] Fix PDFs after fixing Liquid warning for pages --- tools/gen-intrinsics-specs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/gen-intrinsics-specs.py b/tools/gen-intrinsics-specs.py index a43dad95..ddf8f8ef 100755 --- a/tools/gen-intrinsics-specs.py +++ b/tools/gen-intrinsics-specs.py @@ -965,7 +965,8 @@ def get_intrinsics_db(path): intrinsics_db = get_intrinsics_db(cli_args.intrinsic_defs) doc_template = read_template(cli_args.template) intrinsic_table = process_db(intrinsics_db, classification_map, cli_args.workflow) - md_output = doc_template.format(intrinsic_table=intrinsic_table) + normalized_template = doc_template.replace("{{", "{").replace("}}", "}") + md_output = normalized_template.replace("{intrinsic_table}", intrinsic_table) with (open(cli_args.outfile, 'w')) as f: f.write(md_output) # Always run the unit tests. From 2e7ca600be62e542d58e4cf987930b01b43a8571 Mon Sep 17 00:00:00 2001 From: Rodolfo Wottrich Date: Mon, 20 Jul 2026 11:28:30 +0100 Subject: [PATCH 5/5] Add missing copyright info --- mve_intrinsics/mve.template.md | 4 ++-- tools/gen-intrinsics-specs.py | 2 +- tools/generate-pdfs.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mve_intrinsics/mve.template.md b/mve_intrinsics/mve.template.md index 2f016250..a34193d1 100644 --- a/mve_intrinsics/mve.template.md +++ b/mve_intrinsics/mve.template.md @@ -4,7 +4,7 @@ version: 2021Q4 date-of-issue: 11 January 2022 # LaTeX specific variables landscape: true -copyright-text: Copyright 2019-2022 Arm Limited and/or its affiliates . +copyright-text: Copyright 2019-2022, 2026 Arm Limited and/or its affiliates . draftversion: true # Jekyll specific variables header_counter: true @@ -12,7 +12,7 @@ toc: true --- diff --git a/tools/gen-intrinsics-specs.py b/tools/gen-intrinsics-specs.py index ddf8f8ef..5d11c285 100755 --- a/tools/gen-intrinsics-specs.py +++ b/tools/gen-intrinsics-specs.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# SPDX-FileCopyrightText: Copyright 2021, 2023 Arm Limited and/or its affiliates +# SPDX-FileCopyrightText: Copyright 2021, 2023, 2026 Arm Limited and/or its affiliates # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tools/generate-pdfs.sh b/tools/generate-pdfs.sh index e634d5db..62835f51 100755 --- a/tools/generate-pdfs.sh +++ b/tools/generate-pdfs.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -ex -# SPDX-FileCopyrightText: Copyright 2021-2022 Arm Limited and/or its affiliates +# SPDX-FileCopyrightText: Copyright 2021-2022, 2026 Arm Limited and/or its affiliates # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License");