mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-17 05:52:33 +00:00
Normalize whitespaces in yml files
This commit is contained in:
@@ -7,7 +7,7 @@ body:
|
|||||||
label: Bug Description
|
label: Bug Description
|
||||||
placeholder: |
|
placeholder: |
|
||||||
Describe what problem occurred and what you expected to happen instead.
|
Describe what problem occurred and what you expected to happen instead.
|
||||||
|
|
||||||
1. To reproduce this, open file '...'
|
1. To reproduce this, open file '...'
|
||||||
2. Click on '....'
|
2. Click on '....'
|
||||||
3. See error
|
3. See error
|
||||||
|
|||||||
@@ -286,6 +286,7 @@ PATTERNS = (
|
|||||||
"*.i",
|
"*.i",
|
||||||
"*.cmake",
|
"*.cmake",
|
||||||
"*/CMakeLists.txt",
|
"*/CMakeLists.txt",
|
||||||
|
"*.yml",
|
||||||
)
|
)
|
||||||
|
|
||||||
REPO_ROOT = Path(subprocess.check_output(["git", "rev-parse", "--show-toplevel"], text=True).strip())
|
REPO_ROOT = Path(subprocess.check_output(["git", "rev-parse", "--show-toplevel"], text=True).strip())
|
||||||
|
|||||||
@@ -34,21 +34,21 @@ jobs:
|
|||||||
- name: Run conda cleaner
|
- name: Run conda cleaner
|
||||||
run: |
|
run: |
|
||||||
python - << EOF
|
python - << EOF
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from binstar_client.utils import get_server_api
|
from binstar_client.utils import get_server_api
|
||||||
from binstar_client.errors import BinstarError
|
from binstar_client.errors import BinstarError
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
api_token = os.environ.get('ANACONDA_TOKEN')
|
api_token = os.environ.get('ANACONDA_TOKEN')
|
||||||
pkg_name = 'ifcopenshell'
|
pkg_name = 'ifcopenshell'
|
||||||
channel_name = 'ifcopenshell'
|
channel_name = 'ifcopenshell'
|
||||||
|
|
||||||
# Authenticate with Anaconda
|
# Authenticate with Anaconda
|
||||||
aserver_api = get_server_api(token=api_token)
|
aserver_api = get_server_api(token=api_token)
|
||||||
|
|
||||||
|
|
||||||
# Get the list of packages in the channel
|
# Get the list of packages in the channel
|
||||||
def get_package(filter_package_name: str = None):
|
def get_package(filter_package_name: str = None):
|
||||||
try:
|
try:
|
||||||
@@ -59,12 +59,12 @@ jobs:
|
|||||||
print(f"No packages found for {filter_package_name}.")
|
print(f"No packages found for {filter_package_name}.")
|
||||||
if len(user_packages) > 1:
|
if len(user_packages) > 1:
|
||||||
raise ValueError(f"Found {len(user_packages)} package for {filter_package_name}. Will only support 1 package.")
|
raise ValueError(f"Found {len(user_packages)} package for {filter_package_name}. Will only support 1 package.")
|
||||||
|
|
||||||
return user_packages[0]
|
return user_packages[0]
|
||||||
except BinstarError as err:
|
except BinstarError as err:
|
||||||
raise ValueError(f"Failed to fetch packages: {err}")
|
raise ValueError(f"Failed to fetch packages: {err}")
|
||||||
|
|
||||||
|
|
||||||
# Delete a package version
|
# Delete a package version
|
||||||
def delete_package(package_name, version):
|
def delete_package(package_name, version):
|
||||||
try:
|
try:
|
||||||
@@ -72,33 +72,33 @@ jobs:
|
|||||||
print(f"Deleted {package_name} version {version}")
|
print(f"Deleted {package_name} version {version}")
|
||||||
except BinstarError as err:
|
except BinstarError as err:
|
||||||
print(f"Failed to delete {package_name} version {version}: {err}")
|
print(f"Failed to delete {package_name} version {version}: {err}")
|
||||||
|
|
||||||
|
|
||||||
# Main logic
|
# Main logic
|
||||||
def main():
|
def main():
|
||||||
package = get_package(pkg_name)
|
package = get_package(pkg_name)
|
||||||
if not package:
|
if not package:
|
||||||
print("No packages found.")
|
print("No packages found.")
|
||||||
return
|
return
|
||||||
|
|
||||||
number_of_supported_versions = ${{ env.NUM_SUPPORTED_VERSIONS }}
|
number_of_supported_versions = ${{ env.NUM_SUPPORTED_VERSIONS }}
|
||||||
|
|
||||||
package_name = package['name']
|
package_name = package['name']
|
||||||
versions = package["versions"]
|
versions = package["versions"]
|
||||||
if len(versions) <= number_of_supported_versions:
|
if len(versions) <= number_of_supported_versions:
|
||||||
print(f"Number of versions {len(versions)} is less than or equal to {number_of_supported_versions}.")
|
print(f"Number of versions {len(versions)} is less than or equal to {number_of_supported_versions}.")
|
||||||
return
|
return
|
||||||
|
|
||||||
# sort the versions in descending order
|
# sort the versions in descending order
|
||||||
print(f"Before reversal: {versions=}")
|
print(f"Before reversal: {versions=}")
|
||||||
versions.reverse()
|
versions.reverse()
|
||||||
print(f"After reversal: {versions=}")
|
print(f"After reversal: {versions=}")
|
||||||
|
|
||||||
releases = versions[number_of_supported_versions:]
|
releases = versions[number_of_supported_versions:]
|
||||||
|
|
||||||
for release in releases:
|
for release in releases:
|
||||||
delete_package(package_name, release)
|
delete_package(package_name, release)
|
||||||
|
|
||||||
main()
|
main()
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
@@ -24,13 +24,13 @@ jobs:
|
|||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@v7
|
||||||
- name: Set env
|
- name: Set env
|
||||||
run: echo ok go
|
run: echo ok go
|
||||||
|
|
||||||
- name: Get current version
|
- name: Get current version
|
||||||
id: version
|
id: version
|
||||||
# Strip any trailing prerelease label and number; the dated alpha
|
# Strip any trailing prerelease label and number; the dated alpha
|
||||||
# suffix is added below.
|
# suffix is added below.
|
||||||
run: echo "version=$(sed -E 's/[[:alpha:]]+[0-9]+$//' VERSION)" >> $GITHUB_OUTPUT
|
run: echo "version=$(sed -E 's/[[:alpha:]]+[0-9]+$//' VERSION)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Get current date
|
- name: Get current date
|
||||||
id: date
|
id: date
|
||||||
run: echo "date=$(date +'%y%m%d')" >> $GITHUB_OUTPUT
|
run: echo "date=$(date +'%y%m%d')" >> $GITHUB_OUTPUT
|
||||||
@@ -39,7 +39,7 @@ jobs:
|
|||||||
id: verdate
|
id: verdate
|
||||||
run: echo "verdate=${{ steps.version.outputs.version }}alpha${{ steps.date.outputs.date }}" >> $GITHUB_OUTPUT
|
run: echo "verdate=${{ steps.version.outputs.version }}alpha${{ steps.date.outputs.date }}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: ${{ matrix.platform.distver }}-${{ matrix.pyver.name }}
|
name: ${{ matrix.platform.distver }}-${{ matrix.pyver.name }}
|
||||||
needs: activate
|
needs: activate
|
||||||
@@ -64,7 +64,7 @@ jobs:
|
|||||||
uses: pierotofy/set-swap-space@master
|
uses: pierotofy/set-swap-space@master
|
||||||
with:
|
with:
|
||||||
swap-size-gb: 10
|
swap-size-gb: 10
|
||||||
|
|
||||||
- name: set ARTIFACTS ENV vars
|
- name: set ARTIFACTS ENV vars
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@@ -76,7 +76,7 @@ jobs:
|
|||||||
elif [[ "$RUNNER_OS" == "Linux" ]]; then
|
elif [[ "$RUNNER_OS" == "Linux" ]]; then
|
||||||
echo "ARTIFACTS_DIR=/home/runner/work/artifacts" >> $GITHUB_ENV
|
echo "ARTIFACTS_DIR=/home/runner/work/artifacts" >> $GITHUB_ENV
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@v7
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
name: ci-ifcopenshell-docker
|
name: ci-ifcopenshell-docker
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
@@ -37,7 +37,7 @@ jobs:
|
|||||||
name: ccache
|
name: ccache
|
||||||
uses: hendrikmuhs/ccache-action@v1.2.23
|
uses: hendrikmuhs/ccache-action@v1.2.23
|
||||||
|
|
||||||
-
|
-
|
||||||
name: Build ifcopenshell
|
name: Build ifcopenshell
|
||||||
run: |
|
run: |
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
@@ -66,12 +66,12 @@ jobs:
|
|||||||
../cmake
|
../cmake
|
||||||
make -j $(nproc)
|
make -j $(nproc)
|
||||||
make install
|
make install
|
||||||
-
|
-
|
||||||
name: Package
|
name: Package
|
||||||
run: |
|
run: |
|
||||||
make package
|
make package
|
||||||
working-directory: build
|
working-directory: build
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: actions/upload-artifact@v7
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
# Artifact name
|
# Artifact name
|
||||||
@@ -88,8 +88,8 @@ jobs:
|
|||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@v7
|
||||||
with:
|
with:
|
||||||
lfs: true
|
lfs: true
|
||||||
|
|
||||||
- name: Download
|
- name: Download
|
||||||
uses: actions/download-artifact@v8.0.1
|
uses: actions/download-artifact@v8.0.1
|
||||||
with:
|
with:
|
||||||
# Artifact name
|
# Artifact name
|
||||||
@@ -100,17 +100,17 @@ jobs:
|
|||||||
uses: docker/setup-qemu-action@v4
|
uses: docker/setup-qemu-action@v4
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v4
|
uses: docker/setup-buildx-action@v4
|
||||||
-
|
-
|
||||||
name: Login to Dockerhub
|
name: Login to Dockerhub
|
||||||
uses: docker/login-action@v4
|
uses: docker/login-action@v4
|
||||||
with:
|
with:
|
||||||
username: aecgeeks
|
username: aecgeeks
|
||||||
password: ${{ secrets.DOCKER_HUB_TOKEN }}
|
password: ${{ secrets.DOCKER_HUB_TOKEN }}
|
||||||
-
|
-
|
||||||
name: Build container image
|
name: Build container image
|
||||||
uses: docker/build-push-action@v7
|
uses: docker/build-push-action@v7
|
||||||
with:
|
with:
|
||||||
context: artifacts
|
context: artifacts
|
||||||
repository: aecgeeks/ifcopenshell
|
repository: aecgeeks/ifcopenshell
|
||||||
# Since the dispatch is set to `tag`, `github.ref_name` should evaluate to the pushed tag
|
# Since the dispatch is set to `tag`, `github.ref_name` should evaluate to the pushed tag
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ jobs:
|
|||||||
libocct-foundation-dev libocct-modeling-algorithms-dev libocct-modeling-data-dev libocct-ocaf-dev libocct-visualization-dev libocct-data-exchange-dev \
|
libocct-foundation-dev libocct-modeling-algorithms-dev libocct-modeling-data-dev libocct-ocaf-dev libocct-visualization-dev libocct-data-exchange-dev \
|
||||||
${OCCT_CMAKE_DEPS} \
|
${OCCT_CMAKE_DEPS} \
|
||||||
libcgal-dev libeigen3-dev
|
libcgal-dev libeigen3-dev
|
||||||
|
|
||||||
- name: ccache
|
- name: ccache
|
||||||
uses: hendrikmuhs/ccache-action@v1.2.23
|
uses: hendrikmuhs/ccache-action@v1.2.23
|
||||||
with:
|
with:
|
||||||
@@ -176,7 +176,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo $Python3_ROOT_DIR
|
echo $Python3_ROOT_DIR
|
||||||
echo ${{ env.pythonLocation }}
|
echo ${{ env.pythonLocation }}
|
||||||
|
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
cmake \
|
cmake \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
@@ -223,7 +223,7 @@ jobs:
|
|||||||
cmake --build .
|
cmake --build .
|
||||||
./IfcOpenHouse && test -f IfcOpenHouse.ifc
|
./IfcOpenHouse && test -f IfcOpenHouse.ifc
|
||||||
./IfcParseExamples IfcOpenHouse.ifc
|
./IfcParseExamples IfcOpenHouse.ifc
|
||||||
./IfcAdvancedHouse && test -f IfcAdvancedHouse.ifc
|
./IfcAdvancedHouse && test -f IfcAdvancedHouse.ifc
|
||||||
./IfcAlignment && test -f FHWA_Bridge_Geometry_Alignment_Example.ifc
|
./IfcAlignment && test -f FHWA_Bridge_Geometry_Alignment_Example.ifc
|
||||||
./IfcSimplifiedAlignment && test -f FHWA_Bridge_Geometry_Alignment_Example_Simplified.ifc
|
./IfcSimplifiedAlignment && test -f FHWA_Bridge_Geometry_Alignment_Example_Simplified.ifc
|
||||||
|
|
||||||
|
|||||||
@@ -35,4 +35,4 @@ jobs:
|
|||||||
external_repository: IfcOpenShell/bonsaibim_org_docs_unstable # Target repository
|
external_repository: IfcOpenShell/bonsaibim_org_docs_unstable # Target repository
|
||||||
publish_branch: main # Branch to deploy to
|
publish_branch: main # Branch to deploy to
|
||||||
cname: docs-unstable.bonsaibim.org # Custom domain for unstable docs
|
cname: docs-unstable.bonsaibim.org # Custom domain for unstable docs
|
||||||
publish_dir: src/bonsai/docs/_build/html # Directory containing built docs
|
publish_dir: src/bonsai/docs/_build/html # Directory containing built docs
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Set env
|
- name: Set env
|
||||||
run: echo ok go
|
run: echo ok go
|
||||||
|
|
||||||
build:
|
build:
|
||||||
needs: activate
|
needs: activate
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ jobs:
|
|||||||
libtbb-dev nlohmann-json3-dev \
|
libtbb-dev nlohmann-json3-dev \
|
||||||
libocct-foundation-dev libocct-modeling-algorithms-dev libocct-modeling-data-dev libocct-ocaf-dev libocct-visualization-dev libocct-data-exchange-dev \
|
libocct-foundation-dev libocct-modeling-algorithms-dev libocct-modeling-data-dev libocct-ocaf-dev libocct-visualization-dev libocct-data-exchange-dev \
|
||||||
libcgal-dev opencollada-dev
|
libcgal-dev opencollada-dev
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -77,7 +77,7 @@ jobs:
|
|||||||
echo ::set-output name=deb::$( ls assets/*.deb | head -n 1 | xargs basename )
|
echo ::set-output name=deb::$( ls assets/*.deb | head -n 1 | xargs basename )
|
||||||
working-directory: build
|
working-directory: build
|
||||||
env:
|
env:
|
||||||
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Release
|
- name: Release
|
||||||
id: release
|
id: release
|
||||||
uses: actions/create-release@v1
|
uses: actions/create-release@v1
|
||||||
@@ -101,7 +101,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ steps.release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
|
upload_url: ${{ steps.release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
|
||||||
asset_path: build/assets/${{ steps.package.outputs.tgz }}
|
asset_path: build/assets/${{ steps.package.outputs.tgz }}
|
||||||
asset_name: ${{ steps.package.outputs.tgz }}
|
asset_name: ${{ steps.package.outputs.tgz }}
|
||||||
asset_content_type: application/x-gzip
|
asset_content_type: application/x-gzip
|
||||||
@@ -111,7 +111,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ steps.release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
|
upload_url: ${{ steps.release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
|
||||||
asset_path: build/assets/${{ steps.package.outputs.deb }}
|
asset_path: build/assets/${{ steps.package.outputs.deb }}
|
||||||
asset_name: ${{ steps.package.outputs.deb }}
|
asset_name: ${{ steps.package.outputs.deb }}
|
||||||
asset_content_type: application/vnd.debian.binary-package
|
asset_content_type: application/vnd.debian.binary-package
|
||||||
|
|||||||
Reference in New Issue
Block a user