Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
ci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Iris
ci
Commits
12a54b5e
Commit
12a54b5e
authored
Mar 24, 2018
by
Ralf Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
be bold about colors
parent
3f640cbd
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
14 deletions
+17
-14
ansi-colors.sh
ansi-colors.sh
+6
-3
buildjob
buildjob
+4
-4
prepare-opam.sh
prepare-opam.sh
+7
-7
No files found.
ansi-colors.sh
View file @
12a54b5e
...
@@ -2,12 +2,15 @@
...
@@ -2,12 +2,15 @@
DARKGRAY
=
'0;30'
DARKGRAY
=
'0;30'
RED
=
'0;31'
RED
=
'0;31'
LIGHT
RED
=
'1;31'
BOLD
RED
=
'1;31'
GREEN
=
'0;32'
GREEN
=
'0;32'
YELLOW
=
'1;33'
BOLDGREEN
=
'1;32'
YELLOW
=
'0;33'
BOLDYELLOW
=
'1;33'
BLUE
=
'0;34'
BLUE
=
'0;34'
BOLDBLUE
=
'1;34'
PURPLE
=
'0;35'
PURPLE
=
'0;35'
LIGHT
PURPLE
=
'1;35'
BOLD
PURPLE
=
'1;35'
CYAN
=
'0;36'
CYAN
=
'0;36'
WHITE
=
'1;37'
WHITE
=
'1;37'
...
...
buildjob
View file @
12a54b5e
...
@@ -18,15 +18,15 @@ set -e
...
@@ -18,15 +18,15 @@ set -e
env
| egrep
'^(CI_BUILD_REF|CI_RUNNER)'
>
build-env.txt
env
| egrep
'^(CI_BUILD_REF|CI_RUNNER)'
>
build-env.txt
# Build
# 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
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
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
cat
build-log.txt | egrep
"[a-zA-Z0-9_/-]+
\(
(real|user): [0-9]"
|
tee
build-time.txt
# maybe validate
# maybe validate
if
[[
-n
"
$VALIDATE
"
]]
;
then
if
[[
-n
"
$VALIDATE
"
]]
;
then
echo_color
"
$GREEN
"
"[buildjob] Performing validation"
echo_color
"
$
BOLD
GREEN
"
"[buildjob] Performing validation"
make validate
;
make validate
;
fi
fi
...
@@ -35,7 +35,7 @@ if [[ -z "$OPAM_PKG_BRANCH" ]]; then
...
@@ -35,7 +35,7 @@ if [[ -z "$OPAM_PKG_BRANCH" ]]; then
OPAM_PKG_BRANCH
=
master
OPAM_PKG_BRANCH
=
master
fi
fi
if
[[
-n
"
$OPAM_PKG
"
&&
"
$CI_COMMIT_REF_NAME
"
==
"
$OPAM_PKG_BRANCH
"
]]
;
then
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
# determine package name prefix
if
[[
"
$CI_COMMIT_REF_NAME
"
==
master
]]
;
then
if
[[
"
$CI_COMMIT_REF_NAME
"
==
master
]]
;
then
OPAM_PKG_PREFIX
=
dev
OPAM_PKG_PREFIX
=
dev
...
...
prepare-opam.sh
View file @
12a54b5e
...
@@ -7,9 +7,9 @@ export OPAM_EDITOR="$(which false)"
...
@@ -7,9 +7,9 @@ export OPAM_EDITOR="$(which false)"
# Make sure we got a good OPAM.
# Make sure we got a good OPAM.
if
test
-d
"
$OPAMROOT
"
;
then
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
else
echo_color
"
$YELLOW
"
"[prepare-opam] Creating new opam root"
echo_color
"
$
BOLD
YELLOW
"
"[prepare-opam] Creating new opam root"
mkdir
"
$OPAMROOT
"
mkdir
"
$OPAMROOT
"
opam init
--no-setup
-y
opam init
--no-setup
-y
fi
fi
...
@@ -39,7 +39,7 @@ echo
...
@@ -39,7 +39,7 @@ echo
# that is not currently possible.
# that is not currently possible.
# Install fixed versions of some dependencies.
# 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
while
((
"$#"
))
;
do
# while there are arguments left
PACKAGE
=
"
$1
"
;
shift
PACKAGE
=
"
$1
"
;
shift
KIND
=
"
$1
"
;
shift
KIND
=
"
$1
"
;
shift
...
@@ -48,21 +48,21 @@ while (( "$#" )); do # while there are arguments left
...
@@ -48,21 +48,21 @@ while (( "$#" )); do # while there are arguments left
# Check if the pin is already set
# Check if the pin is already set
read
-a
PIN
<<<
$(
opam pin list |
(
egrep
"^
$PACKAGE
[. ]"
)
)
read
-a
PIN
<<<
$(
opam pin list |
(
egrep
"^
$PACKAGE
[. ]"
)
)
if
[[
"
${
PIN
[1]
}
"
==
"
$KIND
"
&&
"
${
PIN
[2]
}
"
==
"
$VERSION
"
]]
;
then
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
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
"
opam pin add
-y
-k
"
$KIND
"
"
$PACKAGE
"
"
$VERSION
"
fi
fi
done
done
echo
echo
# Upgrade cached things.
# 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
opam upgrade
-y
--fixup
&&
opam upgrade
-y
echo
echo
# Install build-dependencies.
# 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
make build-dep
OPAMFLAGS
=
-y
echo
echo
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment