Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Update dependences, check CI #125

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: plotIt tests CI

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

workflow_dispatch:

jobs:
tests:
name: plotIt tests
runs-on: ubuntu-latest
container: rootproject/root:latest

steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
apt-get update -qq
apt-get install -y libboost-dev libboost-filesystem-dev libboost-regex-dev libboost-system-dev make ghostscript cmake python3 python3-pip imagemagick
python3 -m pip install pyyaml requests
mkdir -p $HOME/.config/ImageMagick
cp test/policy.xml $HOME/.config/ImageMagick
rm -f /etc/ImageMagick-6/policy.xml # workaround
- name: Build
run: |
cmake .
make
- name: Run tests
run: |
cd "${GITHUB_WORKSPACE}/test"
sed -i 's=python =python3 =' run_tests.sh
./run_tests.sh
cd -
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required( VERSION 2.8 )
cmake_minimum_required( VERSION 2.8.12 )

project(plotIt LANGUAGES CXX)

Expand All @@ -16,15 +16,15 @@ find_package(Boost REQUIRED COMPONENTS filesystem regex system)

ExternalProject_Add(
yaml-cpp-build
URL https://github.com/jbeder/yaml-cpp/archive/yaml-cpp-0.6.2.tar.gz
CMAKE_ARGS -DYAML_CPP_BUILD_TOOLS=OFF -DYAML_CPP_BUILD_CONTRIB=OFF -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/external
URL https://github.com/jbeder/yaml-cpp/archive/refs/tags/yaml-cpp-0.7.0.tar.gz
CMAKE_ARGS -DYAML_CPP_BUILD_TOOLS=OFF -DYAML_CPP_BUILD_CONTRIB=OFF -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/external -DCMAKE_CXX_FLAGS='-Wno-error=maybe-uninitialized'
)
add_library(yaml-cpp STATIC IMPORTED)
add_dependencies(yaml-cpp yaml-cpp-build)
set_target_properties(yaml-cpp PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/external/lib/libyaml-cpp.a)
ExternalProject_Add(
tclap
URL https://github.com/mirror/tclap/archive/tclap-1-2-1-release-final.tar.gz
URL https://github.com/mirror/tclap/archive/refs/tags/v1.2.4.tar.gz
BUILD_IN_SOURCE 1
PATCH_COMMAND ./autotools.sh
CONFIGURE_COMMAND ./configure --prefix=${CMAKE_CURRENT_BINARY_DIR}/external
Expand Down