Skip to main content

A wrapper package designed for running continuous integration (CI) build steps using Python 3.5+.

Project description

Managing cross platform build scripts for CI can become tedious at times when you need to e.g., maintain two nearly identical scripts install_deps.sh and install_deps.bat due to incompatible syntaxes. ci_exec enables a single file to manage this using Python.

The ci_exec package provides a set of wrappers / utility functions designed specifically for running build steps on CI providers. It is

Logging by Default

Commands executed, including their full command-line arguments, are logged. This includes any output on stdout / stderr from the commands. The logging resembles what set -x would give you in a shell script. For commands that will take a long time, as long as output is being produced, this will additionally prevent timeouts on the build.

Failing by Default

Any command that does not succeed will fail the entire build. An attempt to exit with the same exit code as the command that failed will be performed. Meaning the CI provider will correctly report a failed build.

Convenient

ci_exec affords users the ability to write shell-like scripts that will work on any platform that Python can run on. A simple example:

from ci_exec import cd, which

cmake = which("cmake")
ninja = which("ninja")
with cd("build", create=True):
    cmake("..", "-G", "Ninja", "-DCMAKE_BUILD_TYPE=Release")
    ninja("-j", "2", "test")

Please refer to the full documentation for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ci_exec-0.1.0.post0.tar.gz (20.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ci_exec-0.1.0.post0-py3-none-any.whl (26.9 kB view details)

Uploaded Python 3

File details

Details for the file ci_exec-0.1.0.post0.tar.gz.

File metadata

  • Download URL: ci_exec-0.1.0.post0.tar.gz
  • Upload date:
  • Size: 20.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.2

File hashes

Hashes for ci_exec-0.1.0.post0.tar.gz
Algorithm Hash digest
SHA256 b80d38d69637928897133821db1fade92f142c92254619dd8239abde247cc674
MD5 8cd5ded2d95ed6b577c5169efcc76d1d
BLAKE2b-256 afca536e790c3611c46eb695f999a96de532ea8a96e7cb373ac4875bd5e10be3

See more details on using hashes here.

File details

Details for the file ci_exec-0.1.0.post0-py3-none-any.whl.

File metadata

  • Download URL: ci_exec-0.1.0.post0-py3-none-any.whl
  • Upload date:
  • Size: 26.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.2

File hashes

Hashes for ci_exec-0.1.0.post0-py3-none-any.whl
Algorithm Hash digest
SHA256 eaac4fd996de9d5b88e17212ba40c463a9df18b868d313da7b1021beed08bb22
MD5 74dfa8d1deb94c449d64e7c006f3d3e5
BLAKE2b-256 fd84a04882cd2b38f40ab49a504729f283df99d10243abccfa11d811c1a98b71

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page