Apply identical scaling for x and y #64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Model validation | |
on: [push, pull_request, workflow_dispatch] | |
permissions: | |
contents: read | |
jobs: | |
validate: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 5 | |
- name: Setup python environment | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install --user pyparsing lark-parser==0.12.0 networkx requests sqlalchemy sqlalchemy-utils pytest | |
mkdir -p ~/.local/lib/python3.11/site-packages | |
wget -q https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.7.0-f7c03db-linux64.zip | |
unzip ifcopenshell-python-311-v0.7.0-f7c03db-linux64.zip -d ~/.local/lib/python3.11/site-packages | |
git clone --depth 1 https://github.com/IfcOpenShell/step-file-parser | |
pip install --user -r ./step-file-parser/requirements.in | |
- name: Check for UTF-8 BOM | |
run: "! find ./models -name '*.ifc' -print0 | xargs -0 grep -l $'^\\xEF\\xBB\\xBF' | grep ." | |
- name: Validate IFC example files | |
run: | | |
valid_count=0 | |
invalid_count=0 | |
set +e | |
while IFS= read -r file; do | |
printf "Validating $file ..." | |
python ./step-file-parser/main.py "$file" > validate.log 2>&1 | |
exit_code=$? | |
if [ $exit_code -eq 0 ]; then | |
((valid_count++)) | |
printf " valid\n" | |
else | |
((invalid_count++)) | |
printf " invalid\n" | |
fi | |
done < <(find ./models -type f -name '*.ifc') | |
echo "Number of valid files: $valid_count" | |
echo "Number of invalid files: $invalid_count" | |
set -e | |
if [ $invalid_count -gt 0 ]; then | |
exit 1 | |
fi | |
- name: Model validation | |
run: | | |
./validate.sh |