From 894c3490e7d3fd6278079f908060fbac074fd529 Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 13 Mar 2024 15:41:35 +0100 Subject: [PATCH 01/17] [ci] updated ci --- .github/workflows/new-pycram-ci.yml | 75 +++++++++++++++++++ .github/workflows/pycram-ci.yml | 88 ----------------------- .github/workflows/update-docker-image.yml | 30 ++++++++ docker/Dockerfile | 23 ++++++ 4 files changed, 128 insertions(+), 88 deletions(-) create mode 100644 .github/workflows/new-pycram-ci.yml delete mode 100644 .github/workflows/pycram-ci.yml create mode 100644 .github/workflows/update-docker-image.yml create mode 100644 docker/Dockerfile diff --git a/.github/workflows/new-pycram-ci.yml b/.github/workflows/new-pycram-ci.yml new file mode 100644 index 000000000..94f1bf383 --- /dev/null +++ b/.github/workflows/new-pycram-ci.yml @@ -0,0 +1,75 @@ +name: pycram_docker_ci +defaults: + run: + shell: bash -ieo pipefail {0} + +on: + push: + branches: + - dev + - master + pull_request: + branches: + - master + - dev + workflow_dispatch: # For manual debugging + inputs: + debug_enabled: + type: boolean + required: false + default: false + description: "Run tmate session" + +jobs: + build_and_run_tests: + runs-on: ubuntu-20.04 + container: + image: ${{ vars.DOCKER_IMAGE}} #add docker image variable to repo + steps: + - name: Checkout PyCRAM + uses: actions/checkout@v3 + with: + path: "ros/src/pycram" + repository: ${{ github.repository }} + ref: ${{ github.ref }} + submodules: "recursive" + + - name: Update PyCRAM source files + run: | + rm -rf /opt/ros/overlay_ws/src/pycram/* + cd /opt/ros/overlay_ws/src/pycram + rm -rf .git .github .gitignore .gitmodules .readthedocs.yaml + mv /__w/pycram_CI/pycram_CI/ros/src/pycram /opt/ros/overlay_ws/src + + - name: Remake workspace & start roscore + run: | + sudo -s + source /opt/ros/noetic/setup.bash + cd /opt/ros/overlay_ws + catkin_make + source /opt/ros/overlay_ws/devel/setup.bash + roslaunch pycram ik_and_description.launch & + + - name: Install python dependencies + run: | + pip3 install --upgrade pip --root-user-action=ignore + cd /opt/ros/overlay_ws/src/pycram + pip3 install -r requirements.txt + + - name: Install Pytest, pyjpt & mlflow + run: | + pip3 install --ignore-installed pytest pyjpt mlflow + + - name: Run tests + run: | + sudo -s + source /opt/ros/noetic/setup.bash + cd /opt/ros/overlay_ws + source /opt/ros/overlay_ws/devel/setup.bash + roscd pycram + pytest -v test + + # For debugging + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 + if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} diff --git a/.github/workflows/pycram-ci.yml b/.github/workflows/pycram-ci.yml deleted file mode 100644 index 2c0e299c9..000000000 --- a/.github/workflows/pycram-ci.yml +++ /dev/null @@ -1,88 +0,0 @@ -name: CI standalone -defaults: - run: - shell: bash -ieo pipefail {0} -on: - push: - branches: - - dev - - master - pull_request: - branches: - - master - - dev -jobs: - Build_and_run_Tests: - runs-on: ubuntu-20.04 - steps: - - name: Checkout pycram - uses: actions/checkout@v3 - with: - path: 'ros_ws/src/pycram' - repository: ${{github.repository}} - ref: ${{github.ref}} - submodules: recursive - - - name: Checkout iai_maps - uses: actions/checkout@v3 - with: - path: 'ros_ws/src/iai_maps' - repository: code-iai/iai_maps - ref: master - - name: Checkout iai_robots - uses: actions/checkout@v3 - with: - path: 'ros_ws/src/iai_robots' - repository: code-iai/iai_robots - ref: master - - name: Checkout pr2_common - uses: actions/checkout@v3 - with: - path: 'ros_ws/src/pr2_common' - repository: PR2/pr2_common - ref: master - - name: Checkout kdl_ik_service - uses: actions/checkout@v3 - with: - path: 'ros_ws/src/kdl_ik_service' - repository: cram2/kdl_ik_service - ref: master - - name: Checkout pr2_kinematics - uses: actions/checkout@v3 - with: - path: 'ros_ws/src/pr2_kinematics' - repository: PR2/pr2_kinematics - ref: kinetic-devel - - name: install ros and deps - uses: betwo/github-setup-catkin@master - env: - ACTIONS_ALLOW_UNSECURE_COMMANDS: true - with: - # Version range or exact version of ROS version to use, using SemVer's version range syntax. - ros-version: noetic - build-tool: 'catkin_tools' - # Root directory of the catkin workspace - workspace: $GITHUB_WORKSPACE/ros_ws - - name: build and source workspace - run: | - cd ros_ws - catkin_make - echo 'export ROS_HOSTNAME=localhost' >> ~/.bashrc - echo 'source $GITHUB_WORKSPACE/ros_ws/devel/setup.bash' >> ~/.bashrc - - name: Upgrade pip - run: | - sudo pip3 install --upgrade pip - - name: Install requirements - run: | - cd $GITHUB_WORKSPACE/ros_ws/src/pycram - sudo pip3 install -r requirements.txt - - name: install additional requirements - run: | - sudo pip3 install --ignore-installed pytest pyjpt mlflow - - name: start roscore - run: | - roslaunch pycram ik_and_description.launch & - - name: Run Tests - run: | - roscd pycram - pytest -v test diff --git a/.github/workflows/update-docker-image.yml b/.github/workflows/update-docker-image.yml new file mode 100644 index 000000000..88134cbac --- /dev/null +++ b/.github/workflows/update-docker-image.yml @@ -0,0 +1,30 @@ +name: update_docker_image +on: + workflow_run: + workflows: ["pycram_docker_ci"] + types: + - completed + +# Runs if pycram_docker_ci workflow WAS successfuL +jobs: + build_and_push_docker_image: + runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.conclusion == 'success' }} + steps: + - uses: actions/checkout@v4 + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + + - name: log into Docker Hub #Set repository secrets in github secrets + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASS }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: ./docker + push: true + tags: ${{ secrets.DOCKERHUB_USERNAME}}/testing_ci:latest \ No newline at end of file diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 000000000..eb4d13768 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,23 @@ +ARG FROM_IMAGE=ros:noetic-ros-core +ARG OVERLAY_WS=/opt/ros/overlay_ws + +FROM $FROM_IMAGE as cacher +ARG OVERLAY_WS +WORKDIR $OVERLAY_WS/src + +RUN apt-get update && apt-get install python3-pip python3-vcstool git -y && pip3 install pip --upgrade +RUN pip3 install rosdep && rosdep init + +# Checks PyCRAM repo for latest commit --> will rebuild if there is a new commit +ADD "https://api.github.com/repos/cram2/pycram/commits?per_page=1" latest_commit +RUN vcs import --input https://raw.githubusercontent.com/cram2/pycram/dev/pycram-https.rosinstall --recursive --skip-existing $OVERLAY_WS/src +RUN rosdep update && rosdep install --from-paths $OVERLAY_WS/src --ignore-src -r -y + +RUN . /opt/ros/noetic/setup.sh && cd $OVERLAY_WS && catkin_make +RUN echo "source $OVERLAY_WS/devel/setup.bash" >> ~/.bashrc + +RUN pip3 install --upgrade pip +WORKDIR $OVERLAY_WS/src/pycram +RUN pip3 install -r requirements.txt + +EXPOSE 11311 \ No newline at end of file From 0a83656abbb49a71f9036da0207ba076724ab445 Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 13 Mar 2024 15:52:39 +0100 Subject: [PATCH 02/17] [ci] updated ci --- .github/workflows/new-pycram-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new-pycram-ci.yml b/.github/workflows/new-pycram-ci.yml index 94f1bf383..a2e17b461 100644 --- a/.github/workflows/new-pycram-ci.yml +++ b/.github/workflows/new-pycram-ci.yml @@ -39,7 +39,7 @@ jobs: rm -rf /opt/ros/overlay_ws/src/pycram/* cd /opt/ros/overlay_ws/src/pycram rm -rf .git .github .gitignore .gitmodules .readthedocs.yaml - mv /__w/pycram_CI/pycram_CI/ros/src/pycram /opt/ros/overlay_ws/src + mv ${{github.workspace}}/ros/src/pycram /opt/ros/overlay_ws/src - name: Remake workspace & start roscore run: | From 8cd68fbb72d6e56835b23c87fde0cff40161070b Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 13 Mar 2024 15:55:36 +0100 Subject: [PATCH 03/17] [ci] updated ci --- .github/workflows/new-pycram-ci.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/new-pycram-ci.yml b/.github/workflows/new-pycram-ci.yml index a2e17b461..c56dd5dbb 100644 --- a/.github/workflows/new-pycram-ci.yml +++ b/.github/workflows/new-pycram-ci.yml @@ -34,6 +34,11 @@ jobs: ref: ${{ github.ref }} submodules: "recursive" + # For debugging + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 + if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} + - name: Update PyCRAM source files run: | rm -rf /opt/ros/overlay_ws/src/pycram/* @@ -69,7 +74,4 @@ jobs: roscd pycram pytest -v test - # For debugging - - name: Setup tmate session - uses: mxschmitt/action-tmate@v3 - if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} + From e442242d3e03c3a9336671098dfe05a3ee0ddfd5 Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 13 Mar 2024 15:58:23 +0100 Subject: [PATCH 04/17] [ci] updated ci --- .github/workflows/new-pycram-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new-pycram-ci.yml b/.github/workflows/new-pycram-ci.yml index c56dd5dbb..5499e0408 100644 --- a/.github/workflows/new-pycram-ci.yml +++ b/.github/workflows/new-pycram-ci.yml @@ -44,7 +44,7 @@ jobs: rm -rf /opt/ros/overlay_ws/src/pycram/* cd /opt/ros/overlay_ws/src/pycram rm -rf .git .github .gitignore .gitmodules .readthedocs.yaml - mv ${{github.workspace}}/ros/src/pycram /opt/ros/overlay_ws/src + mv /__w/pycram/pycram/ros/src/pycram /opt/ros/overlay_ws/src - name: Remake workspace & start roscore run: | From 2cb6e7eaab91f67efe39d5d90da7cda557a2f227 Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 13 Mar 2024 16:06:06 +0100 Subject: [PATCH 05/17] [ci] updated ci --- .github/workflows/new-pycram-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new-pycram-ci.yml b/.github/workflows/new-pycram-ci.yml index 5499e0408..7830494f5 100644 --- a/.github/workflows/new-pycram-ci.yml +++ b/.github/workflows/new-pycram-ci.yml @@ -44,7 +44,7 @@ jobs: rm -rf /opt/ros/overlay_ws/src/pycram/* cd /opt/ros/overlay_ws/src/pycram rm -rf .git .github .gitignore .gitmodules .readthedocs.yaml - mv /__w/pycram/pycram/ros/src/pycram /opt/ros/overlay_ws/src + mv /__w/${{ github.event.repository.name }} /${{ github.event.repository.name }} //ros/src/pycram /opt/ros/overlay_ws/src - name: Remake workspace & start roscore run: | From 3291a15703904f839536fa90c54d52ba23d04e60 Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 13 Mar 2024 16:08:08 +0100 Subject: [PATCH 06/17] [ci] updated ci --- .github/workflows/new-pycram-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new-pycram-ci.yml b/.github/workflows/new-pycram-ci.yml index 7830494f5..456445ad2 100644 --- a/.github/workflows/new-pycram-ci.yml +++ b/.github/workflows/new-pycram-ci.yml @@ -44,7 +44,7 @@ jobs: rm -rf /opt/ros/overlay_ws/src/pycram/* cd /opt/ros/overlay_ws/src/pycram rm -rf .git .github .gitignore .gitmodules .readthedocs.yaml - mv /__w/${{ github.event.repository.name }} /${{ github.event.repository.name }} //ros/src/pycram /opt/ros/overlay_ws/src + mv /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }}/ros/src/pycram /opt/ros/overlay_ws/src - name: Remake workspace & start roscore run: | From 8d44961792b5938d40876c58e3975ef87eb97bbb Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 13 Mar 2024 16:26:34 +0100 Subject: [PATCH 07/17] [ci] updated ci --- .github/workflows/update-docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-docker-image.yml b/.github/workflows/update-docker-image.yml index 88134cbac..dc28d468d 100644 --- a/.github/workflows/update-docker-image.yml +++ b/.github/workflows/update-docker-image.yml @@ -27,4 +27,4 @@ jobs: with: context: ./docker push: true - tags: ${{ secrets.DOCKERHUB_USERNAME}}/testing_ci:latest \ No newline at end of file + tags: ${{ secrets.DOCKERHUB_USERNAME }}/testing_ci:latest \ No newline at end of file From c014de1c293b9c5251854ce49074390731cb0fe5 Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 13 Mar 2024 16:27:42 +0100 Subject: [PATCH 08/17] [ci] updated ci --- .github/workflows/update-docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-docker-image.yml b/.github/workflows/update-docker-image.yml index dc28d468d..f641e6231 100644 --- a/.github/workflows/update-docker-image.yml +++ b/.github/workflows/update-docker-image.yml @@ -27,4 +27,4 @@ jobs: with: context: ./docker push: true - tags: ${{ secrets.DOCKERHUB_USERNAME }}/testing_ci:latest \ No newline at end of file + tags: ${{ vars.DOCKER_IMAGE }} \ No newline at end of file From 2c7c2c82633dc9d4c389a07939ae0b92b78b397f Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 13 Mar 2024 16:33:02 +0100 Subject: [PATCH 09/17] [ci] updated ci --- .github/workflows/update-docker-image.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/update-docker-image.yml b/.github/workflows/update-docker-image.yml index f641e6231..fb0ec9d70 100644 --- a/.github/workflows/update-docker-image.yml +++ b/.github/workflows/update-docker-image.yml @@ -4,6 +4,12 @@ on: workflows: ["pycram_docker_ci"] types: - completed + workflow_dispatch: # For manual debugging + inputs: + manually_build_and_push_image: + type: boolean + required: false + default: false # Runs if pycram_docker_ci workflow WAS successfuL jobs: From cd13d390ddd336abcbf5bcad64e86a70c6a15ef2 Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 13 Mar 2024 16:35:34 +0100 Subject: [PATCH 10/17] [ci] updated ci --- .github/workflows/update-docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-docker-image.yml b/.github/workflows/update-docker-image.yml index fb0ec9d70..37d91c35f 100644 --- a/.github/workflows/update-docker-image.yml +++ b/.github/workflows/update-docker-image.yml @@ -15,7 +15,7 @@ on: jobs: build_and_push_docker_image: runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'success' }} + if: ${{ github.event.workflow_run.conclusion == 'success' || github.event.workflow_dispatch.inputs == 'manually_build_and_push_iamge'}} steps: - uses: actions/checkout@v4 - name: Set up Docker Buildx From 7e1779b781aa4b66ad386f4a0ce94ef24fa790c7 Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 13 Mar 2024 16:36:47 +0100 Subject: [PATCH 11/17] [ci] updated ci --- .github/workflows/update-docker-image.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/update-docker-image.yml b/.github/workflows/update-docker-image.yml index 37d91c35f..aef452d4a 100644 --- a/.github/workflows/update-docker-image.yml +++ b/.github/workflows/update-docker-image.yml @@ -4,18 +4,13 @@ on: workflows: ["pycram_docker_ci"] types: - completed - workflow_dispatch: # For manual debugging - inputs: - manually_build_and_push_image: - type: boolean - required: false - default: false + workflow_dispatch: # manual run # Runs if pycram_docker_ci workflow WAS successfuL jobs: build_and_push_docker_image: runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'success' || github.event.workflow_dispatch.inputs == 'manually_build_and_push_iamge'}} + #if: ${{ github.event.workflow_run.conclusion == 'success'}} steps: - uses: actions/checkout@v4 - name: Set up Docker Buildx From faa487e1e120e2f2140cd71f37171548e97e949c Mon Sep 17 00:00:00 2001 From: Leo <114857318+leonyi4@users.noreply.github.com> Date: Thu, 14 Mar 2024 12:09:55 +0100 Subject: [PATCH 12/17] [ci] updating ci --- .github/workflows/update-docker-image.yml | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/update-docker-image.yml b/.github/workflows/update-docker-image.yml index aef452d4a..858418f08 100644 --- a/.github/workflows/update-docker-image.yml +++ b/.github/workflows/update-docker-image.yml @@ -1,16 +1,22 @@ name: update_docker_image on: - workflow_run: + workflow_run: workflows: ["pycram_docker_ci"] - types: + types: - completed workflow_dispatch: # manual run + inputs: + manual_run: + description: "build and push manually" + type: boolean + default: false + required: false -# Runs if pycram_docker_ci workflow WAS successfuL +# Runs if pycram_docker_ci workflow Wwa successful jobs: - build_and_push_docker_image: + build_and_push_docker_image: runs-on: ubuntu-latest - #if: ${{ github.event.workflow_run.conclusion == 'success'}} + #if: ${{ (github.event.workflow_run.conclusion == 'success') || (github.event.inputs.manual_run)}} steps: - uses: actions/checkout@v4 - name: Set up Docker Buildx @@ -20,12 +26,12 @@ jobs: - name: log into Docker Hub #Set repository secrets in github secrets uses: docker/login-action@v3 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} + username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_PASS }} - name: Build and push uses: docker/build-push-action@v5 - with: + with: context: ./docker push: true - tags: ${{ vars.DOCKER_IMAGE }} \ No newline at end of file + tags: ${{ vars.DOCKER_IMAGE }} From eecc20187831392a777538f9837758b72310ac2a Mon Sep 17 00:00:00 2001 From: Leo <114857318+leonyi4@users.noreply.github.com> Date: Thu, 14 Mar 2024 12:10:09 +0100 Subject: [PATCH 13/17] [ci] updating ci --- .github/workflows/update-docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-docker-image.yml b/.github/workflows/update-docker-image.yml index 858418f08..df46c0f98 100644 --- a/.github/workflows/update-docker-image.yml +++ b/.github/workflows/update-docker-image.yml @@ -16,7 +16,7 @@ on: jobs: build_and_push_docker_image: runs-on: ubuntu-latest - #if: ${{ (github.event.workflow_run.conclusion == 'success') || (github.event.inputs.manual_run)}} + if: ${{ (github.event.workflow_run.conclusion == 'success') || (github.event.inputs.manual_run)}} steps: - uses: actions/checkout@v4 - name: Set up Docker Buildx From cf89c703a33d2796a1637cc89fefd95d396a88c3 Mon Sep 17 00:00:00 2001 From: Leo <114857318+leonyi4@users.noreply.github.com> Date: Thu, 14 Mar 2024 12:22:15 +0100 Subject: [PATCH 14/17] [ci] updating ci --- .github/workflows/new-pycram-ci.yml | 6 ++---- docker/Dockerfile | 2 -- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/new-pycram-ci.yml b/.github/workflows/new-pycram-ci.yml index 456445ad2..58b2d5624 100644 --- a/.github/workflows/new-pycram-ci.yml +++ b/.github/workflows/new-pycram-ci.yml @@ -37,7 +37,7 @@ jobs: # For debugging - name: Setup tmate session uses: mxschmitt/action-tmate@v3 - if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} + if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} - name: Update PyCRAM source files run: | @@ -61,7 +61,7 @@ jobs: cd /opt/ros/overlay_ws/src/pycram pip3 install -r requirements.txt - - name: Install Pytest, pyjpt & mlflow + - name: Install pytest, pyjpt & mlflow run: | pip3 install --ignore-installed pytest pyjpt mlflow @@ -73,5 +73,3 @@ jobs: source /opt/ros/overlay_ws/devel/setup.bash roscd pycram pytest -v test - - diff --git a/docker/Dockerfile b/docker/Dockerfile index eb4d13768..e85fb2af8 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -8,8 +8,6 @@ WORKDIR $OVERLAY_WS/src RUN apt-get update && apt-get install python3-pip python3-vcstool git -y && pip3 install pip --upgrade RUN pip3 install rosdep && rosdep init -# Checks PyCRAM repo for latest commit --> will rebuild if there is a new commit -ADD "https://api.github.com/repos/cram2/pycram/commits?per_page=1" latest_commit RUN vcs import --input https://raw.githubusercontent.com/cram2/pycram/dev/pycram-https.rosinstall --recursive --skip-existing $OVERLAY_WS/src RUN rosdep update && rosdep install --from-paths $OVERLAY_WS/src --ignore-src -r -y From 9195a493293e1a7eb50d600f9cd1d6d7784f8c40 Mon Sep 17 00:00:00 2001 From: "Nyi Nyein Aung (Leo)" <114857318+leonyi4@users.noreply.github.com> Date: Fri, 15 Mar 2024 12:48:17 +0100 Subject: [PATCH 15/17] [ci] removed uncessary lines --- .github/workflows/new-pycram-ci.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/new-pycram-ci.yml b/.github/workflows/new-pycram-ci.yml index 58b2d5624..35e1142df 100644 --- a/.github/workflows/new-pycram-ci.yml +++ b/.github/workflows/new-pycram-ci.yml @@ -66,10 +66,7 @@ jobs: pip3 install --ignore-installed pytest pyjpt mlflow - name: Run tests - run: | - sudo -s - source /opt/ros/noetic/setup.bash - cd /opt/ros/overlay_ws + run: | source /opt/ros/overlay_ws/devel/setup.bash roscd pycram pytest -v test From 21e7759a426f6bb8f9d523977221b5eab07fd36f Mon Sep 17 00:00:00 2001 From: "Nyi Nyein Aung (Leo)" <114857318+leonyi4@users.noreply.github.com> Date: Fri, 15 Mar 2024 15:36:03 +0100 Subject: [PATCH 16/17] [ci] updated workflow condition for building docker image --- .github/workflows/update-docker-image.yml | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/.github/workflows/update-docker-image.yml b/.github/workflows/update-docker-image.yml index df46c0f98..8c6686c2c 100644 --- a/.github/workflows/update-docker-image.yml +++ b/.github/workflows/update-docker-image.yml @@ -1,22 +1,16 @@ name: update_docker_image on: - workflow_run: - workflows: ["pycram_docker_ci"] - types: - - completed - workflow_dispatch: # manual run - inputs: - manual_run: - description: "build and push manually" - type: boolean - default: false - required: false + push: + branches: + - master + - dev + paths: + - 'requirements.txt' +# only run when a commit has changes in the requirements.txt file -# Runs if pycram_docker_ci workflow Wwa successful jobs: build_and_push_docker_image: runs-on: ubuntu-latest - if: ${{ (github.event.workflow_run.conclusion == 'success') || (github.event.inputs.manual_run)}} steps: - uses: actions/checkout@v4 - name: Set up Docker Buildx From db2d5a92c5675f6df394f0b01bf91f8b714c2237 Mon Sep 17 00:00:00 2001 From: "Nyi Nyein Aung (Leo)" <114857318+leonyi4@users.noreply.github.com> Date: Wed, 20 Mar 2024 09:30:35 +0100 Subject: [PATCH 17/17] [ci] update ci pipeline hardcode docker image into workflow --- .github/workflows/new-pycram-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new-pycram-ci.yml b/.github/workflows/new-pycram-ci.yml index 35e1142df..07678b99d 100644 --- a/.github/workflows/new-pycram-ci.yml +++ b/.github/workflows/new-pycram-ci.yml @@ -24,7 +24,7 @@ jobs: build_and_run_tests: runs-on: ubuntu-20.04 container: - image: ${{ vars.DOCKER_IMAGE}} #add docker image variable to repo + image: "pycram/pycram:dev" steps: - name: Checkout PyCRAM uses: actions/checkout@v3