Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
lektor
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Kubat
lektor
Validations
e56fe3f1
Vérifiée
Valider
e56fe3f1
rédigé
4 years ago
par
Kubat
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
CI: Add help to validate.bash an fix the CI file.
parent
ba0fb9fe
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion
!105
Refactor and more
Modifications
2
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
2 fichiers modifiés
.gitlab-ci.yml
+1
-1
1 ajout, 1 suppression
.gitlab-ci.yml
scripts/validate.bash
+50
-5
50 ajouts, 5 suppressions
scripts/validate.bash
avec
51 ajouts
et
6 suppressions
.gitlab-ci.yml
+
1
−
1
Voir le fichier @
e56fe3f1
...
@@ -27,7 +27,7 @@ Env Finalize:
...
@@ -27,7 +27,7 @@ Env Finalize:
<<
:
*main_tests
<<
:
*main_tests
stage
:
Finalization
stage
:
Finalization
allow_failure
:
true
allow_failure
:
true
when
:
on_succes
s
when
:
alway
s
script
:
script
:
-
rm -rf $HOME/$CI_PIPELINE_ID
-
rm -rf $HOME/$CI_PIPELINE_ID
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
scripts/validate.bash
+
50
−
5
Voir le fichier @
e56fe3f1
...
@@ -13,6 +13,7 @@ LKT_STEP="" # Steps: configure, build, etc
...
@@ -13,6 +13,7 @@ LKT_STEP="" # Steps: configure, build, etc
LKT_DIR
=
"
$PWD
"
# The project directory
LKT_DIR
=
"
$PWD
"
# The project directory
LKT_CONFIGURE_OPTIONS
=
""
# Options to pass to the configure command
LKT_CONFIGURE_OPTIONS
=
""
# Options to pass to the configure command
LKT_CORE_NUMBER
=
4
# Number of cores to use with make
LKT_CORE_NUMBER
=
4
# Number of cores to use with make
LKT_TEST
=
""
# Which tests to perform
### Utility functions ########################################################
### Utility functions ########################################################
function
die
()
function
die
()
...
@@ -37,9 +38,32 @@ function check_make ()
...
@@ -37,9 +38,32 @@ function check_make ()
make
$*
||
die
"Failed to make with compiler
$LKT_COMPILER
"
make
$*
||
die
"Failed to make with compiler
$LKT_COMPILER
"
}
}
function
help
()
{
cat
<<
EOF
Usage validate.bash --build=* --step=* [option]
--help, -h Prints this help message.
--build=comp Specify the compiler.
--step=AA,BB,.. Specify the steps to do. The list may contains the
following items: configure, launch, build.
Step configure options:
--debug Perform a debug build.
--static-modules Build modules inside liblektor.so, not in their own
.so files.
Step launch options:
--test=AA,BB,.. Perform the specified tests.
EOF
}
if
!
[
-f
$PWD
/scripts/validate.sh
]
;
then
if
!
[
-f
$PWD
/scripts/validate.sh
]
;
then
die This script should be run from the root of the project
die
"
This script should be run from the root of the project
"
fi
fi
SQLITE3
=
$(
which sqlite3
)
[
$?
-ne
0
]
&&
die
"Can't find the sqlite3 executable"
### CONFIGURE ################################################################
### CONFIGURE ################################################################
# Globals: #
# Globals: #
...
@@ -51,8 +75,8 @@ function do_configure ()
...
@@ -51,8 +75,8 @@ function do_configure ()
check_cd
$LKT_DIR
check_cd
$LKT_DIR
mkdir
{
build,install
}
.
$LKT_COMPILER
mkdir
{
build,install
}
.
$LKT_COMPILER
check_cd build.
$LKT_COMPILER
check_cd build.
$LKT_COMPILER
check_configure
\
check_configure
\
--prefix
=
$LKT_DIR
/install.
$LKT_COMPILER
\
--prefix
=
$LKT_DIR
/install.
$LKT_COMPILER
\
$LKT_CONFIGURE_OPTIONS
$LKT_CONFIGURE_OPTIONS
check_cd
$LKT_DIR
check_cd
$LKT_DIR
}
}
...
@@ -76,12 +100,28 @@ function do_steps ()
...
@@ -76,12 +100,28 @@ function do_steps ()
{
{
local
_build
=
""
local
_build
=
""
local
_configure
=
""
local
_configure
=
""
local
_launch
=
""
for
step
in
$LKT_STEP
;
do
for
step
in
$LKT_STEP
;
do
case
"
$step
"
in
case
"
$step
"
in
build
)
do_build
;;
build
)
_build
=
"yes"
;;
configure
)
do_configure
;;
configure
)
_configure
=
"yes"
;;
launch
)
_launch
=
"yes"
;;
esac
esac
done
done
[
"x
$_configure
"
=
"xyes"
]
&&
do_configure
[
"x
$_build
"
=
"xyes"
]
&&
do_build
[
"x
$_launch
"
=
"xyes"
]
&&
do_launch
}
### PERFORM THE TESTS ########################################################
# Globals: #
# - LKT_TEST Which tests to perform #
# - LKT_DIR The project root directory #
function
do_launch
()
{
check_cd
$LKT_DIR
die
"No test available"
}
}
### PROCESS ARGS #############################################################
### PROCESS ARGS #############################################################
...
@@ -119,11 +159,16 @@ for arg in $* ; do
...
@@ -119,11 +159,16 @@ for arg in $* ; do
--step
=
*
)
--step
=
*
)
LKT_STEP
=
$(
echo
"A
$arg
"
|
sed
-e
's/A--step=//g'
-e
's/,/ /g'
)
LKT_STEP
=
$(
echo
"A
$arg
"
|
sed
-e
's/A--step=//g'
-e
's/,/ /g'
)
;;
;;
--test
=
*
)
LKT_TEST
=
$(
echo
"A
$arg
"
|
sed
-e
's/A--test=//g'
-e
's/,/ /g'
)
;;
*
)
*
)
die
"Unknown argument
$arg
"
die
"Unknown argument
$arg
"
;;
;;
esac
esac
done
done
### DO OUR STUFF HERE ########################################################
process_args
process_args
do_steps
do_steps
exit
0
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter