Skip to content

Commit

Permalink
updating images
Browse files Browse the repository at this point in the history
Signed-off-by: Teo Koon Peng <[email protected]>
  • Loading branch information
koonpeng committed Jun 12, 2024
1 parent c29ece0 commit e74627d
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 59 deletions.
3 changes: 0 additions & 3 deletions .github/actions/bootstrap/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ runs:
with:
node-version: '20'
cache: 'pnpm'
- name: Install pipenv
run: pip3 install pipenv
shell: bash
- name: Install dependencies
run: pnpm install -w --filter ${{ inputs.package }}... --no-frozen-lockfile
shell: bash
Expand Down
30 changes: 30 additions & 0 deletions .github/minimal-rmf/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
ARG BASE_IMAGE=docker.io/ros:jazzy-ros-base
FROM $BASE_IMAGE
ARG BRANCH=main
ARG ROS_DISTRO=jazzy

### 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

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
2 changes: 1 addition & 1 deletion .github/workflows/api-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
name: Tests
runs-on: ubuntu-24.04
container:
image: ghcr.io/${{ github.repository }}/e2e
image: ghcr.io/${{ github.repository }}/minimal-rmf
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand Down
89 changes: 43 additions & 46 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,60 +3,57 @@ on:
schedule:
# 2am SGT
- cron: '0 18 * * *'
workflow_dispatch:
jobs:
build-docker-images:
name: Push Docker images to GitHub Packages
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
- name: Push e2e image to GitHub Packages
uses: docker/build-push-action@v1
- name: Push minimal-rmf image to GitHub Packages
uses: docker/build-push-action@v5
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
repository: ${{ github.repository }}/e2e
repository: ${{ github.repository }}/minimal-rmf
tags: latest
path: docker
dashboard-e2e:
strategy:
matrix:
npm: ['latest']
fail-fast: false
needs: build-docker-images
name: Dashboard e2e
runs-on: ubuntu-24.04
container:
image: ghcr.io/${{ github.repository }}/e2e
options: --privileged --ipc=host
defaults:
run:
shell: bash
working-directory: packages/dashboard-e2e
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
- name: bootstrap
uses: ./.github/actions/bootstrap
with:
package: rmf-dashboard-e2e
skip-build: true
- name: test
uses: nick-fields/retry@v2
with:
timeout_minutes: 20
max_attempts: 3
command: |
. /rmf_demos_ws/install/setup.bash
cd packages/dashboard-e2e
pnpm test
shell: bash
- name: upload artifacts
uses: actions/upload-artifact@v2
if: always()
with:
name: artifacts
path: packages/dashboard-e2e/artifacts
path: .github/minimal-rmf
# dashboard-e2e:
# strategy:
# matrix:
# npm: ['latest']
# fail-fast: false
# needs: build-docker-images
# name: Dashboard e2e
# runs-on: ubuntu-24.04
# container:
# image: ghcr.io/${{ github.repository }}/e2e
# options: --privileged --ipc=host
# defaults:
# run:
# shell: bash
# working-directory: packages/dashboard-e2e
# steps:
# - uses: actions/checkout@v2
# - name: bootstrap
# uses: ./.github/actions/bootstrap
# with:
# package: rmf-dashboard-e2e
# skip-build: true
# - name: test
# uses: nick-fields/retry@v2
# with:
# timeout_minutes: 20
# max_attempts: 3
# command: |
# . /rmf_demos_ws/install/setup.bash
# cd packages/dashboard-e2e
# pnpm test
# shell: bash
# - name: upload artifacts
# uses: actions/upload-artifact@v2
# if: always()
# with:
# name: artifacts
# path: packages/dashboard-e2e/artifacts
9 changes: 0 additions & 9 deletions docker/Dockerfile

This file was deleted.

0 comments on commit e74627d

Please sign in to comment.