Code Monkey home page Code Monkey logo

sofa-setup-action's Introduction

sofa-setup-action

Usage example

In a matrix workflow with a sofa_branch axis like sofa_branch: [master, v21.06]

# Setup SOFA, dependencies, environment variables, workspace tree, ...
- name: Setup SOFA and environment
  id: sofa
  uses: sofa-framework/[email protected]
  with:
    sofa_root: ${{ github.workspace }}/sofa
    sofa_version: ${{ matrix.sofa_branch }}
    sofa_scope: 'minimal'

# Checkout my plugin sources into workspace_src_path (prepared by sofa-setup-action)
- name: Checkout source code
  uses: actions/checkout@v2
  with:
    path: ${{ steps.sofa.outputs.workspace_src_path }}

# Build, install, test, deploy my plugin
# ...

A more detailed example is available in this repository: examples/workflow.yml

Parameters

Inputs

  sofa_root:
    description: 'SOFA install directory'
    required: true
    default: '/opt/sofa'
  sofa_version:
    description: 'Major version of SOFA to install'
    required: true
    default: 'v21.06'
  sofa_scope:
    description: 'Choose between: minimal, standard, full'
    required: false
    default: 'standard'
  python_version:
    description: 'Python version to install'
    required: true
    default: '3.9'
  workspace_auto_setup:
    description: 'Should this action setup your workspace tree?'
    required: false
    default: 'true'

Outputs as objects

  sofa_version:
    description: "SOFA version"
  sofa_root:
    description: "SOFA root directory"
  exe:
    description: "Extension for executable files"
  run_branch:
    description: "Pretty git branch of this workflow run"
  python_root:
    description: "Root directory of the Python installed for SOFA"
  python_version:
    description: "Version of the Python installed for SOFA"
  vs_install_dir:
    description: "VS install directory"
  vs_vsdevcmd:
    description: "Command to init VS environment"
  workspace_src_path:
    description: "Directory to checkout your sources after calling this action"
  workspace_build_path:
    description: "Directory to build your sources after calling this action"
  workspace_install_path:
    description: "Directory to install your binaries after calling this action"
  workspace_artifact_path:
    description: "Directory to package your binaries after calling this action"

Outputs as environment variables

  EXE: see outputs as objects
  RUN_BRANCH: see outputs as objects
  
  SUDO: set to 'sudo' on Unix systems, empty on others
  EIGEN_VERSION: Fixed for now, set to '3.3.7'. Used only on Windows.
  EIGEN_INSTALL_DIR: [Internal] Directory where Eigen was installed. Used only on Windows.
  BOOST_VERSION: Fixed for now, set to '1.69.0'. Used only on Windows.
  BOOST_INSTALL_DIR: [Internal] Directory where Boost was installed. Used only on Windows.
  VS_INSTALL_DIR: see outputs as objects
  VS_VSDEVCMD: see outputs as objects
  
  WORKSPACE_SRC_PATH: see outputs as objects
  WORKSPACE_BUILD_PATH: see outputs as objects
  WORKSPACE_INSTALL_PATH: see outputs as objects
  WORKSPACE_ARTIFACT_PATH: see outputs as objects
  
  CCACHE_COMPRESS: [Unix] Default value for ccache. Set to 'true'
  CCACHE_COMPRESSLEVEL: [Unix] Default value for ccache. Set to '6'
  CCACHE_MAXSIZE: [Unix] Default value for ccache. Set to '1G'
  CCACHE_BASEDIR: [Unix] Default value for ccache. Set to WORKSPACE_BUILD_PATH
  CCACHE_DIR: [Unix] Default value for ccache. Set to GITHUB_WORKSPACE/.ccache
  
  PYTHONUSERBASE: set to 'C:\pythonuserbase' on Windows, set to '/tmp/pythonuserbase' on others
  PYTHONIOENCODING: always set to 'UTF-8' 
  PYTHON_ROOT: see outputs as objects
  Python_ROOT: see outputs as objects
  
  SOFA_VERSION_FOR_DEPS: [Internal] Variable used to install different deps upon SOFA version
  
  BOOST_ROOT: [Windows] Directory where Boost was installed, needed for CMake detection
  Boost_ROOT: [Windows] Directory where Boost was installed, needed for CMake detection
  
  EIGEN3_ROOT: [Windows] Directory where Eigen was installed, needed for CMake detection
  Eigen3_ROOT: [Windows] Directory where Eigen was installed, needed for CMake detection
  
  SOFA_ROOT: Directory where SOFA was installed

sofa-setup-action's People

Contributors

alxbilger avatar fredroy avatar guparan avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sofa-setup-action's Issues

Details on SOFA binaries

When a SOFA plugin is built (against SOFA master) with a Github action, it would be great to have access to more details on the SOFA binaries that have been used. In particular:

  • The commit hash
  • Where to download the SOFA binaries. The binaries are get from ci.inria.fr/..../lastSuccessfulBuild, but the content of this url is not constant. When accessed, it may have been replaced and the plugin is no longer compatible with this new version.

How to achieve that?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.