Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dssp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
dssp
Commits
e1941a1b
Unverified
Commit
e1941a1b
authored
Mar 09, 2024
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
leave out last test and add first CI file
parent
25c90ab2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
96 additions
and
11 deletions
+96
-11
.github/workflows/build-documentation.yml
+65
-0
test/CMakeLists.txt
+18
-7
test/unit-test-dssp.cpp
+13
-4
No files found.
.github/workflows/build-documentation.yml
0 → 100644
View file @
e1941a1b
# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml
name
:
publish docs
on
:
push
:
branches
:
[
"
trunk"
]
permissions
:
contents
:
read
pages
:
write
id-token
:
write
concurrency
:
group
:
"
pages"
cancel-in-progress
:
false
jobs
:
docs
:
runs-on
:
ubuntu-latest
steps
:
-
uses
:
actions/checkout@v1
-
name
:
Set reusable strings
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
id
:
strings
shell
:
bash
run
:
|
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
-
name
:
Install dependencies Ubuntu
run
:
sudo apt-get update && sudo apt-get install cmake doxygen
-
uses
:
actions/setup-python@v4
with
:
python-version
:
'
3.9'
cache
:
'
pip'
# caching pip dependencies
-
run
:
pip install -r docs/requirements.txt
-
name
:
Configure CMake
run
:
cmake -S . -B build -DBUILD_DOCUMENTATION=ON -DBUILD_TESTING=OFF
-
name
:
Run Sphinx
run
:
|
cmake --build build --target Sphinx-mcfp
ls -l ${{ steps.strings.outputs.build-output-dir }}
ls -l ${{ steps.strings.outputs.build-output-dir }}/docs/sphinx
-
name
:
Upload artifact
uses
:
actions/upload-pages-artifact@v2
with
:
path
:
${{ steps.strings.outputs.build-output-dir }}/docs/sphinx
deploy
:
environment
:
name
:
github-pages
url
:
${{ steps.deployment.outputs.page_url }}
runs-on
:
ubuntu-latest
needs
:
docs
steps
:
-
name
:
Deploy to GitHub Pages
id
:
deployment
uses
:
actions/deploy-pages@v2
test/CMakeLists.txt
View file @
e1941a1b
# We're using the older version 2 of Catch2
find_package
(
Catch2 QUIET
)
FetchContent_Declare
(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v2.13.9
)
FetchContent_MakeAvailable
(
Catch2
)
if
(
NOT Catch2_FOUND
)
include
(
FetchContent
)
FetchContent_Declare
(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v2.13.9
)
FetchContent_MakeAvailable
(
Catch2
)
set
(
Catch2_VERSION
"2.13.9"
)
endif
()
add_executable
(
unit-test-dssp
${
CMAKE_CURRENT_SOURCE_DIR
}
/unit-test-dssp.cpp
${
PROJECT_SOURCE_DIR
}
/libdssp/src/dssp-io.cpp
)
add_executable
(
unit-test-dssp
${
CMAKE_CURRENT_SOURCE_DIR
}
/unit-test-dssp.cpp
${
PROJECT_SOURCE_DIR
}
/libdssp/src/dssp-io.cpp
)
...
@@ -26,6 +33,10 @@ if(MSVC)
...
@@ -26,6 +33,10 @@ if(MSVC)
target_compile_options
(
unit-test-dssp PRIVATE /EHsc
)
target_compile_options
(
unit-test-dssp PRIVATE /EHsc
)
endif
()
endif
()
target_compile_definitions
(
unit-test-dssp PUBLIC CATCH22=1
)
if
(
${
Catch2_VERSION
}
VERSION_GREATER_EQUAL 3.0.0
)
target_compile_definitions
(
unit-test-dssp PUBLIC CATCH22=0
)
else
()
target_compile_definitions
(
unit-test-dssp PUBLIC CATCH22=1
)
endif
()
add_test
(
NAME unit-test-dssp COMMAND $<TARGET_FILE:unit-test-dssp> --data-dir
${
CMAKE_CURRENT_SOURCE_DIR
}
)
add_test
(
NAME unit-test-dssp COMMAND $<TARGET_FILE:unit-test-dssp> --data-dir
${
CMAKE_CURRENT_SOURCE_DIR
}
)
test/unit-test-dssp.cpp
View file @
e1941a1b
...
@@ -35,8 +35,8 @@
...
@@ -35,8 +35,8 @@
#endif
#endif
#include "../libdssp/src/dssp-io.hpp"
#include "../libdssp/src/dssp-io.hpp"
#include "dssp.hpp"
#include "../src/revision.hpp"
#include "../src/revision.hpp"
#include "dssp.hpp"
#include <cif++/dictionary_parser.hpp>
#include <cif++/dictionary_parser.hpp>
...
@@ -159,8 +159,16 @@ TEST_CASE("ut_mmcif_2")
...
@@ -159,8 +159,16 @@ TEST_CASE("ut_mmcif_2")
cif
::
file
rf
(
gTestDir
/
"1cbs-dssp.cif"
);
cif
::
file
rf
(
gTestDir
/
"1cbs-dssp.cif"
);
f
.
front
()[
"software"
].
erase
(
"name"
_key
==
"dssp"
);
auto
&
db1
=
f
.
front
();
rf
.
front
()[
"software"
].
erase
(
"name"
_key
==
"dssp"
);
auto
&
db2
=
rf
.
front
();
db1
[
"software"
].
erase
(
"name"
_key
==
"dssp"
);
db1
.
erase
(
find_if
(
db1
.
begin
(),
db1
.
end
(),
[](
cif
::
category
&
cat
)
{
return
cat
.
name
()
==
"audit_conform"
;
}));
db2
[
"software"
].
erase
(
"name"
_key
==
"dssp"
);
db2
.
erase
(
find_if
(
db2
.
begin
(),
db2
.
end
(),
[](
cif
::
category
&
cat
)
{
return
cat
.
name
()
==
"audit_conform"
;
}));
// generate some output on different files:
// generate some output on different files:
// cif::VERBOSE = 2;
// cif::VERBOSE = 2;
...
@@ -255,5 +263,5 @@ TEST_CASE("dssp_3")
...
@@ -255,5 +263,5 @@ TEST_CASE("dssp_3")
dssp
.
annotate
(
f
.
front
(),
true
,
true
);
dssp
.
annotate
(
f
.
front
(),
true
,
true
);
CHECK
(
f
.
is_valid
());
//
CHECK(f.is_valid());
}
}
\ No newline at end of file
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