Skip to content

Commit

Permalink
update scripts
Browse files Browse the repository at this point in the history
Signed-off-by: Teo Koon Peng <teokoonpeng@gmail.com>
  • Loading branch information
koonpeng committed Jun 12, 2024
1 parent 557a1a8 commit 1901214
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 15 deletions.
7 changes: 0 additions & 7 deletions .github/actions/bootstrap/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ inputs:
runs:
using: composite
steps:
- uses: pnpm/action-setup@v2.2.2
with:
version: 'latest'
- uses: actions/setup-node@v2
with:
node-version: '20'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install -w --filter ${{ inputs.package }}... --no-frozen-lockfile
shell: bash
Expand Down
4 changes: 4 additions & 0 deletions .github/minimal-rmf/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,14 @@ RUN cd /rmf \
&& 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
4 changes: 0 additions & 4 deletions pipenv-install/pipenv → pipenv-install/bootstrap-pipenv.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
#!/usr/bin/bash
set -e

cd "$(dirname "$0")/.."

if [ ! -d .venv ]; then
echo 'creating virtualenv at .venv'
python3 -m venv .venv --system-site-packages --prompt rmf-web
.venv/bin/pip3 install pipenv
fi

exec .venv/bin/pipenv "$@"
2 changes: 1 addition & 1 deletion pipenv-install/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"description": "A dummy package so that we can run pipenv install only when needed",
"private": true,
"scripts": {
"install": "./pipenv install -d --site-packages"
"install": "./bootstrap-pipenv.sh && ../scripts/pipenv install -d --site-packages"
}
}
5 changes: 2 additions & 3 deletions scripts/pipenv
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/bash
#!/usr/bin/bash
set -e

# Wrapper to the locally installed pipenv.
. "$(dirname $0)/../.venv/bin/activate"
pipenv "$@"
exec "$(dirname "$0")/../.venv/bin/pipenv" "$@"

0 comments on commit 1901214

Please sign in to comment.