diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 1eb01ad5e..c47d81bcb 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -259,12 +259,12 @@ jobs: if: matrix.type == 'User' && matrix.ignition != 'edifice' shell: bash -i -e {0} run: | - pip install setuptools-scm cmake-build-extension + pip install wheel setuptools-scm cmake-build-extension python3 ./scenario/setup.py bdist_wheel \ build_ext -DIGNITION_DISTRIBUTION=$(python3 -c "print('${{ matrix.ignition }}'.capitalize())") - name: '[👤|user] Install local wheel' if: matrix.type == 'User' - run: pip install -v dist/scenario*.whl + run: pip install -v dist/scenar-io-*.whl - name: '🔍️ Inspect installed ScenarIO package' if: matrix.type == 'User' && contains(matrix.os, 'ubuntu') @@ -277,7 +277,7 @@ jobs: # ==================== - name: '🐍 Install gym-ignition' - run: pip install wheel && pip install .[test,website] + run: pip install .[test,website] # ============ # Test project @@ -285,32 +285,30 @@ jobs: - name: '[🐍|scenario] Python Tests' shell: bash -i -e {0} - run: | - cd tests - pytest -m "scenario" + working-directory: tests + run: pytest -m "scenario" - name: '[🚨|scenario] Python Tests with Valgrind' shell: bash -i -e {0} + working-directory: tests if: failure() run: | sudo apt-get install -y --no-install-recommends valgrind pip install colour-valgrind - cd tests valgrind --log-file=/tmp/valgrind.log pytest -s -m "scenario" || colour-valgrind -t /tmp/valgrind.log - name: '[🐍|gym-ignition] Python Tests' shell: bash -i -e {0} - run: | - cd tests - pytest -m "gym_ignition" + working-directory: tests + run: pytest -m "gym_ignition" - name: '[🚨|gym-ignition] Python Tests with Valgrind' shell: bash -i -e {0} + working-directory: tests if: failure() run: | sudo apt-get install -y --no-install-recommends valgrind pip install colour-valgrind - cd tests valgrind --log-file=/tmp/valgrind.log pytest -s -m "gym_ignition" || colour-valgrind -t /tmp/valgrind.log # ============================ @@ -319,7 +317,7 @@ jobs: - name: '🗑️ Remove external wheels' if: matrix.type == 'User' - run: find dist/ -type f -not -name 'scenario-*' -delete -print + run: find dist/ -type f -not -name 'scenar_io-*' -delete -print # We have to trick PyPI that our wheels are manylinux2014 even if they are not. # Unfortunately we cannot create self-contained wheels due to the Ignition architecture. @@ -433,8 +431,8 @@ jobs: uses: actions/setup-python@v2 with: python-version: 3.8 - - name: '🐍 Install sdist dependencies' - run: pip install wheel setuptools-scm cmake-build-extension + - name: '⬇️️ Install dependencies' + run: pip install build - name: '🔀 Clone repository' uses: actions/checkout@master @@ -459,20 +457,23 @@ jobs: # =============== - name: '[📦|scenario]️ Create sdist' - run: python3 scenario/setup.py sdist + run: python -m build --sdist scenario/ - name: '[📦|gym-ignition]️ Create sdist' - run: python3 setup.py sdist + run: python -m build --sdist . - name: '[📦|gym-ignition]️ Create wheel' - run: pip wheel --find-links=dist/ -w dist/ . + run: python -m build --wheel . # ================ # Upload artifacts # ================ - name: '🗑️ Remove external wheels' - run: find dist/ -type f -not \( -name '*scenario-*' -o -name '*gym_ignition-*' -o -name 'gym-ignition-*' \) -delete -print + run: find dist/ -type f -not \( -name '*scenario-*' -o -name '*scenar_io-*' -o -name 'gym-ignition-*' -o -name '*gym_ignition-*' \) -delete -print + + - name: '🔍 Check packages' + run: pipx run twine check dist/* - name: '🔍 Inspect dist folder' run: ls -lah dist/