Skip to content
Merged
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
38 changes: 38 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Auto-generated by Cimas: Do not edit it manually!
# See https://github.com/metanorma/cimas
# source: https://github.com/marketplace/actions/merge-pull-requests#usage
name: automerge
on:
pull_request:
types:
- labeled
- unlabeled
- synchronize
- opened
- edited
- ready_for_review
- reopened
- unlocked
pull_request_review:
types:
- submitted
check_suite:
types:
- completed
status: {}

# Least-privilege: pascalgn/automerge-action merges PRs with GITHUB_TOKEN,
# which requires contents:write (merge) and pull-requests:write.
permissions:
contents: write
pull-requests: write

jobs:
automerge:
runs-on: ubuntu-latest
steps:
- id: automerge
name: automerge
uses: pascalgn/automerge-action@v0.16.4
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
86 changes: 86 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Auto-generated by Cimas: Do not edit it manually!
# See https://github.com/metanorma/cimas
name: Build and Deploy Grammars

# Iso-only "Build and Deploy Grammars" workflow, inherited from ex-
# metanorma-model-iso and adapted for the standoc-models monorepo layout.
# Runs the lutaml-xsd grammar-package build + SPA HTML generation + GitHub
# Pages deploy. Artefact names preserved from original (metanorma-model-
# iso.lxr / .html) for downstream consumer compatibility. All build steps
# run with working-directory: iso/ since the source files (scripts,
# build-config-small.yml, images, Gemfile) preserve their pre-monorepo
# repo-root paths under the iso/ subdirectory (git filter-repo
# --to-subdirectory-filter output).

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: 'true'

- name: Setup Ruby
# Ruby 4.0 preserved from original ex-model-iso deploy.yml. Per
# opoudjis 2026-08-10, 4.0 is no longer experimental in the
# metanorma stack. Deploy Ruby intentionally may differ from
# make.yml's default (3.3.5); if lutaml-xsd or a transitive dep
# breaks on 4.0, revisit here.
uses: ruby/setup-ruby@v1
with:
ruby-version: '4.0'
bundler-cache: true
working-directory: iso

- name: Fix include paths in rnc files
working-directory: iso
run: ruby scripts/flatten-include-files.rb

- name: Build LXR package
working-directory: iso
run: bundle exec lutaml-xsd build from-config build-config-small.yml --output metanorma-model-iso.lxr

- name: Generate SPA documentation
working-directory: iso
run: bundle exec lutaml-xsd spa metanorma-model-iso.lxr --mode inlined --output metanorma-model-iso.html

- name: Prepare artifact
working-directory: iso
run: |
mkdir -p _site
cp metanorma-model-iso.html _site/index.html
cp -r images _site/

- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
path: iso/_site

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
13 changes: 13 additions & 0 deletions .github/workflows/make.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Auto-generated by Cimas: Do not edit it manually!
# See https://github.com/metanorma/cimas
name: make

on:
push:
branches: [main]
tags: [v*]
pull_request:

jobs:
make:
uses: metanorma/ci/.github/workflows/standoc-models-make.yml@v1
32 changes: 30 additions & 2 deletions bipm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ endif

PNG := $(patsubst views/%.lutaml,images/%.png,$(SRC))

all: $(PNG)
all: $(PNG) verify-images

images/%.png: views/%.lutaml
lutaml lml generate $< -o $@ -t png
Expand All @@ -28,7 +28,35 @@ views/%.lutaml: models/%.wsd | views
views:
mkdir views

# Defensive content-type check. The lutaml CLI happily writes Graphviz dot
# source into a .png output path when the wrong flag is passed (the bug
# fixed by metanorma/ci#303 — text content in files named *.png, with
# `make all` still exiting 0). This target asserts each generated PNG
# actually starts with the PNG magic bytes, so the same class of bug fails
# CI loudly instead of passing silently. See metanorma/ci#302 for the
# broader "make-exits-0-but-output-malformed" pattern.
ifeq ($(OS),Windows_NT)
verify-images:
@echo "verify-images: skipped on Windows (file(1) not standard)"
else
verify-images: $(PNG)
@count=0; bad=0; \
for f in $(PNG); do \
if [ -z "$$f" ]; then continue; fi; \
count=$$((count+1)); \
if ! file -b "$$f" | grep -q "^PNG image data"; then \
echo "ERROR: $$f is not a valid PNG (file -b reports: $$(file -b "$$f"))" >&2; \
bad=$$((bad+1)); \
fi; \
done; \
if [ $$bad -gt 0 ]; then \
echo "verify-images: $$bad of $$count file(s) failed PNG content check" >&2; \
exit 1; \
fi; \
echo "verify-images: $$count PNG file(s) verified"
endif

