Skip to content
forked from grisumbras/run-cpt

GitHub Action that runs conan_package_tools

License

Notifications You must be signed in to change notification settings

trassir/run-cpt

 
 

Repository files navigation

run-cpt

Build status

GitHub Action that runs conan_package_tools

Usage

Example usage:

uses: grisumbras/run-cpt@latest
with:
  build-script: conan/build.py
  work-dir: project_files/sources

You can set environment variables that control Conan and CPT behaviour using env key:

- uses: grisumbras/run-cpt@latest
  env:
    CONAN_REMOTES: https://api.bintray.com/conan/bincrafters/public-conan

Additionally, if CONAN_USERNAME is not specified, the first part of GITHUB_REPOSITORY (before slash) will be used.

Inputs

build-script

Path to the build script. Given build-script: x/y/z.py, the action will run python x/y/z.py. build.py by default.

work-dir

Change a current working directory to the defined in this variable. The build-script will be run from this directory. Defaults to empty string, that is: do not change the working directory.

install

Install conan_package_tools before running the build script. Available options:

  • latest will install the latest version

  • custom will install the package provided via custom-package parameter.

  • no will skip the package installation

Defaults to latest.

custom-package

Custom name/URL of the package to use with install: custom. Can be used to install some fork or any other package instead of the official CPT: like git+https://repo.com/forked-cpt.git or mycompany-cpt==0.32.

The following parameters allow you to customize conan and conan_package_tools behaviour. It is conrolled by environment variables and there is no way to undefine a variable from a workflow file after it was set. For example, you cannot set CONAN_DOCKER_IMAGE and then unset it. This does not allow you to use strategy.matrix to run several jobs based on variables. With these parameters you can setup the behaviour without using environment variables from a workflow file. Values from these parameters override the values of the corresponding environment variables, so you can setup default environment variables and modify the behaviour of a conan for some jobs/steps exclusivly.

compiler

Sets which compiler conan should use. Use this option in combination with compiler-versions. Defaults to an empty string. conan_package_tools will choose a compiler based on environment variables in this case. Other supported values are:

  • gcc

  • apple_clang

  • vs

compiler-verions

Required if compiler is set While compiler option chooses which environment variable to setup, this options sets its value:

  • CONAN_GCC_VERSIONS

  • CONAN_APPLE_CLANG_VERIONS

  • CONAN_VISUAL_VERIONS

docker-images

Overrides or clears CONAN_DOCKER_IMAGE environment variable. Set to an empty string to do nothing. Set to 'clear' to undefine the environment variable. Defaults to empty string.

Maintainer

Dmitry Arkhipov <grisumbras@gmail.com>

Contributing

Patches welcome!

License

BSL-1.0 © 2019 Dmitry Arkhipov

About

GitHub Action that runs conan_package_tools

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 99.5%
  • Python 0.5%