Skip to content

Instantly share code, notes, and snippets.

@noskill
Last active February 27, 2019 07:48
Show Gist options
  • Select an option

  • Save noskill/9dc96b40f0c9b47acbb2110ac6ae95d5 to your computer and use it in GitHub Desktop.

Select an option

Save noskill/9dc96b40f0c9b47acbb2110ac6ae95d5 to your computer and use it in GitHub Desktop.
runnable locally circleci atomspace config
version: 2.0
jobs:
build:
docker:
- image: opencog/opencog-deps
user: root
environment:
PGHOST: opencog-postgres
PGUSER: opencog_test
PGPASSWORD: cheese
CCACHE_DIR: /tmp/ws/ccache
- image: opencog/postgres
name: opencog-postgres
working_directory: /tmp/ws/atomspace
steps:
- attach_workspace:
at: /tmp/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/opencog/cogutil /tmp/ws/cogutil
mkdir -p /tmp/ws/cogutil/build
cd /tmp/ws/cogutil/build && cmake .. && make -j2 && make -j2 install
ldconfig
- checkout
- restore_cache:
name: Restore GCH Cache
keys:
- ghc-{{checksum "/tmp/ws/atomspace/opencog/haskell/stack.yaml"}}-{{ arch }}
- restore_cache:
name: Restore Haskell Deps Cache
keys:
- haskelldeps-{{checksum "/tmp/ws/atomspace/opencog/haskell/stack.yaml"}}-{{checksum "/tmp/ws/atomspace/opencog/haskell/opencog-atomspace.cabal"}}-{{ arch }}
- run:
name: CMake Configure
command: mkdir build && cd build && cmake ..
- run:
name: Build
command: cd build && make -j2
- run:
name: Build tests
command: cd build && make -j2 tests
- run:
name: Run tests
command: cd build && make -j2 test ARGS=-j2
- run:
name: Install AtomSpace
command: cd build && make -j2 install && ldconfig
- run:
name: Build examples
command: cd build && make -j2 examples
- run:
name: Print test log
command: cat build/tests/Testing/Temporary/LastTest.log
when: always
- save_cache:
name: Save GHC Cache
key: ghc-{{checksum "/tmp/ws/atomspace/opencog/haskell/stack.yaml"}}-{{ arch }}
paths:
- /root/.stack
- save_cache:
name: Save Haskell Deps Cache
key: haskelldeps-{{checksum "/tmp/ws/atomspace/opencog/haskell/stack.yaml"}}-{{checksum "/tmp/ws/atomspace/opencog/haskell/opencog-atomspace.cabal"}}-{{ arch }}
paths:
- /tmp/ws/atomspace/opencog/haskell/.stack-work
- persist_to_workspace:
root: /tmp/ws/
paths:
- cogutil
- atomspace
- ccache
opencog:
docker:
- image: opencog/opencog-deps
user: root
environment:
CCACHE_DIR: /tmp/ws/ccache
working_directory: /tmp/ws/opencog
steps:
- attach_workspace:
at: /tmp/ws/
- restore_cache:
name: Restore GCH Cache
keys:
- ghc-{{checksum "/tmp/ws/atomspace/opencog/haskell/stack.yaml"}}-{{ arch }}
- restore_cache:
name: Restore Haskell Deps Cache
keys:
- haskelldeps-{{checksum "/tmp/ws/atomspace/opencog/haskell/stack.yaml"}}-{{checksum "/tmp/ws/atomspace/opencog/haskell/opencog-atomspace.cabal"}}-{{ arch }}
- run:
name: Install cogutil
command: cd /tmp/ws/cogutil/build && make -j2 install && ldconfig
- run:
name: Install AtomSpace
command: cd /tmp/ws/atomspace/build && make -j2 install && ldconfig
- run:
name: Clone OpenCog
command: git clone --depth 1 https://github.com/opencog/opencog .
- run:
name: CMake Configure
command: mkdir build && cd build && cmake ..
- run:
name: Build
command: cd build && make -j2
- run:
name: Install OpenCog
command: cd build && make -j2 install && ldconfig
- run:
name: Build tests
command: cd build && make -j2 tests
- run:
name: Run tests
command: cd build && make -j2 test ARGS=-j2
- run:
name: Print test log
command: cat build/tests/Testing/Temporary/LastTest.log
when: always
- persist_to_workspace:
root: /tmp/ws/
paths:
- ccache
package: #Place holder
docker:
- image: opencog/opencog-deps
user: root
working_directory: /tmp/ws/atomspace
steps:
- attach_workspace:
at: /tmp/ws/
- run:
name: Start storing ccache
command: date +%d-%m-%Y > /tmp/date
- save_cache:
key: ccache-{{ checksum "/tmp/date" }}
paths:
- /tmp/ws/ccache
#workflotmp/ws:
# version: 2
# build-test-package:
# jobs:
# - atomspace
# - opencog:
# requires:
# - atomspace
# - package:
# requires:
# - opencog
# filters:
# branches:
# only: master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment