Skip to content

Commit

Permalink
Port CI fixes from #955 but targeting ubuntu 22 and ROS 2 Humble
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Chong <[email protected]>
  • Loading branch information
aaronchongth committed Jul 4, 2024
1 parent 5237e72 commit 1fd22ee
Show file tree
Hide file tree
Showing 8 changed files with 82 additions and 43 deletions.
12 changes: 1 addition & 11 deletions .github/actions/bootstrap/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,8 @@ inputs:
runs:
using: composite
steps:
- uses: pnpm/[email protected]
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 }}... --no-frozen-lockfile
run: pnpm install -w --filter ${{ inputs.package }}...
shell: bash
- name: Build
if: '!${{ inputs.skip-build }}'
Expand Down
34 changes: 34 additions & 0 deletions .github/minimal-rmf/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
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
10 changes: 9 additions & 1 deletion .github/workflows/api-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,24 @@ 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@v2
- uses: actions/checkout@v4
- name: bootstrap
uses: ./.github/actions/bootstrap
with:
Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/api-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CI: true
PIPENV_VERBOSITY: -1
Expand All @@ -15,28 +18,24 @@ jobs:
name: Tests
runs-on: ubuntu-22.04
container:
image: ghcr.io/${{ github.repository }}/e2e
image: ghcr.io/${{ github.repository }}/minimal-rmf
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
defaults:
run:
shell: bash
working-directory: packages/api-server
steps:
- uses: actions/checkout@v2
- name: setup python
run: apt update && apt install -y python3-venv python-is-python3
- uses: actions/checkout@v4
- name: bootstrap
uses: ./.github/actions/bootstrap
with:
package: api-server
- name: tests
run: |
. /rmf_demos_ws/install/setup.bash
. /opt/rmf/setup.bash
pnpm run lint
pnpm run test:cov
pipenv run python -m coverage xml
pnpm run test:cov -v
../../.venv/bin/python -m coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
Expand Down
15 changes: 6 additions & 9 deletions .github/workflows/dashboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,31 @@ 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 }}/e2e
image: ghcr.io/${{ github.repository }}/minimal-rmf
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
defaults:
run:
shell: bash
working-directory: packages/dashboard
steps:
- uses: actions/checkout@v2
- name: setup python
run: apt update && apt install -y python3-venv python-is-python3
- uses: actions/checkout@v4
- 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: . /rmf_demos_ws/install/setup.bash && pnpm run test:coverage
run: pnpm run test:coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/react-components.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,26 @@ 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@v2
- uses: actions/checkout@v4
- name: bootstrap
uses: ./.github/actions/bootstrap
with:
Expand All @@ -37,4 +41,4 @@ jobs:
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
flags: react-components
flags: react-components
10 changes: 9 additions & 1 deletion .github/workflows/rmf-auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,26 @@ 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@v2
- uses: actions/checkout@v4
- name: bootstrap
uses: ./.github/actions/bootstrap
with:
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/ros-translator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,24 @@ 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 }}/e2e
image: ghcr.io/${{ github.repository }}/minimal-rmf
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
defaults:
run:
shell: bash
working-directory: packages/ros-translator
steps:
- uses: actions/checkout@v2
- name: setup python
run: apt update && apt install -y python3-venv python-is-python3
- uses: actions/checkout@v4
- name: bootstrap
uses: ./.github/actions/bootstrap
with:
Expand Down

0 comments on commit 1fd22ee

Please sign in to comment.