#build-system #continuous-integration #template #configuration #generate #testing #projects

build sifis-generate

Generate a new project for some build systems with the use of templates. <renamed to ci-generate>

12 releases

0.5.4 Nov 9, 2023
0.5.3 Sep 5, 2023
0.4.1 Feb 13, 2023
0.4.0 Sep 13, 2022
0.1.0 Nov 19, 2021

#32 in #continuous-integration

39 downloads per month

MIT license

41KB
922 lines

sifis-generate

Actions Status LICENSE

NOTE the development is now happening as ci-generate.

This tool generates either new projects for some build systems or configuration files for some Continuous Integration with the use of templates.

Templates define the layout for a project and allow developers to insert data at runtime.

Each template contains all files necessary to build a project with a build system, in addition to Continuous Integration and Docker files used to run tests and implement further checks.

Supported build systems

Build system Languages Project template CI style checks CI build CI test CI coverage upload CI static analysis CI dynamic analisys CI license checks
meson C / C++ provided ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
poetry Python provided ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
maven Java provided ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
cargo Rust offloaded ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
yarn Javascript / Typescript offloaded ✔️ ✔️

✅: Not necessary for the considered language

Commands

To see the list of supported commands, run: sifis-generate --help

Each command has an optional argument to define a license and an optional argument to override the project name instead of using the last component of the project-path. The default value for the license argument is MIT.

cargo

$ sifis-generate cargo [--license LICENSE --name NAME --branch GITHUB_BRANCH] project-path

maven

$ sifis-generate maven [--license LICENSE --name NAME --branch GITHUB_BRANCH] project-group project-path

meson

$ sifis-generate meson [--kind meson-project-kind] [--license LICENSE --name NAME --branch GITHUB_BRANCH] project-path

Admitted values for the kind argument:

  • c
  • c++

poetry

$ sifis-generate poetry [--license LICENSE --name NAME --branch GITHUB_BRANCH] project-path

yarn

$ sifis-generate yarn [--license LICENSE --name NAME --branch GITHUB_BRANCH] project-path

Configuration

It is possible to save a config.toml in ${XDG_CONFIG_HOME}/sifis-generate (Usually ~/.config/sifis-generate) with overrides for all the default and optional values, e.g:

[default]
license = "BSD-3-Clause"

[meson]
kind = "c++"

Will override the default license and meson.kind configuration items and it would be equivalent to call:

$ sifis-generate meson -k c++ -l BSD-3-Clause

The cli arguments take priority over the built-in defaults and the config.toml overrides so

$ sifis-generate meson -l LGPL-2.1

Would take the kind = c++ from the config.toml and LGPL-2.1 from the command line.

License

Released under the MIT License.

Acknowledgements

This software has been developed in the scope of the H2020 project SIFIS-Home with GA n. 952652.

Dependencies

~12–24MB
~228K SLoC