Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cuteLib-hsrt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tobias Glaser
cuteLib-hsrt
Commits
b6ead5ad
Commit
b6ead5ad
authored
4 months ago
by
tobiglaser
Browse files
Options
Downloads
Patches
Plain Diff
added Fedora & Ubuntu CI
parent
bbc49746
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+76
-5
76 additions, 5 deletions
.gitlab-ci.yml
examples/CMakeLists.txt
+12
-5
12 additions, 5 deletions
examples/CMakeLists.txt
examples/example.cpp
+16
-0
16 additions, 0 deletions
examples/example.cpp
with
104 additions
and
10 deletions
.gitlab-ci.yml
+
76
−
5
View file @
b6ead5ad
...
@@ -2,6 +2,74 @@ stages:
...
@@ -2,6 +2,74 @@ stages:
-
build
-
build
-
release
-
release
Fedora
:
stage
:
build
image
:
fedora:latest
only
:
-
tags
tags
:
[
linux
,
fedora
]
script
:
# Build Environment
-
sudo dnf check-upgrade && sudo dnf upgrade -y
-
sudo dnf install -y cmake gcc gcc-c++
-
sudo dnf install -y qt6-qtbase-devel qt6-qtcharts-devel
# Compile
-
mkdir build -p && cd build
-
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++
-
cmake --build . --target cute
-
ls -lh
-
cd ..
# Collect all Files and zip them
-
mkdir -p template/{lib,src,.vscode}
-
mv build/libcute.so template/lib/
-
mv include/cute.h template/lib/
-
mv include/dllDefines.h template/lib/
-
mv src/main.cpp template/lib/
-
mv examples/CMakeLists.txt template/
-
mv examples/example.cpp template/
-
mv .clang-format template/
-
mv .gitignore template/
-
mv .vscode/extensions.json template/.vscode/
-
zip -r template-fedora.zip template/
# Upload the zip to the Package Registry
-
$URL = "${CI_API_V4_URL}/projects/$CI_PROJECT_ID/packages/generic/cutelib-hsrt/$CI_COMMIT_TAG/template-fedora.zip"
-
curl --header "JOB-TOKEN
:
$CI_JOB_TOKEN" --upload-file template-fedora.zip "$URL"
Ubuntu
:
stage
:
build
image
:
ubuntu:latest
only
:
-
tags
tags
:
[
linux
,
ubuntu
]
script
:
# Build Environment
-
sudo apt update && sudo apt upgrade -y
-
sudo apt install -y cmake build-essential
-
sudo apt install -y qt6-base-dev qt6-charts-dev
# Compile
-
mkdir build -p && cd build
-
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++
-
cmake --build . --target cute
-
ls -lh
-
cd ..
# Collect all Files and zip them
-
mkdir -p template/{lib,src,.vscode}
-
mv build/libcute.so template/lib/
-
mv include/cute.h template/lib/
-
mv include/dllDefines.h template/lib/
-
mv src/main.cpp template/lib/
-
mv examples/CMakeLists.txt template/
-
mv examples/example.cpp template/
-
mv .clang-format template/
-
mv .gitignore template/
-
mv .vscode/extensions.json template/.vscode/
-
zip -r template-ubuntu.zip template/
# Upload the zip to the Package Registry
-
$URL = "${CI_API_V4_URL}/projects/$CI_PROJECT_ID/packages/generic/cutelib-hsrt/$CI_COMMIT_TAG/template-ubuntu.zip"
-
curl --header "JOB-TOKEN
:
$CI_JOB_TOKEN" --upload-file template-ubuntu.zip "$URL"
# see https://www.msys2.org/docs/ci/#gitlab
# see https://www.msys2.org/docs/ci/#gitlab
Windows-MSYS2-MINGW64
:
Windows-MSYS2-MINGW64
:
stage
:
build
stage
:
build
...
@@ -56,7 +124,7 @@ Windows-MSYS2-MINGW64:
...
@@ -56,7 +124,7 @@ Windows-MSYS2-MINGW64:
mv include/cute.h template/lib/
mv include/cute.h template/lib/
mv include/dllDefines.h template/lib/
mv include/dllDefines.h template/lib/
mv src/main.cpp template/lib/
mv src/main.cpp template/lib/
mv examples/C
m
akeLists.txt template/
mv examples/C
M
akeLists.txt template/
mv examples/example.cpp template/
mv examples/example.cpp template/
mv .clang-format template/
mv .clang-format template/
mv .gitignore template/
mv .gitignore template/
...
@@ -82,7 +150,7 @@ Publish:
...
@@ -82,7 +150,7 @@ Publish:
release
:
release
:
name
:
"
Release
$CI_COMMIT_TAG"
name
:
"
Release
$CI_COMMIT_TAG"
tag_name
:
"
$CI_COMMIT_TAG"
tag_name
:
"
$CI_COMMIT_TAG"
description
:
"
Automated
release
including
Windows
builds
and
Doxygen
documentation."
# & Linux
description
:
"
Automated
release
including
Windows
and
Linux
builds
as
well
as
Doxygen
documentation."
assets
:
assets
:
links
:
links
:
-
name
:
"
Windows
Template"
-
name
:
"
Windows
Template"
...
@@ -91,6 +159,9 @@ Publish:
...
@@ -91,6 +159,9 @@ Publish:
-
name
:
"
Doxygen"
-
name
:
"
Doxygen"
link_type
:
other
link_type
:
other
url
:
"
${CI_API_V4_URL}/projects/$CI_PROJECT_ID/packages/generic/cutelib-hsrt/$CI_COMMIT_TAG/doxygen.zip"
url
:
"
${CI_API_V4_URL}/projects/$CI_PROJECT_ID/packages/generic/cutelib-hsrt/$CI_COMMIT_TAG/doxygen.zip"
#- name: "Linux Template"
-
name
:
"
Fedora
Template"
# link_type: package
link_type
:
package
# url: "${CI_API_V4_URL}/projects/$CI_PROJECT_ID/packages/generic/cutelib-hsrt/$CI_COMMIT_TAG/template-linux.zip"
url
:
"
${CI_API_V4_URL}/projects/$CI_PROJECT_ID/packages/generic/cutelib-hsrt/$CI_COMMIT_TAG/template-fedora.zip"
-
name
:
"
Ubuntu
Template"
link_type
:
package
url
:
"
${CI_API_V4_URL}/projects/$CI_PROJECT_ID/packages/generic/cutelib-hsrt/$CI_COMMIT_TAG/template-ubuntu.zip"
This diff is collapsed.
Click to expand it.
examples/CMakeLists.txt
+
12
−
5
View file @
b6ead5ad
...
@@ -6,7 +6,7 @@ set(CMAKE_CXX_STANDARD 17)
...
@@ -6,7 +6,7 @@ set(CMAKE_CXX_STANDARD 17)
set
(
CMAKE_CXX_STANDARD_REQUIRED ON
)
set
(
CMAKE_CXX_STANDARD_REQUIRED ON
)
set
(
MY_TARGET
"cybersolution"
)
set
(
MY_TARGET
"cybersolution"
)
# <-- Name of the executable
if
(
WIN32
)
if
(
WIN32
)
set
(
CMAKE_FIND_LIBRARY_SUFFIXES
".a"
${
CMAKE_FIND_LIBRARY_SUFFIXES
}
)
set
(
CMAKE_FIND_LIBRARY_SUFFIXES
".a"
${
CMAKE_FIND_LIBRARY_SUFFIXES
}
)
...
@@ -42,7 +42,14 @@ if(WIN32)
...
@@ -42,7 +42,14 @@ if(WIN32)
endif
(
WIN32
)
endif
(
WIN32
)
# Use this command to copy the .dll from the lib folder next to the freshly built .exe. Which is the most simple way to get it working.
# Use this command to copy the .dll from the lib folder next to the freshly built .exe. Which is the most simple way to get it working.
if
(
WIN32
)
add_custom_command
(
TARGET
${
MY_TARGET
}
POST_BUILD
# Adds a post-build event to DynamicDemo
add_custom_command
(
TARGET
${
MY_TARGET
}
POST_BUILD
# Adds a post-build event to DynamicDemo
COMMAND
${
CMAKE_COMMAND
}
-E copy_if_different
# which executes "cmake - E copy_if_different..."
COMMAND
${
CMAKE_COMMAND
}
-E copy_if_different
# which executes "cmake - E copy_if_different..."
"
${
PROJECT_SOURCE_DIR
}
/lib/cute.dll"
# <--this is in-file
"
${
PROJECT_SOURCE_DIR
}
/lib/cute.dll"
# <--this is in-file
$<TARGET_FILE_DIR:
${
MY_TARGET
}
>
)
# <--this is out-file path
$<TARGET_FILE_DIR:
${
MY_TARGET
}
>
)
# <--this is out-file path
else
()
add_custom_command
(
TARGET
${
MY_TARGET
}
POST_BUILD
# Adds a post-build event to DynamicDemo
COMMAND
${
CMAKE_COMMAND
}
-E copy_if_different
# which executes "cmake - E copy_if_different..."
"
${
PROJECT_SOURCE_DIR
}
/lib/libcute.so"
# <--this is in-file
$<TARGET_FILE_DIR:
${
MY_TARGET
}
>
)
# <--this is out-file path
endif
(
WIN32
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
examples/example.cpp
0 → 100644
+
16
−
0
View file @
b6ead5ad
#include
"cute.h"
void
my_func
();
void
setup
()
{
cute
::
registerAlgorithm
(
my_func
,
"MY FUNCTION"
);
}
void
my_func
()
{
cute
::
setStatusMessage
(
"Hello World!"
,
2
);
}
\ No newline at end of file
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
sign in
to comment