From 9c4fc8c862129ea6877e8b888079d3dcd3c4fc24 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 29 Nov 2020 22:02:02 +0300 Subject: bye-bye, Travis --- .ci/plot.sh | 45 +++++++++++++++++++++++++++++++++++++++++++++ .travis.yml | 9 --------- .travis/plot.sh | 45 --------------------------------------------- 3 files changed, 45 insertions(+), 54 deletions(-) create mode 100755 .ci/plot.sh delete mode 100644 .travis.yml delete mode 100755 .travis/plot.sh diff --git a/.ci/plot.sh b/.ci/plot.sh new file mode 100755 index 0000000..091abab --- /dev/null +++ b/.ci/plot.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash + +# Copyright (c) 2019 Egor Tensin +# This file is part of the "Sorting algorithms" project. +# For details, see https://github.com/egor-tensin/sorting-algorithms. +# Distributed under the MIT License. + +set -o errexit -o nounset -o pipefail + +script_dir="$( dirname -- "${BASH_SOURCE[0]}" )" +script_dir="$( cd -- "$script_dir" && pwd )" +readonly script_dir + +declare -a algorithm_list=( + bubble_sort + bubble_sort_optimized + heapsort + insertion_sort + merge_sort + quicksort_first + quicksort_last + quicksort_middle + quicksort_random + quicksort_second + selection_sort +) + +fix_matplotlib() { + # Get rid of: + # tkinter.TclError: no display name and no $DISPLAY environment variable + mkdir -p -- ~/.config/matplotlib + echo 'backend: Agg' > ~/.config/matplotlib/matplotlibrc +} + +main() { + fix_matplotlib + + local algorithm + for algorithm in ${algorithm_list[@]+"${algorithm_list[@]}"}; do + echo "Plotting algorithm $algorithm..." + "$script_dir/../plot.sh" "$algorithm" + done +} + +main "$@" diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 121a98e..0000000 --- a/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: python -python: - - '3.4' - - '3.5' - - '3.6' - - '3.7' -jobs: - fast_finish: true -script: ./.travis/plot.sh diff --git a/.travis/plot.sh b/.travis/plot.sh deleted file mode 100755 index 091abab..0000000 --- a/.travis/plot.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2019 Egor Tensin -# This file is part of the "Sorting algorithms" project. -# For details, see https://github.com/egor-tensin/sorting-algorithms. -# Distributed under the MIT License. - -set -o errexit -o nounset -o pipefail - -script_dir="$( dirname -- "${BASH_SOURCE[0]}" )" -script_dir="$( cd -- "$script_dir" && pwd )" -readonly script_dir - -declare -a algorithm_list=( - bubble_sort - bubble_sort_optimized - heapsort - insertion_sort - merge_sort - quicksort_first - quicksort_last - quicksort_middle - quicksort_random - quicksort_second - selection_sort -) - -fix_matplotlib() { - # Get rid of: - # tkinter.TclError: no display name and no $DISPLAY environment variable - mkdir -p -- ~/.config/matplotlib - echo 'backend: Agg' > ~/.config/matplotlib/matplotlibrc -} - -main() { - fix_matplotlib - - local algorithm - for algorithm in ${algorithm_list[@]+"${algorithm_list[@]}"}; do - echo "Plotting algorithm $algorithm..." - "$script_dir/../plot.sh" "$algorithm" - done -} - -main "$@" -- cgit v1.2.3