From 2e9cb5c27147ad25487d3821e7ffc37ed2b589d2 Mon Sep 17 00:00:00 2001 From: Aaron Chong Date: Thu, 4 Jul 2024 10:53:51 +0800 Subject: [PATCH] Revert "Port CI fixes from #955 but targeting ubuntu 22 and ROS 2 Humble" This reverts commit 1fd22eec62c8601ee1b6cbae3c7ed96833ea47ba. --- .github/actions/bootstrap/action.yml | 12 ++++++++- .github/minimal-rmf/Dockerfile | 34 -------------------------- .github/workflows/api-client.yml | 10 +------- .github/workflows/api-server.yml | 17 +++++++------ .github/workflows/dashboard.yml | 15 +++++++----- .github/workflows/react-components.yml | 16 +++++------- .github/workflows/rmf-auth.yml | 10 +------- .github/workflows/ros-translator.yml | 11 +++++---- 8 files changed, 43 insertions(+), 82 deletions(-) delete mode 100644 .github/minimal-rmf/Dockerfile diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index 7e045a3c1..490b293c0 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -11,8 +11,18 @@ inputs: runs: using: composite steps: + - uses: pnpm/action-setup@v2.2.2 + with: + version: '8.15.7' + - uses: actions/setup-node@v2 + with: + node-version: '16' + cache: 'pnpm' + - name: Install pipenv + run: pip3 install pipenv + shell: bash - name: Install dependencies - run: pnpm install -w --filter ${{ inputs.package }}... + run: pnpm install -w --filter ${{ inputs.package }}... --no-frozen-lockfile shell: bash - name: Build if: '!${{ inputs.skip-build }}' diff --git a/.github/minimal-rmf/Dockerfile b/.github/minimal-rmf/Dockerfile deleted file mode 100644 index e11a92d32..000000000 --- a/.github/minimal-rmf/Dockerfile +++ /dev/null @@ -1,34 +0,0 @@ -ARG BASE_IMAGE=docker.io/ros:humble-ros-base -FROM $BASE_IMAGE -ARG BRANCH=main -ARG ROS_DISTRO=humble - -### build minimal rmf - -RUN apt update && apt install -y curl - -# # fetch sources -RUN mkdir -p /rmf && cd /rmf \ - && curl -sL https://github.com/open-rmf/rmf_internal_msgs/archive/refs/heads/$BRANCH.tar.gz -o rmf_internal_msgs.tar.gz \ - && curl -sL https://github.com/open-rmf/rmf_building_map_msgs/archive/refs/heads/$BRANCH.tar.gz -o rmf_building_map_msgs.tar.gz \ - && mkdir -p /rmf/src/rmf/rmf_internal_msgs && tar zxf rmf_internal_msgs.tar.gz -C /rmf/src/rmf/rmf_internal_msgs --strip-components=1 && rm rmf_internal_msgs.tar.gz \ - && mkdir -p /rmf/src/rmf/rmf_building_map_msgs && tar zxf rmf_building_map_msgs.tar.gz -C /rmf/src/rmf/rmf_building_map_msgs --strip-components=1 && rm rmf_building_map_msgs.tar.gz - -RUN rosdep update && rosdep install --from-paths /rmf/src -yi - -RUN cd /rmf \ - && . /opt/ros/$ROS_DISTRO/setup.sh \ - && colcon build --merge-install --install-base /opt/rmf --cmake-args -DCMAKE_BUILD_TYPE=Release \ - && rm -rf /rmf - -# install tools for rmf-web - -RUN curl -fsSL https://get.pnpm.io/install.sh | bash - -# shell runs in non-interactive mode, which does not source .bashrc so we need to set the PATH manually -ENV PNPM_HOME /root/.local/share/pnpm -ENV PATH "$PNPM_HOME:$PATH" - -# nodejs seems to have changed the official mirror, the default in pnpm is very slow now -RUN pnpm config -g set 'node-mirror:release' https://nodejs.org/dist && pnpm env use --global lts - -RUN apt update && apt install -y python3-venv diff --git a/.github/workflows/api-client.yml b/.github/workflows/api-client.yml index 5e1dc10c5..d08438463 100644 --- a/.github/workflows/api-client.yml +++ b/.github/workflows/api-client.yml @@ -7,24 +7,16 @@ on: push: branches: - main -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true jobs: unit-tests: name: Unit Tests runs-on: ubuntu-22.04 - container: - image: ghcr.io/${{ github.repository }}/minimal-rmf - credentials: - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} defaults: run: shell: bash working-directory: packages/api-client steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v2 - name: bootstrap uses: ./.github/actions/bootstrap with: diff --git a/.github/workflows/api-server.yml b/.github/workflows/api-server.yml index 8c9d11582..fb0a60e20 100644 --- a/.github/workflows/api-server.yml +++ b/.github/workflows/api-server.yml @@ -7,9 +7,6 @@ on: push: branches: - main -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true env: CI: true PIPENV_VERBOSITY: -1 @@ -18,24 +15,28 @@ jobs: name: Tests runs-on: ubuntu-22.04 container: - image: ghcr.io/${{ github.repository }}/minimal-rmf + image: ghcr.io/${{ github.repository }}/e2e credentials: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} + defaults: + run: shell: bash working-directory: packages/api-server steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v2 + - name: setup python + run: apt update && apt install -y python3-venv python-is-python3 - name: bootstrap uses: ./.github/actions/bootstrap with: package: api-server - name: tests run: | - . /opt/rmf/setup.bash + . /rmf_demos_ws/install/setup.bash pnpm run lint - pnpm run test:cov -v - ../../.venv/bin/python -m coverage xml + pnpm run test:cov + pipenv run python -m coverage xml - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 with: diff --git a/.github/workflows/dashboard.yml b/.github/workflows/dashboard.yml index ecb6cf6a8..ad17be889 100644 --- a/.github/workflows/dashboard.yml +++ b/.github/workflows/dashboard.yml @@ -11,9 +11,6 @@ on: push: branches: - main -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true env: CI: true jobs: @@ -21,21 +18,27 @@ jobs: name: Unit Tests runs-on: ubuntu-22.04 container: - image: ghcr.io/${{ github.repository }}/minimal-rmf + image: ghcr.io/${{ github.repository }}/e2e credentials: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} + defaults: + run: shell: bash working-directory: packages/dashboard steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v2 + - name: setup python + run: apt update && apt install -y python3-venv python-is-python3 - name: bootstrap + env: + NODE_OPTIONS: '--max_old_space_size=4096' uses: ./.github/actions/bootstrap with: package: rmf-dashboard skip-build: true - name: unit test - run: pnpm run test:coverage + run: . /rmf_demos_ws/install/setup.bash && pnpm run test:coverage - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 with: diff --git a/.github/workflows/react-components.yml b/.github/workflows/react-components.yml index 19bea24ef..113de202c 100644 --- a/.github/workflows/react-components.yml +++ b/.github/workflows/react-components.yml @@ -8,26 +8,22 @@ on: push: branches: - main -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true env: CI: true jobs: unit-tests: name: Unit Tests runs-on: ubuntu-22.04 - container: - image: ghcr.io/${{ github.repository }}/minimal-rmf - credentials: - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} defaults: run: shell: bash working-directory: packages/react-components + env: + BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} + BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} + BROWSERSTACK_BUILD: ${{ github.head_ref }}:${{ github.event.number }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v2 - name: bootstrap uses: ./.github/actions/bootstrap with: @@ -41,4 +37,4 @@ jobs: - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 with: - flags: react-components \ No newline at end of file + flags: react-components diff --git a/.github/workflows/rmf-auth.yml b/.github/workflows/rmf-auth.yml index d119b59f6..02c8eb915 100644 --- a/.github/workflows/rmf-auth.yml +++ b/.github/workflows/rmf-auth.yml @@ -7,26 +7,18 @@ on: push: branches: - main -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true env: CI: true jobs: unit-tests: name: Unit Tests runs-on: ubuntu-22.04 - container: - image: ghcr.io/${{ github.repository }}/minimal-rmf - credentials: - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} defaults: run: shell: bash working-directory: packages/rmf-auth steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v2 - name: bootstrap uses: ./.github/actions/bootstrap with: diff --git a/.github/workflows/ros-translator.yml b/.github/workflows/ros-translator.yml index 0bd5cf186..ac3082e1a 100644 --- a/.github/workflows/ros-translator.yml +++ b/.github/workflows/ros-translator.yml @@ -7,9 +7,6 @@ on: push: branches: - main -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true env: CI: true jobs: @@ -17,14 +14,18 @@ jobs: name: Unit Tests runs-on: ubuntu-22.04 container: - image: ghcr.io/${{ github.repository }}/minimal-rmf + image: ghcr.io/${{ github.repository }}/e2e credentials: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} + defaults: + run: shell: bash working-directory: packages/ros-translator steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v2 + - name: setup python + run: apt update && apt install -y python3-venv python-is-python3 - name: bootstrap uses: ./.github/actions/bootstrap with: