From 0454594e7d4c002a7c106a93603be8deca2d58ba Mon Sep 17 00:00:00 2001 From: Gonzalo Casas Date: Fri, 27 Sep 2024 09:44:28 +0200 Subject: [PATCH] update ipy workflow --- .github/workflows/ironpython.yml | 59 +++++++++++++++----------------- requirements.txt | 1 + 2 files changed, 29 insertions(+), 31 deletions(-) diff --git a/.github/workflows/ironpython.yml b/.github/workflows/ironpython.yml index 2624d7cb8..4bc9fe30f 100644 --- a/.github/workflows/ironpython.yml +++ b/.github/workflows/ironpython.yml @@ -13,7 +13,19 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v2 - - name: Install dependencies + - name: "Set up CPython 3.9" + uses: actions/setup-python@v2 + with: + python-version: 3.9 + - name: Install CPython dependencies" + run: | + python -m pip install --upgrade pip + + - name: "Install COMPAS Fab on CPython First" + run: | + pip install --no-cache-dir . + + - name: Install Ironpython and ironpython-pytest run: | echo "Installing IronPython..." choco install ironpython --version=2.7.8.1 @@ -21,43 +33,28 @@ jobs: echo "Downloading ironpython-pytest..." curl -o ironpython-pytest.tar.gz -LJO https://pypi.debian.net/ironpython-pytest/latest - echo "Downloading COMPAS..." - curl -o compas.tar.gz -LJO https://pypi.debian.net/COMPAS/COMPAS-2.1.0.tar.gz - - echo "Downloading roslibpy..." - curl -o roslibpy.tar.gz -LJO https://pypi.debian.net/roslibpy/latest - - echo "Downloading compas_robots..." - curl -o compas_robots.tar.gz -LJO https://pypi.debian.net/compas_robots/latest - - echo "Setting up IronPython environment..." + echo "Ensure pip on IronPython and install pytest..." ipy -X:Frames -m ensurepip - - echo "Installing ironpython-pytest..." ipy -X:Frames -m pip install --no-deps ironpython-pytest.tar.gz - echo "Installing COMPAS..." - ipy -X:Frames -m pip install --no-deps compas.tar.gz - - echo "Installing roslibpy..." - ipy -X:Frames -m pip install --no-deps roslibpy.tar.gz - - echo "Installing compas_robots..." - ipy -X:Frames -m pip install --no-deps compas_robots.tar.gz - uses: NuGet/setup-nuget@v1.0.5 - - uses: compas-dev/compas-actions.ghpython_components@v5 - with: - source: src/compas_fab/ghpython/components - target: src/compas_fab/ghpython/components/ghuser - - name: Test import + + - name: Test import compas_fab run: | + $Env:IRONPYTHONPATH = python -c "import sysconfig; print(sysconfig.get_path('purelib'))" + echo "Setting IRONPYTHONPATH to $Env:IRONPYTHONPATH" echo "Testing import of compas_fab..." ipy -m compas_fab - env: - IRONPYTHONPATH: ./src - - name: Run tests + + - name: Run ipy tests run: | + $Env:IRONPYTHONPATH = python -c "import sysconfig; print(sysconfig.get_path('purelib'))" + echo "Setting IRONPYTHONPATH to $Env:IRONPYTHONPATH" echo "Running tests..." ipy tests/ipy_test_runner.py - env: - IRONPYTHONPATH: ./src + + - uses: compas-dev/compas-actions.ghpython_components@v5 + with: + source: src/compas_fab/ghpython/components + target: src/compas_fab/ghpython/components/ghuser + diff --git a/requirements.txt b/requirements.txt index 662a5f52f..e75f48b93 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ +# NOTE: Remember to also update the .github/workflows/ironpython.yml file compas >= 2.3, < 3 compas_robots @ git+https://github.com/compas-dev/compas_robots@a40673d # compas_robots >= 0.5, < 1