Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ci
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Iris
ci
Commits
12a54b5e
Commit
12a54b5e
authored
7 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
be bold about colors
parent
3f640cbd
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ansi-colors.sh
+6
-3
6 additions, 3 deletions
ansi-colors.sh
buildjob
+4
-4
4 additions, 4 deletions
buildjob
prepare-opam.sh
+7
-7
7 additions, 7 deletions
prepare-opam.sh
with
17 additions
and
14 deletions
ansi-colors.sh
+
6
−
3
View file @
12a54b5e
...
...
@@ -2,12 +2,15 @@
DARKGRAY
=
'0;30'
RED
=
'0;31'
LIGHT
RED
=
'1;31'
BOLD
RED
=
'1;31'
GREEN
=
'0;32'
YELLOW
=
'1;33'
BOLDGREEN
=
'1;32'
YELLOW
=
'0;33'
BOLDYELLOW
=
'1;33'
BLUE
=
'0;34'
BOLDBLUE
=
'1;34'
PURPLE
=
'0;35'
LIGHT
PURPLE
=
'1;35'
BOLD
PURPLE
=
'1;35'
CYAN
=
'0;36'
WHITE
=
'1;37'
...
...
This diff is collapsed.
Click to expand it.
buildjob
+
4
−
4
View file @
12a54b5e
...
...
@@ -18,15 +18,15 @@ set -e
env
| egrep
'^(CI_BUILD_REF|CI_RUNNER)'
>
build-env.txt
# Build
echo_color
"
$GREEN
"
"[buildjob] Perfoming build"
echo_color
"
$
BOLD
GREEN
"
"[buildjob] Perfoming build"
time
make
-k
-j
$CPU_CORES
TIMED
=
y 2>&1 |
tee
build-log.txt
if
fgrep Axiom build-log.txt
>
/dev/null
;
then
exit
1
;
fi
echo_color
"
$GREEN
"
"[buildjob] Build time summary"
echo_color
"
$
BOLD
GREEN
"
"[buildjob] Build time summary"
cat
build-log.txt | egrep
"[a-zA-Z0-9_/-]+
\(
(real|user): [0-9]"
|
tee
build-time.txt
# maybe validate
if
[[
-n
"
$VALIDATE
"
]]
;
then
echo_color
"
$GREEN
"
"[buildjob] Performing validation"
echo_color
"
$
BOLD
GREEN
"
"[buildjob] Performing validation"
make validate
;
fi
...
...
@@ -35,7 +35,7 @@ if [[ -z "$OPAM_PKG_BRANCH" ]]; then
OPAM_PKG_BRANCH
=
master
fi
if
[[
-n
"
$OPAM_PKG
"
&&
"
$CI_COMMIT_REF_NAME
"
==
"
$OPAM_PKG_BRANCH
"
]]
;
then
echo_color
"
$GREEN
"
"[buildjob] Releasing package on opam"
echo_color
"
$
BOLD
GREEN
"
"[buildjob] Releasing package on opam"
# determine package name prefix
if
[[
"
$CI_COMMIT_REF_NAME
"
==
master
]]
;
then
OPAM_PKG_PREFIX
=
dev
...
...
This diff is collapsed.
Click to expand it.
prepare-opam.sh
+
7
−
7
View file @
12a54b5e
...
...
@@ -7,9 +7,9 @@ export OPAM_EDITOR="$(which false)"
# Make sure we got a good OPAM.
if
test
-d
"
$OPAMROOT
"
;
then
echo_color
"
$GREEN
"
"[prepare-opam] Re-using cached opam root"
echo_color
"
$
BOLD
GREEN
"
"[prepare-opam] Re-using cached opam root"
else
echo_color
"
$YELLOW
"
"[prepare-opam] Creating new opam root"
echo_color
"
$
BOLD
YELLOW
"
"[prepare-opam] Creating new opam root"
mkdir
"
$OPAMROOT
"
opam init
--no-setup
-y
fi
...
...
@@ -39,7 +39,7 @@ echo
# that is not currently possible.
# Install fixed versions of some dependencies.
echo_color
"
$GREEN
"
"[prepare-opam] Processing pins"
echo_color
"
$
BOLD
GREEN
"
"[prepare-opam] Processing pins"
while
((
"$#"
))
;
do
# while there are arguments left
PACKAGE
=
"
$1
"
;
shift
KIND
=
"
$1
"
;
shift
...
...
@@ -48,21 +48,21 @@ while (( "$#" )); do # while there are arguments left
# Check if the pin is already set
read
-a
PIN
<<<
$(
opam pin list |
(
egrep
"^
$PACKAGE
[. ]"
)
)
if
[[
"
${
PIN
[1]
}
"
==
"
$KIND
"
&&
"
${
PIN
[2]
}
"
==
"
$VERSION
"
]]
;
then
echo_color
"
$GREEN
"
"[prepare-opam]
$PACKAGE
already
$KIND
-pinned to
$VERSION
"
echo_color
"
$
BOLD
GREEN
"
"[prepare-opam]
$PACKAGE
already
$KIND
-pinned to
$VERSION
"
else
echo_color
"
$YELLOW
"
"[prepare-opam]
$KIND
-pinning
$PACKAGE
to
$VERSION
"
echo_color
"
$
BOLD
YELLOW
"
"[prepare-opam]
$KIND
-pinning
$PACKAGE
to
$VERSION
"
opam pin add
-y
-k
"
$KIND
"
"
$PACKAGE
"
"
$VERSION
"
fi
done
echo
# Upgrade cached things.
echo_color
"
$GREEN
"
"[prepare-opam] Upgrading opam"
echo_color
"
$
BOLD
GREEN
"
"[prepare-opam] Upgrading opam"
opam upgrade
-y
--fixup
&&
opam upgrade
-y
echo
# Install build-dependencies.
echo_color
"
$GREEN
"
"[prepare-opam] Installing build-dependencies"
echo_color
"
$
BOLD
GREEN
"
"[prepare-opam] Installing build-dependencies"
make build-dep
OPAMFLAGS
=
-y
echo
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment