Skip to content

Commit

Permalink
ci: update setup
Browse files Browse the repository at this point in the history
  • Loading branch information
2maz committed Jul 25, 2024
1 parent 32ed7d5 commit 4e05517
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 14 deletions.
43 changes: 33 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,41 @@ name: test
on: [push]
jobs:
unittests:
runs-on: ubuntu-20.04
strategy:
matrix:
os: ["ubuntu:20.04", "ubuntu:22.04"]
package: ["planning/templ"]
seed_config: [".ci/autoproj-config.yml"]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: current_branch
- name: Checkout
uses: actions/checkout@v4
with:
repository: 2maz/rock-github-workflow
path: rock-github-workflow
branch: test

- name: Apply package / branch specific overrides
run:
if [ -d .ci/overrides.d/ ]; then
echo "Copying overrides from .ci/"
cp -R .ci/overrides.d/* rock-github-workflow/docker/overrides.d/;
fi

- name: Build
run: docker build -t rock/${{ matrix.os }} -f rock-github-workflow/docker/Dockerfile .
--build-arg PKG_NAME=${{ matrix.package }}
--build-arg PKG_BRANCH=${{ github.ref_name }}
--build-arg BASE_IMAGE=${{ matrix.os }}
--build-arg SEED_CONFIG=${{ matrix.seed_config }}
--build-arg BUILDCONF_URL=https://github.com/2maz/templ-buildconf
--build-arg BUILDCONF_BRANCH=test

- name: Build 20.04
run: docker build -t ubuntu-20.04/templ -f Dockerfile . --build-arg PKG_BRANCH=${{ steps.current_branch.outputs.branch }}
- name: Test
run: docker run rock/${{ matrix.os }}
/bin/bash -c
"source /home/docker/rock_test/env.sh; BOOST_TEST_CATCH_SYSTEM_ERRORS=\"no\" make -C /home/docker/rock_test/${{ matrix.package }}/build test"

- name: Test-on-ubuntu:20.04
run: docker run ubuntu-20.04/templ /bin/bash -c "source /home/docker/rock_test/env.sh; cd /home/docker/rock_test/planning/templ; ./build/test/templ-test --log_level=all"
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ project(templ
DESCRIPTION "TemPl - Planning for Reconfigurable Multi-Robot Systems"
)
set(CMAKE_COMPILE_EXPORT_COMMANDS on)
set(ROCK_TEST_ENABLED on)
find_package(Rock)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand Down
15 changes: 12 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
find_package(Boost REQUIRED system filesystem serialization program_options)
find_package(gecode REQUIRED)
find_package(Boost REQUIRED system filesystem serialization program_options regex)

# For adding the qt5 resources
set(CMAKE_AUTORCC ON)
Expand Down Expand Up @@ -51,10 +52,18 @@ rock_library(templ_core
utils/CSVLogger.hpp
utils/CartographicMapping.hpp
utils/Logger.hpp
LIBS ${Boost_LIBRARIES}
LIBS
${Boost_LIBRARIES}
gecode::kernel
gecode::set
gecode::support
gecode::search
gecode::int
gecode::float
gecode::minimodel
proj
DEPS_PKGCONFIG
graph_analysis-core
graph_analysis
numeric
owlapi
moreorg
Expand Down

0 comments on commit 4e05517

Please sign in to comment.