Skip to content

Commit

Permalink
Merge pull request #136 from ubc-subbots/Hashaam/FixingDockerTests
Browse files Browse the repository at this point in the history
Hashaam/fixing docker tests
  • Loading branch information
hashaam1217 authored Jun 4, 2024
2 parents 02ecc75 + aed6012 commit 28c27a0
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 9 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: ROS2 Build and Test CI

on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:

jobs:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/push_docker.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Build and push triton Docker image

on:
push:
branches: [ master ]
push:
workflow_dispatch:

jobs:
docker:
runs-on: ubuntu-20.04
steps:
steps:

- name: Check out ubc-subbots/triton
uses: actions/checkout@v2
Expand All @@ -17,10 +17,10 @@ jobs:
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: ./docker
push: true
tags: ubcsubbots/triton:latest
tags: ubcsubbots/triton:latest
28 changes: 27 additions & 1 deletion docker/build.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,35 @@
#!/bin/bash

# prepare sources
rosdep update
rosdep update --include-eol
sudo apt update

# Manual installation (debugging)
sudo apt install pip -y
sudo apt update

# Installing OpenCV from source
# Install prerequisites
sudo apt install -y cmake g++ wget unzip

# Download and unpack OpenCV sources
wget -O opencv.zip https://github.com/opencv/opencv/archive/4.5.3.zip
unzip opencv.zip

# Create build directory
mkdir -p build && cd build

# Configure and build OpenCV
cmake ../opencv-4.5.3
make -j$(nproc)

# Install OpenCV
sudo make install

# Clean up
cd ..
rm -rf build opencv.zip opencv-4.5.3

# fetch repo
git clone https://github.com/ubc-subbots/triton.git
cd triton
Expand Down

0 comments on commit 28c27a0

Please sign in to comment.