# 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 # 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