Compare commits

..

3 commits
breezy ... main

Author SHA1 Message Date
9a44d6ae37 Run the checks under bash, not sh
First run on the ifc runner failed both jobs at exit 127 with
"shopt: not found". The runner executes a `run:` block with /bin/sh
(dash) unless the step says otherwise, where GitHub defaults to bash --
so `shopt -s globstar` died before either script reached a file.

Setting `shell: bash` explicitly is the fix. The `[[ ]]` tests and the
array handling in ids-lint need it too, so this is load-bearing rather
than tidiness.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T93BEAfP4jvcYo7oMo5AL1
2026-08-31 17:11:06 +01:00
087a4b9bee Port IFC and IDS checks to Forgejo Actions
The GitHub workflows could never run here: they ask for runs-on:
ubuntu-latest, which no runner on hub.postle.net offers, so all 8 runs
so far were cancelled. Moved to .forgejo/workflows and pointed at the
`ifc` runner, which serves the pinned ifc-ci image.

The setup steps are gone because the image already contains
ifcopenshell, ifctester, idssplit and pytest, so a run no longer spends
most of its time in setup-python and `pip install ifcopenshell`.

Both bodies are otherwise unchanged apart from skipping libraries/,
which holds vendored component sources rather than deliverable models.

Verified in the ifc-ci container against this model before pushing:
both checks pass, and both were shown to fail when they should --
a corrupted GlobalId exits non-zero, and an IDS rule applying to all 32
windows reports [FAIL] (0/32) and exits 1. That second check matters
because ifctester's CLI never sets an exit code, so the grep for
[FAIL] is what makes the check capable of failing at all.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T93BEAfP4jvcYo7oMo5AL1
2026-08-31 17:08:09 +01:00
e159507581 Merge pull request 'a lil' more breezy.' (#10) from openingdesign/brown-street:breezy into main
Reviewed-on: bruno/brown-street#10

Let's see if ifcmerge really works server-side..
2026-05-18 22:02:06 +00:00
3 changed files with 78 additions and 45 deletions

View file

@ -1,3 +1,16 @@
# IDS compliance: every rule in every IDS/**/*.ids, against every model.
#
# Port of .github/workflows/ids-lint.yml. The script body is unchanged apart
# from skipping libraries/; only the setup steps and `runs-on:` differ, because
# ifc-ci already contains ifctester and idssplit.
#
# idssplit splits each IDS file into one file per rule before testing, so a
# failure names the specific rule rather than only the specification.
#
# Runs on the user-scoped `ifc` runner (user ci-ifc) on hub.postle.net, whose
# root-owned config.yaml has an empty `valid_volumes` -- no host path can be
# mounted, which is what makes it safe for an outside contributor's PR.
name: IDS Compliance Check
on:
@ -7,23 +20,25 @@ on:
jobs:
ids-lint:
runs-on: ubuntu-latest
runs-on: ifc
container:
image: hub.postle.net/bruno/ifc-ci:latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install ifctester and idssplit
run: |
pip install ifctester
pip install --no-deps https://github.com/brunopostle/idssplit/releases/download/0.1.0/idssplit-0.1.0-py3-none-any.whl
uses: actions/checkout@v4
- name: Run IDS validations
# shell: bash is REQUIRED, not decoration. The runner executes `run:`
# blocks with /bin/sh (dash) unless told otherwise, so the GitHub
# original's `shopt -s globstar` dies with "shopt: not found" and
# exit 127 before the first file is checked. `[[ ]]` and arrays need
# bash too.
shell: bash
# Deliberately greps output instead of trusting the exit status:
# ifctester's CLI has no sys.exit anywhere, so a model that violates
# every rule still exits 0. A naive `run: ifctester ...` would be a
# permanently green check that can never fail.
run: |
set -e
shopt -s globstar nullglob
@ -40,7 +55,12 @@ jobs:
exit 0
fi
ifc_files=(**/*.ifc)
# libraries/ holds vendored component sources, not deliverable models.
ifc_files=()
for f in **/*.ifc; do
[[ "$f" == libraries/* ]] && continue
ifc_files+=("$f")
done
if [ ${#ifc_files[@]} -eq 0 ]; then
echo "No IFC files found"

View file

@ -0,0 +1,45 @@
# Schema/rule validation for every IFC model in the repo.
#
# Port of .github/workflows/ifc-lint.yml. Only the setup steps and `runs-on:`
# changed: `ifc-ci` already contains ifcopenshell, so there is no setup-python
# and no pip install -- on GitHub those were most of the runtime.
#
# Runs on the user-scoped `ifc` runner (user ci-ifc) on hub.postle.net, whose
# root-owned config.yaml has an empty `valid_volumes`. A job here can mount no
# host path at all, which is what makes it safe to run an outside contributor's
# pull request.
name: IFC Validation
on:
push:
pull_request:
jobs:
lint-ifc:
runs-on: ifc
container:
image: hub.postle.net/bruno/ifc-ci:latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run IFC lint checks
# shell: bash is REQUIRED, not decoration. The runner executes `run:`
# blocks with /bin/sh (dash) unless told otherwise, so the GitHub
# original's `shopt -s globstar` dies with "shopt: not found" and
# exit 127 before the first file is checked. `[[ ]]` and arrays need
# bash too.
shell: bash
# Gates on its own exit status: ifcopenshell.validate calls sys.exit()
# on failure, so `set -e` fails the job.
run: |
set -e
shopt -s globstar nullglob
for file in **/*.ifc; do
# libraries/ holds vendored component sources, not deliverable models.
[[ "$file" == libraries/* ]] && continue
echo "Validating $file..."
python3 -m ifcopenshell.validate --rules "$file"
done

View file

@ -1,32 +0,0 @@
name: IFC Validation
on:
push:
pull_request:
jobs:
lint-ifc:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install ifcopenshell
run: |
pip install pytest
pip install ifcopenshell
- name: Run IFC lint checks
run: |
set -e
shopt -s globstar nullglob
for file in **/*.ifc; do
echo "Validating $file..."
python3 -m ifcopenshell.validate --rules "$file"
done