Skip to content

Commit

Permalink
Merge pull request opencog#1 from AmeBel/circle-ci
Browse files Browse the repository at this point in the history
Configure circleci
  • Loading branch information
amebel authored Aug 3, 2018
2 parents c23c10b + dd43d90 commit 1180151
Show file tree
Hide file tree
Showing 2 changed files with 136 additions and 20 deletions.
136 changes: 136 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
version: 2.0

jobs:
atomspace:
docker:
- image: opencog/opencog-deps
user: root
environment:
PGHOST: opencog-postgres
PGUSER: opencog_test
PGPASSWORD: cheese
CCACHE_DIR: /ws/ccache
- image: opencog/postgres
name: opencog-postgres
working_directory: /ws/atomspace
environment:
ORG: singnet
steps:
- attach_workspace:
at: /ws
- run:
name: Start restoring ccache
command: date +%d-%m-%Y > /tmp/date
- restore_cache:
keys:
- ccache-{{ checksum "/tmp/date" }}
- ccache-
- run:
name: Install cogutil
command: |
git clone --depth 1 https://github.com/$ORG/cogutil /ws/cogutil
mkdir -p /ws/cogutil/build
cd /ws/cogutil/build && cmake .. && make -j4 && make -j4 install
ldconfig
- checkout
- run:
name: CMake Configure
command: mkdir build && cd build && cmake ..
- run:
name: Build
command: cd build && make -j4
- run:
name: Install AtomSpace
command: cd build && make -j4 install && ldconfig
- run:
name: Build tests
command: cd build && make -j4 tests
- run:
name: Run tests
command: cd build && make -j4 test
- run:
name: Print test log
command: cat build/tests/Testing/Temporary/LastTest.log
when: always
- persist_to_workspace:
root: /ws/
paths:
- cogutil
- atomspace
- ccache

opencog:
docker:
- image: opencog/opencog-deps
user: root
environment:
CCACHE_DIR: /ws/ccache
working_directory: /ws/opencog
environment:
ORG: singnet
steps:
- attach_workspace:
at: /ws
- run:
name: Install cogutil
command: cd /ws/cogutil/build && make -j4 install && ldconfig
- run:
name: Install AtomSpace
command: cd /ws/atomspace/build && make -j4 install && ldconfig
- run:
name: Clone OpenCog
command: git clone --depth 1 https://github.com/$ORG/opencog .
- run:
name: CMake Configure
command: mkdir build && cd build && cmake ..
- run:
name: Build
command: cd build && make -j4
- run:
name: Install OpenCog
command: cd build && make -j4 install && ldconfig
- run:
name: Build tests
command: cd build && make -j4 tests
- run:
name: Run tests
command: cd build && make -j4 test
- run:
name: Print test log
command: cat build/tests/Testing/Temporary/LastTest.log
when: always
- persist_to_workspace:
root: /ws/
paths:
- ccache

package: #Place holder
docker:
- image: opencog/opencog-deps
user: root
working_directory: /ws/atomspace
steps:
- attach_workspace:
at: /ws/
- run:
name: Start storing ccache
command: date +%d-%m-%Y > /tmp/date
- save_cache:
key: ccache-{{ checksum "/tmp/date" }}
paths:
- /ws/ccache

workflows:
version: 2
build-test-package:
jobs:
- atomspace
- opencog:
requires:
- atomspace
- package:
requires:
- opencog
filters:
branches:
only: master
20 changes: 0 additions & 20 deletions circle.yml

This file was deleted.

0 comments on commit 1180151

Please sign in to comment.