WSL/SLF GitLab Repository
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
snow-models
inishell
Commits
8e464618
Commit
8e464618
authored
May 12, 2022
by
buergiss
Browse files
Pipeline
parent
7a869120
Pipeline
#571
failed with stages
in 3 minutes and 34 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
0 → 100644
View file @
8e464618
default
:
image
:
gcc
# official gcc image, based on debian, see https://hub.docker.com/_/gcc/
tags
:
[
'
docker'
]
before_script
:
-
apt-get update && apt-get -y install cmake qttools5-dev-tools qttools5-dev
stages
:
-
build
-
test
-
release build
-
release
build
:
stage
:
build
script
:
-
cmake -S . -B . -D DEST:STRING=safe -D USE_LTO_OPTIMIZATIONS:BOOL=OFF -D CPACK_BUNDLE_ALL:BOOL=ON -D CMAKE_BUILD_TYPE:STRING=coverage
-
make -j
2
artifacts
:
expire_in
:
1h
paths
:
-
bin/inishell
test
:
stage
:
test
script
:
# Simulate display
-
apt-get install -y xvfb
-
Xvfb :1 -screen 0 1024x768x16 &> xvfb.log &
-
export DISPLAY=:1.0
# Run tests
-
cd tests
-
./run_tests.sh
Debian release build
:
stage
:
release build
rules
:
-
if
:
$CI_COMMIT_TAG
# Run this job when a tag is created manually
dependencies
:
[]
script
:
-
export INISHELL_VERSION=${CI_COMMIT_TAG#*-}
-
export VERSION_MAJOR=`echo $INISHELL_VERSION | cut -d. -f1`
-
export VERSION_MINOR=`echo $INISHELL_VERSION | cut -d. -f2`
-
export VERSION_PATCH=`echo $INISHELL_VERSION | cut -d. -f3`
-
echo VERSION_MAJOR=$VERSION_MAJOR - VERSION_MINOR=$VERSION_MINOR - VERSION_PATCH=$VERSION_PATCH
-
cmake -S . -B . -D DEST:STRING=safe -D USE_LTO_OPTIMIZATIONS:BOOL=ON -D CPACK_BUNDLE_ALL:BOOL=ON -D CMAKE_BUILD_TYPE:STRING=release -D CPACK_GENERATOR:STRING="DEB;TGZ"
-
make -j
2
-
cpack
artifacts
:
expire_in
:
1h
paths
:
-
Inishell-${CI_COMMIT_TAG#*-}-x86_64.tar.gz
-
Inishell-${CI_COMMIT_TAG#*-}-x86_64.deb
Fedora release build
:
stage
:
release build
image
:
fedora
rules
:
-
if
:
$CI_COMMIT_TAG
# Run this job when a tag is created manually
dependencies
:
[]
before_script
:
-
yum -y install make gcc g++ cmake rpm-build qt5-qttools-devel
script
:
-
echo "%__os_install_post %{nil}" > ~/.rpmmacros
# Turn off binary stripping for rpm
-
export INISHELL_VERSION=${CI_COMMIT_TAG#*-}
-
export VERSION_MAJOR=`echo $INISHELL_VERSION | cut -d. -f1`
-
export VERSION_MINOR=`echo $INISHELL_VERSION | cut -d. -f2`
-
export VERSION_PATCH=`echo $INISHELL_VERSION | cut -d. -f3`
-
echo VERSION_MAJOR=$VERSION_MAJOR - VERSION_MINOR=$VERSION_MINOR - VERSION_PATCH=$VERSION_PATCH
-
cmake -S . -B . -D DEST:STRING=safe -D USE_LTO_OPTIMIZATIONS:BOOL=ON -D CPACK_BUNDLE_ALL:BOOL=ON -D CMAKE_BUILD_TYPE:STRING=release -D CPACK_GENERATOR:STRING="RPM"
-
make -j
2
-
cpack
artifacts
:
expire_in
:
1h
paths
:
-
Inishell-${CI_COMMIT_TAG#*-}-x86_64.rpm
release
:
stage
:
release
image
:
registry.gitlab.com/gitlab-org/release-cli:latest
before_script
:
# overrides global before_script
-
apk add --no-cache curl
rules
:
-
if
:
$CI_COMMIT_TAG
# Run this job when a tag is created manually
dependencies
:
-
Debian release build
-
Fedora release build
script
:
-
export INISHELL_VERSION=${CI_COMMIT_TAG#*-}
-
echo "Uploading Inishell-${INISHELL_VERSION} packages to
${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/inishell/${INISHELL_VERSION}/Inishell-${INISHELL_VERSION}-*"
-
'
curl
-i
--header
"JOB-TOKEN:
$CI_JOB_TOKEN"
--upload-file
Inishell-${INISHELL_VERSION}-x86_64.tar.gz
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/inishell/${INISHELL_VERSION}/Inishell-${INISHELL_VERSION}-x86_64.tar.gz"'
-
'
curl
-i
--header
"JOB-TOKEN:
$CI_JOB_TOKEN"
--upload-file
Inishell-${INISHELL_VERSION}-x86_64.rpm
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/inishell/${INISHELL_VERSION}/Inishell-${INISHELL_VERSION}-x86_64.rpm"'
-
'
curl
-i
--header
"JOB-TOKEN:
$CI_JOB_TOKEN"
--upload-file
Inishell-${INISHELL_VERSION}-x86_64.deb
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/inishell/${INISHELL_VERSION}/Inishell-${INISHELL_VERSION}-x86_64.deb"'
release
:
name
:
'
Release
$CI_COMMIT_TAG'
description
:
'
Created
using
GitLab
CI/CD'
tag_name
:
'
$CI_COMMIT_TAG'
ref
:
'
$CI_COMMIT_TAG'
assets
:
links
:
-
name
:
'
Linux
Debian
binary
tarball'
url
:
'
${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/inishell/${CI_COMMIT_TAG#*-}/Inishell-${CI_COMMIT_TAG#*-}-x86_64.tar.gz'
link_type
:
'
other'
-
name
:
'
Linux
Fedora
RPM
binary
package'
url
:
'
${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/inishell/${CI_COMMIT_TAG#*-}/Inishell-${CI_COMMIT_TAG#*-}-x86_64.rpm'
link_type
:
'
other'
-
name
:
'
Linux
Debian
DEB
binary
package'
url
:
'
${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/inishell/${CI_COMMIT_TAG#*-}/Inishell-${CI_COMMIT_TAG#*-}-x86_64.deb'
link_type
:
'
other'
\ No newline at end of file
CMakeLists.txt
View file @
8e464618
...
...
@@ -2,9 +2,17 @@
CMAKE_MINIMUM_REQUIRED
(
VERSION 3.1.0
)
LIST
(
APPEND CMAKE_MODULE_PATH
"
${
CMAKE_SOURCE_DIR
}
/tools/cmake/"
)
SET
(
VERSION_MAJOR 2 CACHE INTERNAL
""
)
SET
(
VERSION_MINOR 0 CACHE INTERNAL
""
)
SET
(
VERSION_PATCH 7 CACHE INTERNAL
""
)
# Version of library
IF
(
DEFINED ENV{VERSION_MAJOR} AND DEFINED ENV{VERSION_MINOR} AND DEFINED ENV{VERSION_PATCH}
)
SET
(
VERSION_MAJOR $ENV{VERSION_MAJOR} CACHE INTERNAL
"Major version"
)
SET
(
VERSION_MINOR $ENV{VERSION_MINOR} CACHE INTERNAL
"Minor version"
)
SET
(
VERSION_PATCH $ENV{VERSION_PATCH} CACHE INTERNAL
"Patch version"
)
ELSE
()
SET
(
VERSION_MAJOR 2 CACHE INTERNAL
""
)
SET
(
VERSION_MINOR 0 CACHE INTERNAL
""
)
SET
(
VERSION_PATCH 7 CACHE INTERNAL
""
)
ENDIF
()
PROJECT
(
inishell VERSION
${
VERSION_MAJOR
}
.
${
VERSION_MINOR
}
.
${
VERSION_PATCH
}
)
CONFIGURE_FILE
(
${
PROJECT_SOURCE_DIR
}
/src/main/config.h.in
${
PROJECT_SOURCE_DIR
}
/src/main/config.h
)
...
...
@@ -222,7 +230,8 @@ IF(UNIX)
SET
(
CPACK_PACKAGE_ICON
"
${
CMAKE_SOURCE_DIR
}
/resources/icons/inishell_192.icns"
)
SET_SOURCE_FILES_PROPERTIES
(
${
CPACK_BUNDLE_ICON
}
PROPERTIES MACOSX_PACKAGE_LOCATION Resources
)
ELSE
(
APPLE
)
#Linux packages: rmp, deb and tgz
SET
(
CPACK_GENERATOR
"DEB;RPM;TGZ"
)
SET
(
CPACK_GENERATOR
"DEB;RPM;TGZ"
CACHE STRING
"Which packages to build"
)
MARK_AS_ADVANCED
(
FORCE CPACK_GENERATOR
)
SET
(
CPACK_PACKAGING_INSTALL_PREFIX
"/usr"
)
SET
(
CPACK_DEBIAN_PACKAGE_NAME
"inishell"
)
SET
(
CPACK_DEBIAN_PACKAGE_SECTION
"Education/Science"
)
...
...
tests/run_tests.sh
View file @
8e464618
...
...
@@ -3,17 +3,12 @@
#Run INIshell unit tests.
#https://gitlabext.wsl.ch/snow-models/inishell
printf
"*** Building...
\n
"
cd
..
make
>>
/dev/null
printf
" done
\n\n
"
cd
tests
../bin/inishell
--version
echo
-e
"*** Starting INIshell. This is its output:
\n
"
../bin/inishell
-i
unit_test_inireader.ini
-o
unit_test_inireader_output.ini AAA::delete
=
""
NEW::new_key
=
new_value
--exit
difference
=
$(
diff
"unit_test_inireader_output.ini"
"unit_test_inireader_expected_result.ini"
)
return_code
=
$(
echo
"
$?
"
)
if
[
-z
"
$difference
"
]
;
then
echo
"*** All ok for the INI parser."
else
...
...
@@ -23,3 +18,4 @@ else
fi
echo
"*** All done"
exit
$return_code
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment