Skip to content

Commit

Permalink
Revert "[ci] remove CI folder and update README"
Browse files Browse the repository at this point in the history
This reverts commit 915986c.
  • Loading branch information
Joyjit Daw committed Sep 4, 2019
1 parent 9330150 commit e9575b0
Show file tree
Hide file tree
Showing 10 changed files with 238 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ A **wrapper script** is also available to enable easier usage to the end-user fo
To install Racon run the following commands:

```bash
git clone --recursive https://github.com/lbcb-sci/racon.git racon
cd racon
git clone --recursive https://github.com/clara-genomics/racon-gpu.git
cd racon-gpu
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
Expand Down
20 changes: 20 additions & 0 deletions ci/checks/changelog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
# Copyright (c) 2018, NVIDIA CORPORATION.
#########################
# cuDF CHANGELOG Tester #
#########################

# Checkout master for comparison
git checkout --quiet master

# Switch back to tip of PR branch
git checkout --quiet current-pr-branch

# Ignore errors during searching
set +e

# Get list of modified files between matster and PR branch
CHANGELOG=`git diff --name-only master...current-pr-branch | grep CHANGELOG.md`
RETVAL=0

exit $RETVAL
28 changes: 28 additions & 0 deletions ci/checks/style.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash
# Copyright (c) 2018, NVIDIA CORPORATION.
#####################
# cuDF Style Tester #
#####################

# Ignore errors and set path
set +e
PATH=/conda/bin:$PATH

# Activate common conda env
source activate gdf

# Run flake8 and get results/return code
#FLAKE=`flake8 python`
#RETVAL=$?
RETVAL=0

# Output results if failure otherwise show pass
#if [ "$FLAKE" != "" ]; then
# echo -e "\n\n>>>> FAILED: flake8 style check; begin output\n\n"
# echo -e "$FLAKE"
# echo -e "\n\n>>>> FAILED: flake8 style check; end output\n\n"
#else
# echo -e "\n\n>>>> PASSED: flake8 style check\n\n"
#fi

exit $RETVAL
63 changes: 63 additions & 0 deletions ci/common/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#!/bin/bash
# Copyright (c) 2018, NVIDIA CORPORATION.
######################################
# racon-gpu CPU/GPU conda build script for CI #
######################################
set -e

# Get commandline arguments
LOCAL_BUILD_DIR=$1

# Logger function for build status output
function logger() {
echo -e "\n>>>> $@\n"
}

# Set path and build parallel level
export PATH=/conda/bin:/usr/local/cuda/bin:$PATH
export PARALLEL_LEVEL=4

# Set home to the job's workspace
export HOME=$WORKSPACE

# Switch to project root; also root of repo checkout
cd $WORKSPACE

################################################################################
# SETUP - Check environment
################################################################################

logger "Get env..."
env

logger "Check versions..."
gcc --version
g++ --version

# FIX Added to deal with Anancoda SSL verification issues during conda builds
conda config --set ssl_verify False

CUDA_REL=${CUDA:0:3}
if [ "${CUDA:0:2}" == '10' ]; then
# CUDA 10 release
CUDA_REL=${CUDA:0:4}
fi

git clean -xdf

CMAKE_COMMON_VARIABLES="-DCMAKE_BUILD_TYPE=Release -Dracon_build_tests=ON"

if [ "${BUILD_FOR_GPU}" == '1' ]; then
CMAKE_BUILD_GPU="-Dracon_enable_cuda=ON"
else
CMAKE_BUILD_GPU="-Dracon_enable_cuda=OFF"
fi

# Use CMake-based build procedure
mkdir --parents ${LOCAL_BUILD_DIR}
cd ${LOCAL_BUILD_DIR}

# configure
cmake $CMAKE_COMMON_VARIABLES ${CMAKE_BUILD_GPU} ..
# build
make -j${PARALLEL_LEVEL} VERBOSE=1 all
26 changes: 26 additions & 0 deletions ci/cpu/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash
# Copyright (c) 2018, NVIDIA CORPORATION.
######################################
# cuDF CPU conda build script for CI #
######################################
set -e

# Logger function for build status output
function logger() {
echo -e "\n>>>> $@\n"
}

cd ${WORKSPACE}

LOCAL_BUILD_DIR=${WORKSPACE}/build

. ci/common/build.sh ${LOCAL_BUILD_DIR}

if [ "${TEST_ON_CPU}" == '1' ]; then
logger "Running CPU-based test..."
cd ${LOCAL_BUILD_DIR}/bin

logger "Test results..."
./racon_test
fi

5 changes: 5 additions & 0 deletions ci/cpu/prebuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

export BUILD_FOR_GPU=0
export TEST_ON_CPU=1
export TEST_ON_GPU=0
38 changes: 38 additions & 0 deletions ci/gpu/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash
# Copyright (c) 2018, NVIDIA CORPORATION.
######################################
# cuDF GPU conda build script for CI #
######################################
set -e

# Logger function for build status output
function logger() {
echo -e "\n>>>> $@\n"
}

cd ${WORKSPACE}

LOCAL_BUILD_DIR=${WORKSPACE}/build

. ci/common/build.sh ${LOCAL_BUILD_DIR}

if [ "${TEST_ON_GPU}" == '1' ]; then
logger "GPU config..."
nvidia-smi

logger "Running GPU-based test..."

logger "Pulling GPU test data..."
cd ${WORKSPACE}
if [ ! -d "ont-racon-data" ]; then
if [ ! -f "${ont-racon-data.tar.gz}" ]; then
wget -q -L https://s3.us-east-2.amazonaws.com/racon-data/ont-racon-data.tar.gz
fi
tar xvzf ont-racon-data.tar.gz
fi
ci/gpu/cuda_test.sh

logger "Unit test results..."
cd ${LOCAL_BUILD_DIR}/bin
./racon_test --gtest_filter=*CUDA*
fi
44 changes: 44 additions & 0 deletions ci/gpu/cuda_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash

SCRIPT_DIRECTORY=`dirname $0`
BIN_DIRECTORY="${SCRIPT_DIRECTORY}/../../build/bin"
DATA="${HOME}/ont-racon-data/nvidia"
RESULT_FILE="test-output.txt"
GOLDEN_FILE="$SCRIPT_DIRECTORY/golden-output.txt"

if [ $# -eq 0 ]; then
BATCHES=2
else
BATCHES=$1
fi

if [ ! -d $BIN_DIRECTORY ]; then
echo "Could not find bin directory for racon binary"
exit 1
fi

if [ -f $RESULT_FILE ]; then
rm $RESULT_FILE
fi

if [ ! -f $GOLDEN_FILE ]; then
echo "Could not find golden value file at $GOLDEN_FILE"
exit 1
fi

CMD="$BIN_DIRECTORY/racon --cudaaligner-batches 0 -c ${BATCHES} -m 8 -x -6 -g -8 -w 500 -t 24 -q -1 $DATA/iterated_racon/reads.fa.gz $DATA/iterated_racon/reads2contigs_1_1.paf.gz $DATA/canu.contigs.fasta"
echo "Running command:"
echo $CMD
$CMD > ${RESULT_FILE}
diff ${RESULT_FILE} ${GOLDEN_FILE} >& /dev/null
RES=$?

if [ $RES -eq "0" ]; then
echo "Test passed."
rm $RESULT_FILE
else
echo "Test failed."
echo "Result in ${RESULT_FILE}, golden vales in ${GOLDEN_FILE}"
fi

exit $RES
6 changes: 6 additions & 0 deletions ci/gpu/golden-output.txt

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions ci/gpu/prebuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

export BUILD_FOR_GPU=1
export TEST_ON_GPU=1


0 comments on commit e9575b0

Please sign in to comment.