Skip to content

Commit

Permalink
test versions
Browse files Browse the repository at this point in the history
  • Loading branch information
maxime-desroches committed Jul 12, 2024
1 parent e835fff commit 6bb46b9
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 8 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,24 @@ jobs:
matrix:
flags: ['', '--asan', '--ubsan']
backend: ['MSGQ', 'ZMQ']
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Build docker image
run: eval "$BUILD"
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Installing build dependencies
run: ./install_dependencies.sh
- name: Installing msgq
run: SCONS_EXTRAS=1 pip3 install --break-system-packages --no-cache-dir .[dev]
- name: C++ tests
run: |
$RUN "export ${{ matrix.backend }}=1 && \
scons ${{ matrix.flags }} -j$(nproc) && \
msgq/test_runner && \
msgq/visionipc/test_runner"
export ${{ matrix.backend }}=1
scons ${{ matrix.flags }} -j$(nproc)
msgq/test_runner
msgq/visionipc/test_runner
- name: python tests
run: $RUN_NAMED "${{ matrix.backend }}=1 coverage run -m pytest"
run: ${{ matrix.backend }}=1 coverage run -m pytest
- name: Upload coverage
run: |
docker commit msgq msgqci
Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,3 @@ ENV PYTHONPATH=/project
COPY . .
RUN ls && rm -rf .git && \
SCONS_EXTRAS=1 pip3 install --break-system-packages --no-cache-dir .[dev]

56 changes: 56 additions & 0 deletions install_dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/bin/bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"

cd $DIR

SUDO=""

# Use sudo if not root
if [[ ! $(id -u) -eq 0 ]]; then
if [[ -z $(which sudo) ]]; then
echo "Please install sudo or run as root"
exit 1
fi
SUDO="sudo"
fi

$SUDO apt-get update
$SUDO apt-get install -y --no-install-recommends \
autoconf \
build-essential \
ca-certificates \
capnproto \
clang \
cppcheck \
curl \
git \
libbz2-dev \
libcapnp-dev \
libffi-dev \
liblzma-dev \
libncurses5-dev \
libncursesw5-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
libtool \
libzmq3-dev \
llvm \
make \
cmake \
ocl-icd-opencl-dev \
opencl-headers \
python3-dev \
python3-pip \
tk-dev \
wget \
xz-utils \
zlib1g-dev \
libclang-rt-dev

git clone -b v2.x --depth 1 https://github.com/catchorg/Catch2.git
cd Catch2
mv single_include/* ../
cd ..
rm -rf Catch2

0 comments on commit 6bb46b9

Please sign in to comment.