From fa7026d1475686bde78bad08caf2729ca6462f9c Mon Sep 17 00:00:00 2001 From: Michael Adams Date: Wed, 31 Jan 2024 15:35:00 -0800 Subject: [PATCH] Removed several obsolete files related to Travis CI. --- build/travis/CMakeLists.txt | 55 ---------- build/travis/build | 209 ------------------------------------ build/travis/prebuild | 40 ------- 3 files changed, 304 deletions(-) delete mode 100644 build/travis/CMakeLists.txt delete mode 100755 build/travis/build delete mode 100755 build/travis/prebuild diff --git a/build/travis/CMakeLists.txt b/build/travis/CMakeLists.txt deleted file mode 100644 index c44a8804..00000000 --- a/build/travis/CMakeLists.txt +++ /dev/null @@ -1,55 +0,0 @@ -cmake_minimum_required(VERSION 2.6 FATAL_ERROR) -project(demo LANGUAGES C) -cmake_policy(SET CMP0012 NEW) - -include(CheckIncludeFiles) -include(CheckCSourceCompiles) - -option(ENABLE_LIBJPEG "Enable JPEG library" ON) - -if (NOT JASPER_INCLUDE_DIR) - set(JASPER_INCLUDE_DIR "/tmp/jasper/install/include") -endif() -if (NOT JASPER_LIBRARIES) - set(JASPER_LIBRARIES "-L/tmp/jasper/install/lib" "-ljasper") -endif() - -find_package(JPEG) -message("JPEG library found: ${JPEG_FOUND}") -if (ENABLE_LIBJPEG AND JPEG_FOUND) - message("JPEG include directory: ${JPEG_INCLUDE_DIR}") - message("JPEG libraries: ${JPEG_LIBRARIES}") - include_directories(${JPEG_INCLUDE_DIR}) - # In some versions of the JPEG library, the header file jpeglib.h - # does not include some of the header files upon which it depends - # (e.g., stdio.h and stdint.h). So, we cannot reliably use - # check_include_file here. - set(CMAKE_REQUIRED_INCLUDES ${JPEG_INCLUDE_DIR}) - check_c_source_compiles(" - #include - #include - #include - int main() {} - " HAVE_JPEGLIB_H) - message("HAVE_JPEGLIB_H: ${HAVE_JPEGLIB_H}") - if(NOT HAVE_JPEGLIB_H) - message(WARNING "Disabling LIBJPEG.") - set(JPEG_FOUND false) - set(JPEG_LIBRARIES "") - set(JPEG_INCLUDE_DIR "") - set(ENABLE_LIBJPEG 0) - endif() -endif() -message("ENABLE_LIBJPEG: ${ENABLE_LIBJPEG}") - -if (UNIX) - set(MATH_LIBRARY "m") -else() - set(MATH_LIBRARY "") -endif() - -message("JASPER_INCLUDE_DIR ${JASPER_INCLUDE_DIR}") -message("JASPER_LIBRARIES ${JASPER_LIBRARIES}") -include_directories(${JASPER_INCLUDE_DIR}) -link_libraries(${JASPER_LIBRARIES} ${JPEG_LIBRARIES} ${MATH_LIBRARY}) -add_executable(jasper jasper.c) diff --git a/build/travis/build b/build/travis/build deleted file mode 100755 index 0bea0b03..00000000 --- a/build/travis/build +++ /dev/null @@ -1,209 +0,0 @@ -#! /usr/bin/env bash - -panic() -{ - echo "FATAL ERROR: $@" - exit 1 -} - -tmp_dir=/tmp/jasper -in_source_build=0 -verbose=0 - -while getopts vIt: option; do - case "$option" in - t) - tmp_dir="$OPTARG";; - v) - verbose=$((verbose + 1));; - I) - in_source_build=1;; - *) - usage;; - esac -done -shift $((OPTIND - 1)) - -source_dir=$(pwd) || panic - -if [ "$in_source_build" -ne 0 ]; then - - echo "In-source build" - - cmake_opts=() - cmake_opts+=(-DJAS_ENABLE_DANGEROUS_INTERNAL_TESTING_MODE=1) - (cd "$source_dir" && \ - cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$install_dir" \ - -DALLOW_IN_SOURCE_BUILD=true "${cmake_opts[@]}" .) || \ - panic "cmake failed" - - (cd "$source_dir" && make clean && make all) || \ - panic "make clean/all failed" - - (cd "$source_dir" && make install) || panic "make install failed" - - (cd "$source_dir" && \ - JAS_INTERNAL_TESTING_MODE=1 \ - CTEST_OUTPUT_ON_FAILURE=TRUE \ - make test ARGS="-V") || \ - panic "make test failed" - -else - - export JAS_TEST_WRAPPER_VERBOSE=1 - - case "$CC" in - *gcc*) - C_COMPILER=gcc;; - *clang*) - C_COMPILER=clang;; - *) - C_COMPILER=unknown;; - esac - - echo "Compiler: $C_COMPILER" - - build_dir=/tmp/jasper/build - - echo "Out-of-source build" - - for lib_type in static shared; do - - install_dir="$tmp_dir/$lib_type/install" - test_dir="$tmp_dir/$lib_type/test" - if [ "$lib_type" = shared ]; then - enable_shared=true - else - enable_shared=false - fi - - echo "############################################################" - echo "############################################################" - echo "Library type: $lib_type" - - if [ "$TRAVIS_OS_NAME" = "osx" -a "$C_COMPILER" = "clang" ]; then - build_tool="xcode" - else - build_tool="make" - fi - - case "$build_tool" in - make) - build_targets=(clean all install) - cmake_generator="Unix Makefiles" - build_opts=("VERBOSE=1") - ;; - xcode) - build_targets=(clean_all install) - cmake_generator="Xcode" - build_opts=() - ;; - *) - esac - - echo "########################################" - echo "cmake" - echo "build tool: $build_tool" - echo "########################################" - - cmake_opts=() - cmake_opts+=(-G "$cmake_generator") - cmake_opts+=(-DCMAKE_INSTALL_PREFIX="$install_dir") - cmake_opts+=(-DJAS_ENABLE_SHARED="$enable_shared") - cmake_opts+=(-DJAS_ENABLE_DANGEROUS_INTERNAL_TESTING_MODE=1) - cmake_opts+=(-H. -B"$build_dir") - cmake_opts+=("$@") - echo "Running cmake ${cmake_opts[@]}" - (cd "$source_dir" && \ - cmake "${cmake_opts[@]}") || panic "cmake failed" - - case "$build_tool" in - xcode) - echo "Running xcodebuild with -list" - (cd "$build_dir" && xcodebuild -list) - ;; - esac - #echo "Running cmake with --target help" - #cmake --build "$build_dir" --target help - - echo "########################################" - echo "build" - echo "########################################" - - for target in "${build_targets[@]}"; do - echo "########################################" - echo "make $target" - echo "########################################" - cmake_opts=() - cmake_opts+=(--build "$build_dir") - if [ "$target" = "clean_all" ]; then - cmake_opts+=(--clean-first) - else - cmake_opts+=(--target "$target") - fi - cmake_opts+=(--) - cmake_opts+=("${build_opts[@]}") - echo "Running cmake ${cmake_opts[@]}" - (cmake "${cmake_opts[@]}") || panic "build of $target failed" - if [ "$verbose" -ge 1 ]; then - for dir in src/app src/libjasper test/bin; do - echo "Listing directory $build_dir/$dir" - (cd "$build_dir" && ls -alR "$dir") - done - fi - if [ "$verbose" -ge 1 ]; then - for dir in "$install_dir"; do - if [ -d "$dir" ]; then - echo "Listing directory $dir" - (cd "$dir" && ls -alR) || \ - panic "cannot list directory $dir" - else - echo "Directory not found $dir" - fi - done - fi - done - - echo "########################################" - echo "external test" - echo "########################################" - - mkdir -p "$test_dir" || panic "cannot make directory $test_dir" - for file in build/travis/CMakeLists.txt src/app/jasper.c; do - cp "$source_dir/$file" "$test_dir" || \ - panic "cannot copy $file" - done - cmake_opts=() - cmake_opts+=(-H"$test_dir" -B"$test_dir") - cmake_opts+=(-G "Unix Makefiles") - cmake_opts+=(-DJASPER_LIBRARIES="-L$install_dir/lib -ljasper") - cmake_opts+=(-DJASPER_INCLUDE_DIR="$install_dir/include") - cmake_opts+=(-DJAS_ENABLE_DANGEROUS_INTERNAL_TESTING_MODE=1) - cmake "${cmake_opts[@]}" || panic "cmake failed" - for target in clean all; do - (cd "$test_dir" && make "$target" VERBOSE=1) || \ - panic "make $target failed" - done - - if [ "$lib_type" = shared ]; then - echo "########################################" - echo "test" - echo "########################################" - - #(cd "$build_dir" && \ - # CTEST_OUTPUT_ON_FAILURE=TRUE make test ARGS="-V") || \ - # panic "make test failed" - - ctest_opts=() - #ctest_opts+=(--verbose) - ctest_opts+=(--extra-verbose) - ctest_opts+=(--output-on-failure) - echo "Running ctest ${ctest_opts[@]}" - (cd "$build_dir" && \ - JAS_INTERNAL_TESTING_MODE=1 \ - ctest "${ctest_opts[@]}") || panic "ctest failed" - fi - - done - -fi diff --git a/build/travis/prebuild b/build/travis/prebuild deleted file mode 100755 index cf9296f6..00000000 --- a/build/travis/prebuild +++ /dev/null @@ -1,40 +0,0 @@ -#! /bin/bash - -bash --version -cmake --version - -case "$TRAVIS_OS_NAME" in -linux) - sudo apt-get install freeglut3-dev freeglut3 - sudo apt-get install libjpeg-turbo8 libjpeg-turbo8-dev - ;; -osx) - #brew update - #brew outdated bash || brew upgrade bash - ;; -*) - ;; -esac - -bash --version - -ls_list=() -ls_list+=(/usr/include) -ls_list+=(/usr/include/GL) -ls_list+=(/usr/include/OpenGL) -ls_list+=(/usr/include/GLUT) -ls_list+=(/System/Library/Frameworks/OpenGL.framework) -ls_list+=(/System/Library/Frameworks/OpenGL.framework/Headers) -ls_list+=(/System/Library/Frameworks/GLUT.framework) -ls_list+=(/System/Library/Frameworks/GLUT.framework/Headers) -ls_list+=(/System/Library/Frameworks/Cocoa.framework) -ls_list+=(/System/Library/Frameworks/Cocoa.framework/Headers) -for dir in "${ls_list[@]}"; do - echo "Listing of directory $dir:" - ls -al "$dir" -done - -echo "############################################################" -echo "End of prebuild" -echo "############################################################" -