Skip to content

Commit

Permalink
refactoring to use devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
pattacini authored Dec 30, 2024
1 parent 39b126d commit cd237f5
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 16 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,25 @@ jobs:
- name: Configure
shell: bash
run: |
./tests/dry-run/configure.sh
cd ./tests/dry-run/
./configure.sh
- name: Install
shell: bash
run: |
cd build
cd ./tests/dry-run/build
cmake --build . --config Release --target install
- name: Test
shell: bash
run: |
cd build
cd ./tests/dry-run/build
ctest --timeout 60 --output-on-failure -L run
- name: Upload Output
if: always()
uses: actions/upload-artifact@main
with:
name: dry-run_${{ github.run_id }}
path: build/dry-run_log_*.txt
path: tests/dry-run/build/dry-run_log_*.txt
retention-days: 30
3 changes: 0 additions & 3 deletions .gitpod.yml

This file was deleted.

14 changes: 7 additions & 7 deletions tests/dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -131,19 +131,19 @@ RUN cd ${DEPENDENCIES_DIR} && \
-DCMAKE_INSTALL_PREFIX=${DEPENDENCIES_DIR}/install && \
cmake --build . --target install

# Create user gitpod
RUN useradd -l -u 33333 -G sudo -md /home/gitpod -s /bin/bash -p gitpod gitpod && \
# Create user codespace
RUN useradd -l -u 33333 -G sudo -md /home/codespace -s /bin/bash -p codespace codespace && \
# passwordless sudo for users in the 'sudo' group
sed -i.bkp -e 's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers

# Switch to gitpod user
USER gitpod
# Switch to codespace user
USER codespace

# Install informative git for bash
RUN git clone https://github.com/magicmonty/bash-git-prompt.git ~/.bash-git-prompt --depth=1

# Set up .bashrc
WORKDIR /home/gitpod
WORKDIR /home/codespace
RUN echo "GIT_PROMPT_ONLY_IN_REPO=1" >> ~/.bashrc && \
echo "source \${HOME}/.bash-git-prompt/gitprompt.sh" >> ~/.bashrc && \
echo "export DEPENDENCIES_DIR=${DEPENDENCIES_DIR}" >> ~/.bashrc && \
Expand All @@ -153,8 +153,8 @@ RUN echo "GIT_PROMPT_ONLY_IN_REPO=1" >> ~/.bashrc && \
# Switch back to root
USER root

# Make sure specific dirs are owned by gitpod user
RUN chown -R gitpod.gitpod ${DEPENDENCIES_DIR}
# Make sure specific dirs are owned by codespace user
RUN chown -R codespace.codespace ${DEPENDENCIES_DIR}

RUN rm -Rf /var/lib/apt/lists/*

Expand Down
2 changes: 1 addition & 1 deletion tests/dry-run/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ mkdir -p build && cd build
cmake -DCMAKE_PREFIX_PATH=${DEPENDENCIES_DIR}/install \
-DCMAKE_INSTALL_PREFIX=${DEPENDENCIES_DIR}/install \
-DBUILD_TESTING:BOOL=ON \
-DINSTALL_ALL_ROBOTS:BOOL=ON ..
-DINSTALL_ALL_ROBOTS:BOOL=ON ../../../
1 change: 0 additions & 1 deletion tests/dry-run/skip_tests.txt
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
dry-run_R1SN002_dev

0 comments on commit cd237f5

Please sign in to comment.