clean:
$(RM) images/*.png

.PHONY: clean
.PHONY: clean verify-images all
32 changes: 30 additions & 2 deletions bsi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ endif

PNG := $(patsubst views/%.lutaml,images/%.png,$(SRC))

all: $(PNG)
all: $(PNG) verify-images

images/%.png: views/%.lutaml
lutaml lml generate $< -o $@ -t png
Expand All @@ -28,7 +28,35 @@ views/%.lutaml: models/%.wsd | views
views:
mkdir views

# Defensive content-type check. The lutaml CLI happily writes Graphviz dot
# source into a .png output path when the wrong flag is passed (the bug
# fixed by metanorma/ci#303 — text content in files named *.png, with
# `make all` still exiting 0). This target asserts each generated PNG
# actually starts with the PNG magic bytes, so the same class of bug fails
# CI loudly instead of passing silently. See metanorma/ci#302 for the
# broader "make-exits-0-but-output-malformed" pattern.
ifeq ($(OS),Windows_NT)
verify-images:
@echo "verify-images: skipped on Windows (file(1) not standard)"
else
verify-images: $(PNG)
@count=0; bad=0; \
for f in $(PNG); do \
if [ -z "$$f" ]; then continue; fi; \
count=$$((count+1)); \
if ! file -b "$$f" | grep -q "^PNG image data"; then \
echo "ERROR: $$f is not a valid PNG (file -b reports: $$(file -b "$$f"))" >&2; \
bad=$$((bad+1)); \
fi; \
done; \
if [ $$bad -gt 0 ]; then \
echo "verify-images: $$bad of $$count file(s) failed PNG content check" >&2; \
exit 1; \
fi; \
echo "verify-images: $$count PNG file(s) verified"
endif

clean:
$(RM) images/*.png

.PHONY: clean
.PHONY: clean verify-images all
32 changes: 30 additions & 2 deletions cc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ endif

PNG := $(patsubst views/%.lutaml,images/%.png,$(SRC))

all: $(PNG)
all: $(PNG) verify-images

images/%.png: views/%.lutaml
lutaml lml generate $< -o $@ -t png
Expand All @@ -28,7 +28,35 @@ views/%.lutaml: models/%.wsd | views
views:
mkdir views

# Defensive content-type check. The lutaml CLI happily writes Graphviz dot
# source into a .png output path when the wrong flag is passed (the bug
# fixed by metanorma/ci#303 — text content in files named *.png, with
# `make all` still exiting 0). This target asserts each generated PNG
# actually starts with the PNG magic bytes, so the same class of bug fails
# CI loudly instead of passing silently. See metanorma/ci#302 for the
# broader "make-exits-0-but-output-malformed" pattern.
ifeq ($(OS),Windows_NT)
verify-images:
@echo "verify-images: skipped on Windows (file(1) not standard)"
else
verify-images: $(PNG)
@count=0; bad=0; \
for f in $(PNG); do \
if [ -z "$$f" ]; then continue; fi; \
count=$$((count+1)); \
if ! file -b "$$f" | grep -q "^PNG image data"; then \
echo "ERROR: $$f is not a valid PNG (file -b reports: $$(file -b "$$f"))" >&2; \
bad=$$((bad+1)); \
fi; \
done; \
if [ $$bad -gt 0 ]; then \
echo "verify-images: $$bad of $$count file(s) failed PNG content check" >&2; \
exit 1; \
fi; \
echo "verify-images: $$count PNG file(s) verified"
endif

clean:
$(RM) images/*.png

.PHONY: clean
.PHONY: clean verify-images all
32 changes: 30 additions & 2 deletions csa/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ endif

PNG := $(patsubst views/%.lutaml,images/%.png,$(SRC))

all: $(PNG)
all: $(PNG) verify-images

images/%.png: views/%.lutaml
lutaml lml generate $< -o $@ -t png
Expand All @@ -28,7 +28,35 @@ views/%.lutaml: models/%.wsd | views
views:
mkdir views

# Defensive content-type check. The lutaml CLI happily writes Graphviz dot
# source into a .png output path when the wrong flag is passed (the bug
# fixed by metanorma/ci#303 — text content in files named *.png, with
# `make all` still exiting 0). This target asserts each generated PNG
# actually starts with the PNG magic bytes, so the same class of bug fails
# CI loudly instead of passing silently. See metanorma/ci#302 for the
# broader "make-exits-0-but-output-malformed" pattern.
ifeq ($(OS),Windows_NT)
verify-images:
@echo "verify-images: skipped on Windows (file(1) not standard)"
else
verify-images: $(PNG)
@count=0; bad=0; \
for f in $(PNG); do \
if [ -z "$$f" ]; then continue; fi; \
count=$$((count+1)); \
if ! file -b "$$f" | grep -q "^PNG image data"; then \
echo "ERROR: $$f is not a valid PNG (file -b reports: $$(file -b "$$f"))" >&2; \
bad=$$((bad+1)); \
fi; \
done; \
if [ $$bad -gt 0 ]; then \
echo "verify-images: $$bad of $$count file(s) failed PNG content check" >&2; \
exit 1; \
fi; \
echo "verify-images: $$count PNG file(s) verified"
endif

clean:
$(RM) images/*.png

.PHONY: clean
.PHONY: clean verify-images all
32 changes: 30 additions & 2 deletions gb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ endif

PNG := $(patsubst views/%.lutaml,images/%.png,$(SRC))

all: $(PNG)
all: $(PNG) verify-images

images/%.png: views/%.lutaml
lutaml lml generate $< -o $@ -t png
Expand All @@ -28,7 +28,35 @@ views/%.lutaml: models/%.wsd | views
views:
mkdir views

# Defensive content-type check. The lutaml CLI happily writes Graphviz dot
# source into a .png output path when the wrong flag is passed (the bug
# fixed by metanorma/ci#303 — text content in files named *.png, with
# `make all` still exiting 0). This target asserts each generated PNG
# actually starts with the PNG magic bytes, so the same class of bug fails
# CI loudly instead of passing silently. See metanorma/ci#302 for the
# broader "make-exits-0-but-output-malformed" pattern.
ifeq ($(OS),Windows_NT)
verify-images:
@echo "verify-images: skipped on Windows (file(1) not standard)"
else
verify-images: $(PNG)
@count=0; bad=0; \
for f in $(PNG); do \
if [ -z "$$f" ]; then continue; fi; \
count=$$((count+1)); \
if ! file -b "$$f" | grep -q "^PNG image data"; then \
echo "ERROR: $$f is not a valid PNG (file -b reports: $$(file -b "$$f"))" >&2; \
bad=$$((bad+1)); \
fi; \
done; \
if [ $$bad -gt 0 ]; then \
echo "verify-images: $$bad of $$count file(s) failed PNG content check" >&2; \
exit 1; \
fi; \
echo "verify-images: $$count PNG file(s) verified"
endif

clean:
$(RM) images/*.png

.PHONY: clean
.PHONY: clean verify-images all
17 changes: 12 additions & 5 deletions grammars/Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
Encoding.default_external = Encoding::UTF_8
Encoding.default_internal = Encoding::UTF_8

# Auto-generated by Cimas: Do not edit it manually!
# See https://github.com/metanorma/cimas
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}" }

gem "ruby-jing"
gem "lutaml"
gem "lutaml-uml"
# lutaml-xsd is required by repos whose CI runs `bundle exec lutaml-xsd
# build` for grammar-package generation (currently metanorma-model-iso's
# "Build and Deploy Grammars" workflow). The lutaml-xsd executable
# dropped out of the lutaml gem's runtime dep chain in the early-July
# 2026 lutaml restructuring; before that, plain `gem "lutaml"` transitively
# provided it. Adding it explicitly here so the sync survives the next
# lutaml release without silently re-breaking the workflow.
gem "lutaml-xsd"
Loading
Loading