Skip to content

Commit

Permalink
Bugfix release v1.2.1 (#126)
Browse files Browse the repository at this point in the history
* Create ContinuousIntegration.yml (#124)

* Adding GCC pragma back in to make GCC compile in release mode.

* Fixes to issues #106 and #116.

* ContinuousIntegration make is now verbose (sorry).

* Fixing up some command-line flags.

* Removing signature command-line option.

This addresses issue #125.

* Put command line option in wrong place.

* Adding catch-adapter to target_link_libraries of select tests.

* Adding catch-adapter to njoy21 library

* Changing to g++-8 (#135)

* Update installation hyperlink in readme (#134)

* Updating ReleaseNotes.

Co-authored-by: Nick Touran <contact@partofthething.com>
  • Loading branch information
jlconlin and partofthething authored Dec 14, 2020
1 parent d40447f commit 84d6f4f
Show file tree
Hide file tree
Showing 16 changed files with 66 additions and 29 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/ContinuousIntegration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# GitHub workflow to enable continuous integration
name: Continuous Integration

# This workflow is triggered on pushes and pull requests to the repository.
on:
push:
branches: '**'
pull_request:
branches: 'master'

jobs:
build:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ ubuntu-18.04, macos-10.15 ]
cxx: [ g++-8, clang++ ]
vFortran: [ gfortran-8 ]
build_type: [ Debug, Release ]

steps:
- name: which CXX
run: |
which ${{matrix.cxx}}
${{matrix.cxx}} --version
- name: which gfortran
run: |
which ${{matrix.vFortran}}
${{matrix.vFortran}} --version
- uses: actions/checkout@v2
- name: mkdir bin
run: mkdir bin
- name: cmake
run: cmake -D CMAKE_Fortran_COMPILER=`which ${{matrix.vFortran}}` -D CMAKE_CXX_COMPILER=`which ${{matrix.cxx}}` -D CMAKE_BUILD_TYPE=${{matrix.build_type}} ..
working-directory: ./bin
- name: make
run: make -j2 VERBOSE=1
working-directory: ./bin
- name: ctest
run: ctest -j2 -R njoy21*
working-directory: ./bin

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
subprojects
bin
bin*
build
__pycache__
*.pyc
Expand Down
6 changes: 2 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ option( strict_compile

# Compile flags
set( common_flags "-Wall" "-Wextra" "-Wpedantic" )
set( strict_flags "-Werror" )
set( strict_flags "-Werror" "-Wno-unknown-warning-option" )
set( release_flags "-O3" )
set( debug_flags "-O0" "-g" )

Expand Down Expand Up @@ -52,9 +52,6 @@ endif()
# Project targets
########################################################################

configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/src/njoy21/Signature.hpp.in"
"${CMAKE_CURRENT_BINARY_DIR}/src/njoy21/Signature.hpp" @ONLY )

add_library( njoy21_library INTERFACE
)
target_include_directories( njoy21_library
Expand All @@ -68,6 +65,7 @@ target_link_libraries( njoy21_library
INTERFACE njoy_c_bindings
INTERFACE tclap-adapter
INTERFACE utility
INTERFACE catch-adapter
)

#######################################################################
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ NJOY21 is primarily written in modern C++. It consists of many subprojects that
Please refer to the [Release Notes](ReleaseNotes.md) to see what has changed from one version to the next.
## Installation
Instructions for building and installing NJOY21---as well as any of the subprojects---are found on our [website](https://docs.github.io/install.html).
Instructions for building and installing NJOY21---as well as any of the subprojects---are
found on our [website](https://docs.njoy21.io/install.html).
## Version
To see the version number for NJOY21, simply execute (after building):
Expand Down
3 changes: 3 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Release Notes&mdash;NJOY21
Given here are some release notes for NJOY21. Each release is made through a formal [Pull Request](https://github.com/njoy/NJOY21/pulls) made on GitHub. There are links in this document that point to each of those Pull Requests, where you can see in great details the changes that were made. Often the Pull Requests are made in response to an [issue](https://github.com/njoy/NJOY21/issues). In such cases, links to those issues are also given.

## [NJOY21 1.2.1](https://github.com/njoy/NJOY21/pull/126)
This update removes the `--signature` command-line option as that was a feature of the previous build system. This also updates the GitHub Actions such that they now test all of the NJOY21 stuff, but not the integration tests.

## [NJOY21 1.2.0](https://github.com/njoy/NJOY21/pull/122)
This update makes significant changes to the build system. Instead of using a [homegrown](https://github.com/njoy/metaconfigure) method for handling dependencies, we now use the [`FetchContent`](https://cmake.org/cmake/help/v3.16/module/FetchContent.html) capabilities in CMake. We now require CMake 3.16 to configure and build NJOY21.

Expand Down
6 changes: 6 additions & 0 deletions cmake/develop_dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ FetchContent_Declare( tclap-adapter
GIT_SHALLOW TRUE
)

FetchContent_Declare( catch-adapter
GIT_REPOSITORY https://github.com/njoy/catch-adapter
GIT_TAG origin/master
GIT_SHALLOW TRUE
)

FetchContent_Declare( utility
GIT_REPOSITORY https://github.com/njoy/utility
GIT_TAG origin/master
Expand Down
5 changes: 4 additions & 1 deletion src/njoy21.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@
#include "Log.hpp"
#include "utility.hpp"


#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#include "lipservice.hpp"
#pragma GCC diagnostic pop

#include "njoy_c.h"

Expand All @@ -37,7 +41,6 @@ struct CommandLine;
#include "njoy21/interface.hpp"
#include "njoy21/legacy.hpp"
#include "njoy21/Version.hpp"
#include "njoy21/Signature.hpp"

}
}
Expand Down
1 change: 0 additions & 1 deletion src/njoy21/CommandLine.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ struct njoy::njoy21::CommandLine {
std::optional< std::string > errorPath;
bool legacySwitch;
bool verifyOnly;
bool signature;

/* methods */
#include "njoy21/CommandLine/src/ctor.hpp"
Expand Down
6 changes: 0 additions & 6 deletions src/njoy21/CommandLine/src/ctor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ CommandLine( int argc, char* argv[] ){
"path to file where NJOY21 error ought to be directed. (defaults to standard error)",
false, std::optional< std::string >(), " error path", cmd );

TCLAP::SwitchArg
signature( "", "signature",
"Write signature to standard output",
cmd );

TCLAP::SwitchArg
legacySwitch( "L", "legacy",
"Call to Fortran routines even if C++ routines are available", cmd );
Expand All @@ -43,6 +38,5 @@ CommandLine( int argc, char* argv[] ){
this->errorPath = errorPath.getValue();
this->legacySwitch = legacySwitch.getValue();
this->verifyOnly = verifyOnly.getValue();
this->signature = signature.getValue();
}

2 changes: 1 addition & 1 deletion src/njoy21/CommandLine/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ $<$<BOOL:${link_time_optimization}>:${${PREFIX}_link_time_optimization_flags}>
$<$<BOOL:${nonportable_optimization}>:${${PREFIX}_nonportable_optimization_flags}>>

${CXX_appended_flags} ${njoy21_appended_flags} )
target_link_libraries( njoy21.CommandLine.test PUBLIC njoy21_library )
target_link_libraries( njoy21.CommandLine.test PUBLIC njoy21_library catch-adapter )
add_test( NAME njoy21.CommandLine COMMAND njoy21.CommandLine.test )
1 change: 0 additions & 1 deletion src/njoy21/CommandLine/test/CommandLine.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ SCENARIO( "Parsing a command-line interface for options and flags" ){
REQUIRE( not CL.outputPath );
REQUIRE( not CL.legacySwitch );
REQUIRE( not CL.verifyOnly );
REQUIRE( not CL.signature );
}
GIVEN( "An instance of the Commandline with an input path" ){
std::vector< std::string > arguments = { "njoy21", "--input", "/my/path" };
Expand Down
4 changes: 0 additions & 4 deletions src/njoy21/Driver/Factory/src/setupManager.hpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
static io::Manager setupManager( CommandLine& commandLine ){
io::Manager::Builder builder;
if( commandLine.signature ){
std::cout << Signature::signature() << std::endl;
std::exit( 0 );
}

if ( commandLine.inputPath ){
builder.input( *(commandLine.inputPath) );
Expand Down
2 changes: 1 addition & 1 deletion src/njoy21/Driver/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $<$<BOOL:${link_time_optimization}>:${${PREFIX}_link_time_optimization_flags}>
$<$<BOOL:${nonportable_optimization}>:${${PREFIX}_nonportable_optimization_flags}>>

${CXX_appended_flags} ${njoy21_appended_flags} )
target_link_libraries( njoy21.Driver.test PUBLIC njoy21_library )
target_link_libraries( njoy21.Driver.test PUBLIC njoy21_library catch-adapter )
file( GLOB resources "resources/*" )
foreach( resource ${resources})
file( COPY "${resource}" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}" )
Expand Down
6 changes: 0 additions & 6 deletions src/njoy21/Signature.hpp.in

This file was deleted.

3 changes: 2 additions & 1 deletion src/njoy21/io/Manager/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ $<$<BOOL:${link_time_optimization}>:${${PREFIX}_link_time_optimization_flags}>
$<$<BOOL:${nonportable_optimization}>:${${PREFIX}_nonportable_optimization_flags}>>

${CXX_appended_flags} ${njoy21_appended_flags} )
target_link_libraries( njoy21.io.Manager.test PUBLIC njoy21_library )
target_link_libraries( njoy21.io.Manager.test PUBLIC njoy21_library
catch-adapter )
file( GLOB resources "resources/*" )
foreach( resource ${resources})
file( COPY "${resource}" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}" )
Expand Down
3 changes: 2 additions & 1 deletion src/njoy21/legacy/Sequence/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ $<$<BOOL:${link_time_optimization}>:${${PREFIX}_link_time_optimization_flags}>
$<$<BOOL:${nonportable_optimization}>:${${PREFIX}_nonportable_optimization_flags}>>

${CXX_appended_flags} ${njoy21_appended_flags} )
target_link_libraries( njoy21.legacy.Sequence.test PUBLIC njoy21_library )
target_link_libraries( njoy21.legacy.Sequence.test PUBLIC njoy21_library
catch-adapter )
add_test( NAME njoy21.legacy.Sequence COMMAND njoy21.legacy.Sequence.test )

0 comments on commit 84d6f4f

Please sign in to comment.