diff --git a/.docker/Dockerfile b/.docker/Dockerfile index 9b07c8197..626896ab9 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -1,17 +1,17 @@ -ARG from=diegoferigo/gym-ignition:pypi-master +ARG from=diegoferigo/gym-gz:pypi-master FROM ${from} # Install the PyPI package in a virtualenv ARG pip_options="" RUN virtualenv -p $(which python3) ${VIRTUAL_ENV} &&\ python -m pip install --upgrade pip &&\ - pip install ${pip_options} gym-ignition &&\ + pip install ${pip_options} gym-gz &&\ rm -r $HOME/.cache/pip # Clone the repository WORKDIR /github ARG branch="master" -RUN git clone -b ${branch} https://github.com/robotology/gym-ignition /github +RUN git clone -b ${branch} https://github.com/robotology/gym-gz /github # Reset the entrypoint ENTRYPOINT [""] diff --git a/.docker/base.Dockerfile b/.docker/base.Dockerfile index 5fca6ba22..1e3badb50 100644 --- a/.docker/base.Dockerfile +++ b/.docker/base.Dockerfile @@ -1,4 +1,4 @@ -ARG from=ubuntu:focal +ARG from=ubuntu:jammy FROM ${from} SHELL ["/bin/bash", "-c"] @@ -41,9 +41,9 @@ RUN apt-get update &&\ libgflags-dev \ python3-pip \ python3-wheel \ - python3.8 \ - python3.8-dev \ - libpython3.8-dev \ + python3.10 \ + python3.10-dev \ + libpython3.10-dev \ virtualenv \ swig \ &&\ diff --git a/.docker/cicd-devel.Dockerfile b/.docker/cicd-devel.Dockerfile index eb32c7cfa..58ba322aa 100644 --- a/.docker/cicd-devel.Dockerfile +++ b/.docker/cicd-devel.Dockerfile @@ -1,23 +1,23 @@ -ARG from=diegoferigo/gym-ignition:base +ARG from=andreaostuni/gym-gz:base FROM ${from} RUN pip3 install vcstool colcon-common-extensions &&\ rm -r $HOME/.cache/pip ARG CMAKE_BUILD_TYPE="Release" -ARG ignition_codename="fortress" -ARG IGNITION_DEFAULT_CHANNEL="stable" +ARG gazebo_codename="garden" +ARG GAZEBO_DEFAULT_CHANNEL="stable" -RUN echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-${IGNITION_DEFAULT_CHANNEL} `lsb_release -cs` main" > \ - /etc/apt/sources.list.d/gazebo-${IGNITION_DEFAULT_CHANNEL}.list &&\ +RUN echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-${GAZEBO_DEFAULT_CHANNEL} `lsb_release -cs` main" > \ + /etc/apt/sources.list.d/gazebo-${GAZEBO_DEFAULT_CHANNEL}.list &&\ wget http://packages.osrfoundation.org/gazebo.key -O - | apt-key add - &&\ apt-get update &&\ mkdir -p /workspace/src &&\ cd /workspace/src &&\ - wget https://raw.githubusercontent.com/ignition-tooling/gazebodistro/master/collection-${ignition_codename}.yaml &&\ - vcs import < collection-${ignition_codename}.yaml &&\ + wget https://raw.githubusercontent.com/gazebo-tooling/gazebodistro/master/collection-${gazebo_codename}.yaml &&\ + vcs import < collection-${gazebo_codename}.yaml &&\ apt -y install --no-install-recommends \ - $(sort -u $(find . -iname 'packages-'$(lsb_release -cs)'.apt' -o -iname 'packages.apt') | grep -v -E "dart|^libignition|^libsdformat" | tr '\n' ' ') &&\ + $(sort -u $(find . -iname 'packages-'$(lsb_release -cs)'.apt' -o -iname 'packages.apt') | grep -v -E "dart|^libgz|^libsdformat" | tr '\n' ' ') &&\ rm -rf /var/lib/apt/lists/* &&\ cd /workspace &&\ colcon graph &&\ diff --git a/.docker/cicd-master.Dockerfile b/.docker/cicd-master.Dockerfile index a7307c06d..1be7bcc55 100644 --- a/.docker/cicd-master.Dockerfile +++ b/.docker/cicd-master.Dockerfile @@ -1,13 +1,13 @@ -ARG from=diegoferigo/gym-ignition:base +ARG from=diegoferigo/gym-gz:base FROM ${from} # Install ignition gazebo -ARG ignition_codename="fortress" +ARG gazebo_codename="garden" RUN echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" \ > /etc/apt/sources.list.d/gazebo-stable.list &&\ wget http://packages.osrfoundation.org/gazebo.key -O - | apt-key add - &&\ apt-get update &&\ - apt-get install -y --no-install-recommends ignition-${ignition_codename} &&\ + apt-get install -y --no-install-recommends gz-${ignition_codename} &&\ rm -rf /var/lib/apt/lists/* COPY entrypoint.sh /entrypoint.sh diff --git a/.docker/docker-compose.yml b/.docker/docker-compose.yml index a630f09d9..463dd9ec6 100644 --- a/.docker/docker-compose.yml +++ b/.docker/docker-compose.yml @@ -8,7 +8,7 @@ services: from: ubuntu:focal context: . dockerfile: base.Dockerfile - image: diegoferigo/gym-ignition:base + image: diegoferigo/gym-gz:base # ====== # MASTER @@ -17,20 +17,20 @@ services: ci-master: build: args: - from: diegoferigo/gym-ignition:base - ignition_codename: dome + from: diegoferigo/gym-gz:base + gazebo_codename: dome context: . dockerfile: cicd-master.Dockerfile - image: diegoferigo/gym-ignition:ci-master + image: diegoferigo/gym-gz:ci-master pypi-master: build: args: - from: diegoferigo/gym-ignition:base - ignition_codename: dome + from: diegoferigo/gym-gz:base + gazebo_codename: dome context: . dockerfile: cicd-master.Dockerfile - image: diegoferigo/gym-ignition:pypi-master + image: diegoferigo/gym-gz:pypi-master # ===== # DEVEL @@ -39,22 +39,22 @@ services: ci-devel: build: args: - from: diegoferigo/gym-ignition:base - ignition_codename: fortress + from: diegoferigo/gym-gz:base + gazebo_codename: fortress CMAKE_BUILD_TYPE: Debug context: . dockerfile: cicd-devel.Dockerfile - image: diegoferigo/gym-ignition:ci-devel + image: diegoferigo/gym-gz:ci-devel pypi-devel: build: args: - from: diegoferigo/gym-ignition:base - ignition_codename: fortress + from: diegoferigo/gym-gz:base + gazebo_codename: fortress CMAKE_BUILD_TYPE: Release context: . dockerfile: cicd-devel.Dockerfile - image: diegoferigo/gym-ignition:pypi-devel + image: diegoferigo/gym-gz:pypi-devel # ==== # DEMO @@ -63,18 +63,18 @@ services: latest: build: args: - from: diegoferigo/gym-ignition:pypi-master + from: diegoferigo/gym-gz:pypi-master branch: master context: . dockerfile: Dockerfile - image: diegoferigo/gym-ignition:latest + image: diegoferigo/gym-gz:latest nightly: build: args: - from: diegoferigo/gym-ignition:ci-devel + from: diegoferigo/gym-gz:ci-devel branch: devel pip_options: --pre context: . dockerfile: Dockerfile - image: diegoferigo/gym-ignition:nightly + image: diegoferigo/gym-gz:nightly diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index ab4e4b95d..8e10bab8e 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -14,7 +14,7 @@ jobs: # ============= build-colcon: # ============= - name: 'colcon@${{ matrix.ignition }}' + name: 'colcon@${{ matrix.gazebo }}' if: | (github.event_name == 'push' && github.ref != 'refs/heads/master') || (github.event_name == 'pull_request' && github.event.pull_request.base.ref != 'master') @@ -22,10 +22,10 @@ jobs: strategy: fail-fast: false matrix: - ignition: + gazebo: # - dome # - edifice - - fortress + - garden env: CCACHE_DIR: ${{ github.workspace }}/.ccache steps: @@ -61,9 +61,9 @@ jobs: path: ${{ env.CCACHE_DIR }} # We include the commit sha in the cache key, as new cache entries are # only created if there is no existing entry for the key yet. - key: ${{ runner.os }}-ccache-${{ matrix.ignition }}-${{ github.sha }} + key: ${{ runner.os }}-ccache-${{ matrix.gazebo }}-${{ github.sha }} # Restore any ccache cache entry, if none for the key above exists - restore-keys: ${{ runner.os }}-ccache-${{ matrix.ignition }} + restore-keys: ${{ runner.os }}-ccache-${{ matrix.gazebo }} - name: '๐Ÿšš Enable ccache' run: | @@ -89,11 +89,11 @@ jobs: sudo chmod -R a+rw /workspace cd /workspace/src wget -O - ${TAGS_YAML} | vcs import - echo $(sort -u $(find . -iname 'packages-'$(lsb_release -cs)'.apt' -o -iname 'packages.apt') | grep -v -E "^libignition|^libsdformat" | tr '\n' ' ') \ + echo $(sort -u $(find . -iname 'packages-'$(lsb_release -cs)'.apt' -o -iname 'packages.apt') | grep -v -E "^libgz|^libsdformat" | tr '\n' ' ') \ > /workspace/install/pkg.txt xargs -a /workspace/install/pkg.txt sudo apt-get install -y --no-install-recommends env: - TAGS_YAML: https://raw.githubusercontent.com/ignition-tooling/gazebodistro/master/collection-${{ matrix.ignition }}.yaml + TAGS_YAML: https://raw.githubusercontent.com/gazebo-tooling/gazebodistro/master/collection-${{ matrix.gazebo }}.yaml - name: '๐Ÿ—๏ธ Build colcon workspace' run: | @@ -115,13 +115,13 @@ jobs: uses: actions/upload-artifact@v2 with: path: /tmp/workspace_install.tar.lz4 - name: workspace-${{ matrix.ignition }} + name: workspace-${{ matrix.gazebo }} retention-days: 1 # =============== build-and-test: # =============== - name: 'Build and Test [${{matrix.type}}|${{matrix.ignition}}|${{matrix.python}}]' + name: 'Build and Test [${{matrix.type}}|${{matrix.gazebo}}|${{matrix.python}}]' if: always() needs: [ build-colcon ] runs-on: ${{ matrix.os }} @@ -133,13 +133,12 @@ jobs: type: - User - Developer - ignition: + gazebo: # - dome # - edifice - - fortress + - garden python: - - 3.8 - - 3.9 + - 3.10 steps: - name: '๐Ÿ” Inspect Environment' @@ -175,7 +174,7 @@ jobs: run: git fetch --prune --unshallow # ================ - # Install Ignition + # Install Gazebo # ================ - name: 'โš™๏ธ Add osrf ppa' @@ -185,14 +184,14 @@ jobs: /etc/apt/sources.list.d/gazebo-stable.list' wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add - sudo apt-get update - - name: '[๐Ÿ”’๏ธ|stable] Install Ignition from ppa' + - name: '[๐Ÿ”’๏ธ|stable] Install Gazebo from ppa' if: | contains(matrix.os, 'ubuntu') && ( github.event_name == 'release' || github.ref == 'refs/heads/master' || (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'master') ) - run: sudo apt-get install -y --no-install-recommends ignition-${{ matrix.ignition }} + run: sudo apt-get install -y --no-install-recommends gz-${{ matrix.gazebo }} - name: '[๐Ÿงช|nightly] Download pre-built colcon workspace' uses: actions/download-artifact@v2 @@ -203,7 +202,7 @@ jobs: ) with: path: /tmp - name: workspace-${{ matrix.ignition }} + name: workspace-${{ matrix.gazebo }} - name: '[๐Ÿงช|nightly] Setup colcon workspace' if: | contains(matrix.os, 'ubuntu') && ( @@ -244,26 +243,26 @@ jobs: cmake -S . -B build/ \ -GNinja \ -DCMAKE_BUILD_TYPE=Debug \ - -DIGNITION_DISTRIBUTION=$(python3 -c "print('${{ matrix.ignition }}'.capitalize())") + -DGAZEBO_DISTRIBUTION=$(python3 -c "print('${{ matrix.gazebo }}'.capitalize())") sudo cmake --build build/ --target install - name: '[๐Ÿ‘ท|developer] Install Python ScenarIO' if: matrix.type == 'Developer' run: pip install -e ./scenario # User installation - - name: '[๐Ÿ‘ค|user] Create wheel (default ignition)' - if: matrix.type == 'User' && matrix.ignition == 'fortress' + - name: '[๐Ÿ‘ค|user] Create wheel (default gazebo)' + if: matrix.type == 'User' && matrix.gazebo == 'garden' shell: bash -i -e {0} run: pip wheel --use-feature=in-tree-build -v -w dist/ ./scenario # Note: Calling "pip wheel" with "--global-option" forces all dependencies to be built from their sdist. # Since it's very slow, we create the wheel from setup.py without isolation (requires system deps). - - name: '[๐Ÿ‘ค|user] Create wheel (custom ignition)' - if: matrix.type == 'User' && matrix.ignition != 'fortress' + - name: '[๐Ÿ‘ค|user] Create wheel (custom gazebo)' + if: matrix.type == 'User' && matrix.gazebo != 'gardern' shell: bash -i -e {0} run: | pip install wheel setuptools-scm cmake-build-extension python3 ./scenario/setup.py bdist_wheel \ - build_ext -DIGNITION_DISTRIBUTION=$(python3 -c "print('${{ matrix.ignition }}'.capitalize())") + build_ext -DGAZEBO_DISTRIBUTION=$(python3 -c "print('${{ matrix.gazebo }}'.capitalize())") - name: '[๐Ÿ‘ค|user] Install local wheel' if: matrix.type == 'User' run: pip install -v dist/scenario-*.whl @@ -275,10 +274,10 @@ jobs: tree $(python3 -c "import scenario, pathlib; print(pathlib.Path(scenario.__file__).parent)") # ==================== - # Install gym-ignition + # Install gym-gz # ==================== - - name: '๐Ÿ Install gym-ignition' + - name: '๐Ÿ Install gym-gz' run: pip install wheel && pip install .[all] # ============ @@ -286,7 +285,7 @@ jobs: # ============ - name: '๐Ÿ” Inspect installed versions' - run: pip list | grep -E "^scenario|^gym-ignition" + run: pip list | grep -E "^scenario|^gym-gz" - name: '[๐Ÿ|scenario] Python Tests' shell: bash -i -e {0} @@ -300,17 +299,17 @@ jobs: pip install colour-valgrind valgrind --log-file=/tmp/valgrind.log pytest -m "scenario" || colour-valgrind -t /tmp/valgrind.log - - name: '[๐Ÿ|gym-ignition] Python Tests' + - name: '[๐Ÿ|gym-gz] Python Tests' shell: bash -i -e {0} - run: pytest -m "gym_ignition" + run: pytest -m "gym_gz" - - name: '[๐Ÿšจ|gym-ignition] Python Tests with Valgrind' + - name: '[๐Ÿšจ|gym-gz] Python Tests with Valgrind' shell: bash -i -e {0} if: failure() run: | sudo apt-get install -y --no-install-recommends valgrind pip install colour-valgrind - valgrind --log-file=/tmp/valgrind.log pytest -m "gym_ignition" || colour-valgrind -t /tmp/valgrind.log + valgrind --log-file=/tmp/valgrind.log pytest -m "gym_gz" || colour-valgrind -t /tmp/valgrind.log # ============================ # Upload artifacts (only User) @@ -322,7 +321,7 @@ jobs: # We have to trick PyPI that our wheels are manylinux2014 even if they are not. # Unfortunately we cannot create self-contained wheels (neither the PEP600 perennial) - # due to the Ignition architecture. + # due to the Gazebo architecture. - name: '๐Ÿ“ Rename scenario wheel' if: matrix.type == 'User' && contains(matrix.os, 'ubuntu') run: | @@ -336,7 +335,7 @@ jobs: - name: 'โฌ†๏ธ Upload artifacts' uses: actions/upload-artifact@v2 - if: matrix.type == 'User' && matrix.ignition == 'fortress' + if: matrix.type == 'User' && matrix.gazebo == 'gardern' with: path: dist/* name: dist @@ -376,7 +375,7 @@ jobs: - name: 'โฌ†๏ธ Upload website folder' uses: actions/upload-artifact@v2 - if: matrix.type == 'User' && matrix.ignition == 'fortress' && contains(matrix.os, 'ubuntu') + if: matrix.type == 'User' && matrix.gazebo == 'garden' && contains(matrix.os, 'ubuntu') with: path: build/html name: website @@ -404,7 +403,7 @@ jobs: uses: JamesIves/github-pages-deploy-action@releases/v3 if: | github.event_name == 'push' && - github.repository == 'robotology/gym-ignition' && + github.repository == 'andreaostuni/gym-gz' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/devel') with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -434,7 +433,7 @@ jobs: - name: '๐Ÿ Initialize Python' uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: 3.10 - name: '๐Ÿ”€ Clone repository' uses: actions/checkout@master @@ -468,7 +467,7 @@ jobs: - name: '[๐Ÿ“ฆ|scenario]๏ธ Create sdist' run: python -m build --sdist scenario/ -o dist/ - - name: '[๐Ÿ“ฆ|gym-ignition]๏ธ Create sdist and wheel' + - name: '[๐Ÿ“ฆ|gym-gz]๏ธ Create sdist and wheel' run: python -m build . # ================ @@ -476,7 +475,7 @@ jobs: # ================ - name: '๐Ÿ—‘๏ธ Remove external packages' - run: find dist/ -type f -not \( -name '*scenario-*' -o -name '*gym_ignition-*' \) -delete -print + run: find dist/ -type f -not \( -name '*scenario-*' -o -name '*gym_gz-*' \) -delete -print - name: '๐Ÿ” Check packages' run: pipx run twine check dist/* @@ -538,7 +537,7 @@ jobs: - name: 'โฌ†๏ธ Publish packages to PyPI' if: | - github.repository == 'robotology/gym-ignition' && + github.repository == 'robotology/gym-gz' && ((github.event_name == 'release' && github.event.action == 'published') || (github.event_name == 'push' && github.ref == 'refs/heads/devel')) uses: pypa/gh-action-pypi-publish@master diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 9436106d8..011f91917 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -18,12 +18,12 @@ on: jobs: docker: - name: 'diegoferigo/gym-ignition:${{ matrix.tag }}' + name: 'andreaostuni/gym-gz:${{ matrix.tag }}' runs-on: ubuntu-latest strategy: max-parallel: 1 matrix: - baseimage: ['ubuntu:bionic'] + baseimage: ['ubuntu:jammy'] tag: - base - ci-master @@ -54,7 +54,7 @@ jobs: - name: Login if: | - github.repository == 'robotology/gym-ignition' && + github.repository == 'andreaostuni/gym-gz' && github.event_name != 'pull_request' && (github.event_name == 'schedule' || github.ref == 'refs/heads/devel') env: @@ -64,7 +64,7 @@ jobs: - name: Push if: | - github.repository == 'robotology/gym-ignition' && + github.repository == 'robotology/gym-gz' && github.event_name != 'pull_request' && (github.event_name == 'schedule' || github.ref == 'refs/heads/devel') - run: docker push diegoferigo/gym-ignition:${{ matrix.tag }} + run: docker push andreaostuni/gym-gz:${{ matrix.tag }} diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 36545acd9..f897fbed0 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -48,7 +48,7 @@ jobs: - name: '๐Ÿ Initialize Python' uses: actions/setup-python@v2 with: - python-version: "3.8" + python-version: "3.10" - name: "๐Ÿ“ Black Code Formatter" uses: psf/black@stable