Skip to content

Commit

Permalink
switch to using meson
Browse files Browse the repository at this point in the history
  • Loading branch information
EdHarry committed Apr 10, 2021
1 parent 6fa7440 commit 9fe5f2f
Show file tree
Hide file tree
Showing 10 changed files with 63 additions and 693 deletions.
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "libdeflate"]
path = libdeflate
url = https://github.com/ebiggers/libdeflate
[submodule "wrapper"]
path = wrapper
url = https://github.com/wtsi-hpag/SIMDExtensionWrapper
28 changes: 18 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,48 @@ jobs:
- os: osx
language: c
install:
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then export conda_url=https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh;
fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then export conda_url=https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh;
fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then export conda_url=https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then export conda_url=https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh; fi
- wget $conda_url -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- source "$HOME/miniconda/etc/profile.d/conda.sh"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a
- conda install -c conda-forge mamba
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then export toolchain=clangxx_osx-64; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then export toolchain=gxx_linux-64; fi
- conda create -q -n test-environment -c conda-forge -c bioconda -y python=3.8 clang=10
$toolchain make pytest
- mamba create -q -n test-environment -c conda-forge -c bioconda -y meson clang $toolchain samtools
- conda activate test-environment
- "./install"
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then env CC=clang CXX=clang meson setup --buildtype=release --unity on builddir; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then meson setup --buildtype=release --unity on builddir; fi
- cd builddir
- meson compile
- meson test
script:
- pytest -v
- echo "done"
before_deploy:
- echo "Auto release generated by Travis CI on "$(date +'%Y:%m:%d at %H:%M:%S') >
release_notes
- export release_name="PretextGraph-"$(git describe --tags)
- mkdir $release_name
- cp -r $TRAVIS_BUILD_DIR/*.{cpp,h} $TRAVIS_BUILD_DIR/meson.build $TRAVIS_BUILD_DIR/wrapper $TRAVIS_BUILD_DIR/libdeflate $TRAVIS_BUILD_DIR/LICENSE $TRAVIS_BUILD_DIR/README.md $release_name/
- tar -czf Source_with_Submodules.tar.gz $release_name
deploy:
edge: true
provider: releases
token: "$GITHUB_TOKEN"
file: release_notes
file:
- release_notes
- Source_with_Submodules.tar.gz
name: "$release_name"
body: Auto-generated release by Travis CI
skip_cleanup: true
prerelease: true
on:
tags: true
condition: "$TRAVIS_OS_NAME = linux"
condition: $TRAVIS_OS_NAME = linux
env:
global:
secure: 4uOPKpQPXuq7AagJqOgreaqKXScdlvGis/GZY6p8m4a3x90uqYQNFgT/H3OjwHBolTlP6kbRRTWm5sIu8OgYzCeVjYihMD/ub9Tbf1qoEilm9pVMNz1kdy0Ptkpp1V/DHQzRuXO+5d9Gtay1T7qbi5BumbPwhdcWYhay7NO2Rw0fhpFmNx5XgrIi6bPCEsvf4KQG9JQtXjVJGI2nilG9u+Gt1tx+jpt/hVDD9qjPXfc+2zQcdJIoNV3/cIyk9I615NAi/K6oEISYMLGLd3aa4CiZFnEKtpVLyYNnoEUvt8lxx97vz6XNwpyrslzoAGuSOfK3ZmraI/wtJLWRgv+aRunq48NutJz6f7JxOJGaYZiw73BmkzJ9rhtXje6fUqbRMCoo116h1z/+w7+PzyFYMYzSOZlcRRYAg2nlJaADIdkQJF3DhApSJZKgE3nq3PZijX9F47I5oFXopz1gHTMt+sDzF39cVXVd/mLNQs0gFmqMtYivOAwRMVT6wDvyvaL8Tue7v3dcz3c9w1hPOm53x9MY8Hvas5fnkvwMUuamave4i/bQc2I2L/6Kkf9gqCvEGcda6M6bIDpdRL5n+E24jq4PedoDj3Tiv+EBNvwiW0dOT88qKL/AwN7z0keprxCqSJqACpzdviHinz7DonPvRWxvChOMX/BFBq8+6h/RiPU=
2 changes: 1 addition & 1 deletion PretextGraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ SOFTWARE.

#include "Header.h"

#define PretextGraph_Version "PretextGraph Version 0.0.4"
#define PretextGraph_Version "PretextGraph Version 0.0.5"

global_variable
u08
Expand Down
45 changes: 14 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,36 +36,19 @@ Important: only non-negative integer data is supported.
# Viewing graphs
[PretextView](https://github.com/wtsi-hpag/PretextView) version 0.1.2 or later.

# Mac and Linux builds
Prebuilt binaries for Mac and Linux are available<br/>
The Mac binary was build on MacOS 10.13.6<br/>
The Linux binary was build on kernel 3.13<br/>
Prebuilt binaries now come in 4-different varieties: AVX2, AVX, SSE4.2 and SSE4.1 along with a wrapper program. Just keep all the binaries on the same path and run the wrapper (PretextGraph); the correct binary for your architecture will be executed.

# Third-Party acknowledgements
PretextGraph uses the following third-party libraries:<br/>
libdeflate (https://github.com/ebiggers/libdeflate)<br/>
stb_sprintf.h (https://github.com/nothings/stb/blob/master/stb_sprintf.h)

# Requirments, building via script (Mac and Linux)
make<br/>
python (2 or 3) to run the installation script<br/>
clang or gcc to compile<br/>

Tested on Ubuntu linux kernel 3.13 with clang-10, gcc-5.5<br/>
Tested on MacOS 10.13.6 with clang-10<br/>

PretextGraph requires libdeflate (https://github.com/ebiggers/libdeflate). By default the install script will clone and build the libdeflate.a static library for compilation with PretextGraph. You can specify your own version to the install script if you wish (you'll have to specify appropriate linking flags as well if you specify a shared library).

run ./install to build (run ./install -h to see options)

# Requirments, building on Windows
Only recomended you know how to compile executables for Windows.<br/>

Tested on Windows 10 using the Visual Studio 2019 toolchain<br/>
Tested with clang-9<br/>
Requires at least SSE4.1 support.

Requires libdeflate (https://github.com/ebiggers/libdeflate)<br/>

Compile PretextGraph.cpp and link against libdeflate<br/>
* [libdeflate](https://github.com/ebiggers/libdeflate)<br/>
* [stb_sprintf.h](https://github.com/nothings/stb/blob/master/stb_sprintf.h)

# Installation
Requires:
* clang >= 11.0.0
* meson >= 0.57.1
```bash
git submodule update --init --recursive
env CXX=clang meson setup --buildtype=release --unity on --prefix=<installation prefix> builddir
cd builddir
meson compile
meson test
meson install
189 changes: 0 additions & 189 deletions install

This file was deleted.

1 change: 1 addition & 0 deletions libdeflate
Submodule libdeflate added at 448e3f
Loading

0 comments on commit 9fe5f2f

Please sign in to comment.