diff --git a/.github/workflows/dispatch-build-and-test.yml b/.github/workflows/dispatch-build-and-test.yml index b6c364b1b..66ab0d136 100644 --- a/.github/workflows/dispatch-build-and-test.yml +++ b/.github/workflows/dispatch-build-and-test.yml @@ -35,7 +35,7 @@ jobs: with: cpu: ${{ matrix.cpu }} test_name: ${{matrix.compiler.name}}${{matrix.compiler.version}}/C++${{matrix.std}} - build_script: "./ci/build.sh -cxx ${{matrix.compiler.exe}} -std ${{matrix.std}} -arch ${{matrix.gpu_build_archs}} -i ${{matrix.compiler.name}}${{matrix.compiler.version}}-cuda${{matrix.cuda}}" - test_script: "./ci/test.sh -cxx ${{matrix.compiler.exe}} -std ${{matrix.std}} -arch ${{matrix.gpu_build_archs}} -i ${{matrix.compiler.name}}${{matrix.compiler.version}}-cuda${{matrix.cuda}}" + build_script: "./ci/build.sh --cxx ${{matrix.compiler.exe}} --std ${{matrix.std}} -arch ${{matrix.gpu_build_archs}} -i ${{matrix.compiler.name}}${{matrix.compiler.version}}-cuda${{matrix.cuda}}" + test_script: "./ci/test.sh --cxx ${{matrix.compiler.exe}} --std ${{matrix.std}} -arch ${{matrix.gpu_build_archs}} -i ${{matrix.compiler.name}}${{matrix.compiler.version}}-cuda${{matrix.cuda}}" container_image: rapidsai/devcontainers:${{inputs.devcontainer_version}}-cpp-${{matrix.compiler.name}}${{matrix.compiler.version}}-cuda${{matrix.cuda}}-${{matrix.os}} run_tests: ${{ contains(matrix.jobs, 'test') && !contains(github.event.head_commit.message, 'skip-tests') }} diff --git a/ci/build.sh b/ci/build.sh index d6d449fcf..81176ebda 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -37,20 +37,20 @@ function usage { echo echo "Options:" echo " -v/--verbose: enable shell echo for debugging" - echo " -prefix: Build directory prefix (Defaults to /build)" - echo " -i/-infix: Build directory infix (Defaults to local)" - echo " -d/-debug: Debug build" - echo " -c/-clean: Clean (re-)build" - echo " -cuda: CUDA compiler (Defaults to \$CUDACXX if set, otherwise nvcc)" - echo " -cxx: Host compiler (Defaults to \$CXX if set, otherwise g++)" - echo " -arch: Target CUDA arches, e.g. \"60-real;70;80-virtual\" (Defaults to the system's native GPU archs)" - echo " -std: CUDA/C++ standard (Defaults to 17)" - echo " -p/-par: Build parallelism (Defaults to \$PARALLEL_LEVEL if set, otherwise the system's number of CPU cores)" + echo " --prefix: Build directory prefix (Defaults to /build)" + echo " -i/--infix: Build directory infix (Defaults to local)" + echo " -d/--debug: Debug build" + echo " -c/--clean: Clean (re-)build" + echo " -p/--parallel: Build parallelism (Defaults to \$PARALLEL_LEVEL if set, otherwise the system's number of CPU cores)" + echo " --cuda: CUDA compiler (Defaults to \$CUDACXX if set, otherwise nvcc)" + echo " --cxx: Host compiler (Defaults to \$CXX if set, otherwise g++)" + echo " --arch: Target CUDA arches, e.g. \"60-real;70;80-virtual\" (Defaults to the system's native GPU archs)" + echo " --std: CUDA/C++ standard (Defaults to 17)" echo echo "Examples:" echo " $ PARALLEL_LEVEL=8 CXX=g++-9 $0" - echo " $ $0 -cxx g++-9 -par 8 -i my_build" - echo " $ $0 -cxx g++-8 -std 14 -arch 80-real -v -cuda /usr/local/bin/nvcc" + echo " $ $0 --cxx g++-9 -p 8 -i my_build --debug" + echo " $ $0 --cxx g++-8 --prefix /usr/local --arch 80-real -v --cuda /usr/local/bin/nvcc" exit 1 } @@ -63,15 +63,15 @@ echo "Args: ${args[@]}" while [ "${#args[@]}" -ne 0 ]; do case "${args[0]}" in -v | --verbose) VERBOSE=1; args=("${args[@]:1}");; - -prefix) BUILD_PREFIX="${args[1]}"; args=("${args[@]:2}");; - -i | -infix) BUILD_INFIX="${args[1]}"; args=("${args[@]:2}");; - -d | -debug) DEBUG_BUILD=1; args=("${args[@]:1}");; - -c | -clean) CLEAN_BUILD=1; args=("${args[@]:1}");; - -cuda) CUDA_COMPILER="${args[1]}"; args=("${args[@]:2}");; - -cxx) HOST_COMPILER="${args[1]}"; args=("${args[@]:2}");; - -arch) CUDA_ARCHS="${args[1]}"; args=("${args[@]:2}");; - -std) CXX_STANDARD="${args[1]}"; args=("${args[@]:2}");; - -p | -par) PARALLEL_LEVEL="${args[1]}"; args=("${args[@]:2}");; + --prefix) BUILD_PREFIX="${args[1]}"; args=("${args[@]:2}");; + -i | --infix) BUILD_INFIX="${args[1]}"; args=("${args[@]:2}");; + -d | --debug) DEBUG_BUILD=1; args=("${args[@]:1}");; + -c | --clean) CLEAN_BUILD=1; args=("${args[@]:1}");; + -p | --parallel) PARALLEL_LEVEL="${args[1]}"; args=("${args[@]:2}");; + --cuda) CUDA_COMPILER="${args[1]}"; args=("${args[@]:2}");; + --cxx) HOST_COMPILER="${args[1]}"; args=("${args[@]:2}");; + --arch) CUDA_ARCHS="${args[1]}"; args=("${args[@]:2}");; + --std) CXX_STANDARD="${args[1]}"; args=("${args[@]:2}");; -h | -help | --help) usage ;; *) echo "Unrecognized option: ${args[0]}"; usage ;; esac @@ -96,7 +96,7 @@ if [ "$BUILD_INFIX" = "latest" ] || [ -z "$BUILD_INFIX" ]; then fi # Trigger clean (re-)build -if [ "${CLEAN_BUILD:-0}" -eq 1 ]; then +if [ "$CLEAN_BUILD" -eq 1 ]; then rm -rf BUILD_DIR fi