Giter Site home page Giter Site logo

librecores-pipeline-lib's Introduction

LibreCores Jenkins Pipeline Library

This library contains common operations and logic for LibreCores CI.

Status

The library is under development. All commands may change, the compatibility is not guaranteed.

Classes

Modules

This is the class to more conveniently build CI based on Environment Modules (http://modules.sourceforge.net/). First modules are loaded to the environment and calling sh() then executes the command(s) in that environment.

Usage:

@Library('librecoresci') import org.librecores.ci.Modules
def lcci = new Modules(steps)

node('librecores-ci-modules') {
  lcci.load(["eda/verilator/3.902"])

  stage('Simulation Build') {
    lcci.sh 'verilator -f verilate.vc'
  }
}

Commands

sh_with_modules()

Executes the sh() command with initializing the specified modules before executing.

Example:

node('librecores-ci-modules') {
    sh_with_modules(modules: ["gcc", "fusesoc/1.6"], command: "make all")
}

Effectively the example above creates commands like source ${modulesPath}/init/bash && sh "module load gcc && module load fusesoc/1.6 && make all".

openriscPipeline

Builds a pipeline for OpenRISC projects.

Out of the box it configures:

  • Pulls Docker images for librecores-ci-openrisc
  • Executes jobs in parallel inside Docker images

Example

This snippet is from the Jenkins pipeline for mor1kx

@Library('librecoresci') _

openriscPipeline {
        job('verilator') {
            job 'verilator'
        }

        job('testing-1') {
            job 'or1k-tests'
            sim 'icarus'
            pipeline 'CAPPUCCINO'
            expectedFailures 'or1k-cy'
        }
}

fusesoc

Builds a step for a generic FuseSoC invocation.

  • Chooses a base docker image with FuseSoC
  • Adds library to FuseSoC
  • Runs FuseSoC step
  • Runs arbitrary shell commands in this step

Example

@Library('librecoresci') _

pipeline {
    stages {
        stage('example-fusesoc-step') {
            fusesoc {
                image 'librecores/librecores-ci:0.5.0'
                library 'some_core', '/src'
        
                run('some_core') {
                    target 'fusesoc_target'
                }
        
                shell "echo 'Additional steps on shell'"
            }
        }
    }
}

yosysSynthesisReport

Build a step for Yosys Synthesis for monitoring resource usage statistics and publish on Jenkins.

  • Generalised Yosys Synthesis
  • Can be configured for various hardware projects
  • Simple declarative call which requires parameters core, target, logpath
  • Can be modified and extend to include more paramaters in future.

Example

@Library('librecoresci') _

pipeline {
    agent any 
    stages{
        stage('yosys') {
            steps {
                yosysSynthesisReport {
					core 'mor1kx'
					target 'synth'
					logPath 'build/mor1kx_5.0-r3/synth-icestorm/yosys.log'
				}
            }
        }
    }
}

librecores-pipeline-lib's People

Contributors

oleg-nenashev avatar nancy-chauhan avatar wallento avatar

Watchers

James Cloos avatar

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.