Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit cd167b5

Browse files
committed
Updated ci build scripts (from rspec-dev) 3-13
1 parent 75a6e2a commit cd167b5

12 files changed

+26
-45
lines changed

.github/dependabot.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2023-12-25T16:05:21+00:00 from the rspec-dev repo.
1+
# This file was generated on 2024-06-20T11:25:31+01:00 from the rspec-dev repo.
22
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
33

44
version: 2

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2023-12-25T16:05:21+00:00 from the rspec-dev repo.
1+
# This file was generated on 2024-06-20T11:25:31+01:00 from the rspec-dev repo.
22
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
33

44
name: RSpec CI

.rubocop_rspec_base.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2023-12-25T16:05:21+00:00 from the rspec-dev repo.
1+
# This file was generated on 2024-06-20T11:25:31+01:00 from the rspec-dev repo.
22
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
33

44
# This file contains defaults for RSpec projects. Individual projects

script/ci_functions.sh

+3-27
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2023-12-25T16:05:21+00:00 from the rspec-dev repo.
1+
# This file was generated on 2024-06-20T11:25:31+01:00 from the rspec-dev repo.
22
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
33

44
# Taken from:
@@ -30,41 +30,17 @@ nano_cmd="$(type -p gdate date | head -1)"
3030
nano_format="+%s%N"
3131
[ "$(uname -s)" != "Darwin" ] || nano_format="${nano_format/%N/000000000}"
3232

33-
travis_time_start() {
34-
travis_timer_id=$(printf %08x $(( RANDOM * RANDOM )))
35-
travis_start_time=$($nano_cmd -u "$nano_format")
36-
printf "travis_time:start:%s\r\e[0m" $travis_timer_id
37-
}
38-
39-
travis_time_finish() {
40-
local travis_end_time=$($nano_cmd -u "$nano_format")
41-
local duration=$(($travis_end_time-$travis_start_time))
42-
printf "travis_time:end:%s:start=%s,finish=%s,duration=%s\r\e[0m" \
43-
$travis_timer_id $travis_start_time $travis_end_time $duration
44-
}
45-
4633
fold() {
4734
local name="$1"
4835
local status=0
4936
shift 1
50-
if [ -n "$TRAVIS" ]; then
51-
printf "travis_fold:start:%s\r\e[0m" "$name"
52-
travis_time_start
53-
else
54-
echo "============= Starting $name ==============="
55-
fi
37+
echo "============= Starting $name ==============="
5638

5739
"$@"
5840
status=$?
5941

60-
[ -z "$TRAVIS" ] || travis_time_finish
61-
6242
if [ "$status" -eq 0 ]; then
63-
if [ -n "$TRAVIS" ]; then
64-
printf "travis_fold:end:%s\r\e[0m" "$name"
65-
else
66-
echo "============= Ending $name ==============="
67-
fi
43+
echo "============= Ending $name ==============="
6844
else
6945
STATUS="$status"
7046
fi

script/clone_all_rspec_repos

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# This file was generated on 2023-12-25T16:05:21+00:00 from the rspec-dev repo.
2+
# This file was generated on 2024-06-20T11:25:31+01:00 from the rspec-dev repo.
33
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
44

55
set -e
@@ -8,7 +8,7 @@ source script/functions.sh
88
if is_mri; then
99
pushd ..
1010

11-
clone_repo "rspec"
11+
clone_repo "rspec-metagem" "rspec"
1212
clone_repo "rspec-core"
1313
clone_repo "rspec-expectations"
1414
clone_repo "rspec-mocks"

script/cucumber.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# This file was generated on 2023-12-25T16:05:21+00:00 from the rspec-dev repo.
2+
# This file was generated on 2024-06-20T11:25:31+01:00 from the rspec-dev repo.
33
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
44

55
set -e

script/functions.sh

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
# This file was generated on 2023-12-25T16:05:21+00:00 from the rspec-dev repo.
1+
# This file was generated on 2024-06-20T11:25:31+01:00 from the rspec-dev repo.
22
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
33

44
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
55
source $SCRIPT_DIR/ci_functions.sh
66
source $SCRIPT_DIR/predicate_functions.sh
77

88
# If JRUBY_OPTS isn't set, use these.
9-
# see https://docs.travis-ci.com/user/ci-environment/
109
export JRUBY_OPTS=${JRUBY_OPTS:-"--server -Xcompile.invokedynamic=false"}
1110
SPECS_HAVE_RUN_FILE=specs.out
1211
MAINTENANCE_BRANCH=`cat maintenance-branch`
@@ -20,12 +19,18 @@ fi
2019
function clone_repo {
2120
if [ ! -d $1 ]; then # don't clone if the dir is already there
2221
if [ -z "$2" ]; then
22+
DIR_TARGET="$1"
23+
else
24+
DIR_TARGET="$2"
25+
fi
26+
27+
if [ -z "$3" ]; then
2328
BRANCH_TO_CLONE="${MAINTENANCE_BRANCH?}";
2429
else
25-
BRANCH_TO_CLONE="$2";
30+
BRANCH_TO_CLONE="$3";
2631
fi;
2732

28-
ci_retry eval "git clone https://github.com/rspec/$1 --depth 1 --branch ${BRANCH_TO_CLONE?}"
33+
ci_retry eval "git clone https://github.com/rspec/$1 --depth 1 --branch ${BRANCH_TO_CLONE?} ${DIR_TARGET?}"
2934
fi;
3035
}
3136

script/legacy_setup.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# This file was generated on 2023-12-25T16:05:21+00:00 from the rspec-dev repo.
2+
# This file was generated on 2024-06-20T11:25:31+01:00 from the rspec-dev repo.
33
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
44

55
set -e

script/predicate_functions.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2023-12-25T16:05:21+00:00 from the rspec-dev repo.
1+
# This file was generated on 2024-06-20T11:25:31+01:00 from the rspec-dev repo.
22
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
33

44
function is_mri {

script/run_build

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# This file was generated on 2023-12-25T16:05:21+00:00 from the rspec-dev repo.
2+
# This file was generated on 2024-06-20T11:25:31+01:00 from the rspec-dev repo.
33
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
44

55
set -e

script/run_rubocop

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# This file was generated on 2023-12-25T16:05:21+00:00 from the rspec-dev repo.
2+
# This file was generated on 2024-06-20T11:25:31+01:00 from the rspec-dev repo.
33
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
44

55
set -e

script/update_rubygems_and_install_bundler

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#!/bin/bash
2-
# This file was generated on 2023-12-25T16:05:21+00:00 from the rspec-dev repo.
2+
# This file was generated on 2024-06-20T11:25:31+01:00 from the rspec-dev repo.
33
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
44

55
set -e
66
source script/functions.sh
77

88
if is_ruby_31_plus; then
9-
echo "Installing rubygems 3.3.6 / bundler 2.3.6"
10-
yes | gem update --system '3.3.6'
11-
yes | gem install bundler -v '2.3.6'
9+
echo "Installing most recent rubygems / bundler"
10+
yes | gem update --no-document --system
11+
yes | gem install --no-document bundler
1212
elif is_ruby_23_plus; then
1313
echo "Installing rubygems 3.2.22 / bundler 2.2.22"
1414
yes | gem update --system '3.2.22'

0 commit comments

Comments
 (0)