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

Reduce memory usage during installation by disabling cppcms test build #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
17 changes: 11 additions & 6 deletions ansible/tasks/install_tatodetect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,22 @@
state: present
- name: Fetch cppcms source
get_url: url=http://downloads.sourceforge.net/project/cppcms/cppcms/1.0.5/cppcms-1.0.5.tar.bz2 dest=/tmp/
- name: Extract source from the archive
- name: Extract cppcms source from the archive
command: tar -jxvf cppcms-1.0.5.tar.bz2 chdir=/tmp/
when: install_state is failed or force_install == true
- name: Disable testing
- name: Disable testing for cppcms
replace:
path: '/tmp/cppcms-1.0.5/CMakeLists.txt'
regexp: "^(enable_testing\\(\\))$"
replace: "#\\1"
- name: Generate makefile
- name: Disable building tests for cppcms
replace:
path: '/tmp/cppcms-1.0.5/CMakeLists.txt'
regexp: "^(.*\\$\\{TEST\\}.*)$"
replace: "#\\1"
- name: Generate makefile for cppcms
command: cmake . chdir=/tmp/cppcms-1.0.5
- name: Compile
- name: Compile cppcms
command: make -j2 chdir=/tmp/cppcms-1.0.5
- name: Install
command: make install chdir=/tmp/cppcms-1.0.5
Expand All @@ -30,9 +35,9 @@
state: present
- name: Fetch tatodetect source
git: repo=https://github.com/Tatoeba/Tatodetect.git dest=/tmp/tatodetect
- name: Generate makefile
- name: Generate makefile for tatodetect
command: cmake . chdir=/tmp/tatodetect
- name: Compile
- name: Compile tatodetect
command: make -j2 chdir=/tmp/tatodetect
- name: Copy the binary to system-wide location
command: cp tatodetect /usr/local/bin/tatodetect chdir=/tmp/tatodetect
Expand Down