Skip to content

Commit

Permalink
Add btllib as a dependancy (#152)
Browse files Browse the repository at this point in the history
* Removed packaged btllib, make a dependency

* Fix conda install command

* add parameter to conda install in CI

* Update Common/Makefile.am

* Update CI

* Fix yml formatting

* Activate conda env for all compile steps

* Fix for clang-tidy, ensure clang-tidy reads CXXFLAGS

* Update README

* Add mac to CI

* CI format fix

* CI format fix

* CI fix formatting

* Set unused-but-set-variable to be warning, not error
  • Loading branch information
lcoombe authored Jun 3, 2022
1 parent 84868c3 commit d9f8629
Show file tree
Hide file tree
Showing 26 changed files with 54 additions and 11,681 deletions.
2 changes: 1 addition & 1 deletion Arcs/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
bin_PROGRAMS = arcs

arcs_CXXFLAGS = $(AM_CXXFLAGS) $(OPENMP_CXXFLAGS)
arcs_CXXFLAGS = $(AM_CXXFLAGS) $(OPENMP_CXXFLAGS) -Wno-error=unused-but-set-variable

arcs_CPPFLAGS = -I$(top_srcdir)/Arcs \
-I$(top_srcdir)/Common \
Expand Down
2 changes: 1 addition & 1 deletion Common/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
noinst_LIBRARIES = libcommon.a

libcommon_a_CPPFLAGS = -I$(top_srcdir)
libcommon_a_CPPFLAGS = -I$(top_srcdir) -Wno-error=unused-result

libcommon_a_SOURCES = \
BloomFilter.cpp BloomFilter.h \
Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ Because ARKS is not dependent on read alignments, it is generally much faster th

### Dependencies
* Boost (tested on 1.61)
* GCC (5.1+)
* GCC (6+)
* Autotools (if cloning directly from repository)
* LINKS (tested on 1.8)
* Google SparseHash
* ABySS (if using long reads) (tested on 2.2.5)
* [btllib](https://github.com/bcgsc/btllib) (1.4.3+)

### Compilation:
If cloning directly from the repository run:
Expand All @@ -41,6 +42,12 @@ If your boost library headers are not in your PATH you can specify their locatio
```
./configure –-with-boost=/boost/path --prefix=/ARCS/PATH && make install
```
If you compiled btllib from source (as opposed to installation using conda), you can specify the location of the btllib library files:
```
export CXXFLAGS+=" -I /path/to/btllib/include"
export LDFLAGS+=" -L /path/to/btllib/install/lib"
./configure && make
```

### ARCS+LINKS Pipeline

Expand Down
39 changes: 32 additions & 7 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ jobs:
steps:
- script: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to PATH

- script: conda create --yes --quiet --name arcs_CI
displayName: Create Anaconda environment

- script: |
sudo apt-get update -qq
sudo apt-get install -qq libboost-dev libsparsehash-dev automake
displayName: Install C++ modules
source activate arcs_CI
conda install --yes -c conda-forge -c bioconda compilers btllib boost automake sparsehash
displayName: Install dependencies
- script: |
source activate arcs_CI
./autogen.sh
./configure
make
Expand All @@ -30,7 +29,9 @@ jobs:
pylint makeTSVfile.py
cd ../
displayName: Run pylint
- script: make distcheck
- script: |
source activate arcs_CI
make distcheck
displayName: Compile ARCS with make distcheck
- script: |
curl https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
Expand All @@ -39,8 +40,32 @@ jobs:
sudo apt-get install -y --no-install-recommends clang-format clang-tidy
displayName: Install clang-format and clang-tidy
- script: |
source activate arcs_CI
make -C Arcs clang-format
make -C src lint
displayName: Run clang-format
- script: make -C src all
- script: |
source activate arcs_CI
make -C src all
displayName: Compile long-to-linked-pe
- job:
displayName: mac-latest
pool:
vmImage: 'macOS-latest'

steps:
- script: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to PATH
- script: conda create --yes --quiet --name arcs_CI
displayName: Create Anaconda environment
- script: |
source activate arcs_CI
conda install --yes -c conda-forge -c bioconda compilers btllib boost automake sparsehash
displayName: Install dependencies
- script: |
source activate arcs_CI
./autogen.sh
./configure
make
displayName: Compile ARCS
17 changes: 6 additions & 11 deletions src/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
bin_PROGRAMS = long-to-linked-pe

long_to_linked_pe_CXXFLAGS = -O3 -Wall -Werror -Wno-unknown-pragmas -std=c++11 -pthread -I$(top_srcdir)/src/include
long_to_linked_pe_CXXFLAGS = -O3 -Wall -Werror -Wno-unknown-pragmas -std=c++17 -pthread -I$(top_srcdir)/src/include

CXXFLAGS = $(long_to_linked_pe_CXXFLAGS)
CXXFLAGS += $(long_to_linked_pe_CXXFLAGS)

long_to_linked_pe_SOURCES = long-to-linked-pe.cpp \
include/btllib/seq_reader.hpp \
include/btllib/status.hpp \
include/btllib/util.hpp \
include/btllib/cstring.hpp \
include/btllib/data_stream.hpp \
include/btllib/order_queue.hpp \
include/btllib/seq.hpp
long_to_linked_pe_LDADD = -lbtllib

long_to_linked_pe_SOURCES = long-to-linked-pe.cpp

# Check the C++ source code for errors.
lint: clang-format clang-tidy

# Check the C++ source code for errors with clang-tidy.
clang-tidy:
clang-tidy -warnings-as-errors='*' *.cpp -- -std=c++11 -x c++ -Ibtllib/include -Iinclude
clang-tidy -warnings-as-errors='*' *.cpp -- -std=c++11 -x c++ ${CXXFLAGS}

# Check the C++ source code for white-space errors with clang-format.
clang-format:
Expand Down
Loading

0 comments on commit d9f8629

Please sign in to comment.