Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converts README.md (markdown) to README.adoc (Asciidoc) #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 43 additions & 33 deletions README.md → README.adoc
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
# LibreCores Jenkins Pipeline Library
= LibreCores Jenkins Pipeline Library
:toc:

This library contains common operations and logic for LibreCores CI.

## Status
== Status

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

## Classes
== Classes

### Modules
=== 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:

```groovy
[source,groovy]
----
@Library('librecoresci') import org.librecores.ci.Modules
def lcci = new Modules(steps)

Expand All @@ -26,37 +28,41 @@ node('librecores-ci-modules') {
lcci.sh 'verilator -f verilate.vc'
}
}
```

## Commands
----

### sh_with_modules()
== Commands

=== sh_with_modules()

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

Example:

```groovy
[source,groovy]
----
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"`.
----

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

### openriscPipeline
=== 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
==== Example

This snippet is from the Jenkins pipeline for [mor1kx](https://github.com/openrisc/mor1kx)
This snippet is from the Jenkins pipeline for https://github.com/openrisc/mor1kx[mor1kx]

```groovy
[source,groovy]
----
@Library('librecoresci') _

openriscPipeline {
Expand All @@ -71,19 +77,21 @@ openriscPipeline {
expectedFailures 'or1k-cy'
}
}
```
### fusesoc
----

=== 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
* Chooses a base docker image with FuseSoC
* Adds library to FuseSoC
* Runs FuseSoC step
* Runs arbitrary shell commands in this step

#### Example
==== Example

```groovy
[source,groovy]
----
@Library('librecoresci') _

pipeline {
Expand All @@ -102,19 +110,21 @@ pipeline {
}
}
}
```
### yosysSynthesisReport
----

=== yosysSynthesisReport

Build a step for [Yosys Synthesis](http://www.clifford.at/yosys/) for monitoring resource usage statistics and publish on Jenkins.
Build a step for http://www.clifford.at/yosys/[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.
* 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
==== Example

```groovy
[source,groovy]
----
@Library('librecoresci') _

pipeline {
Expand All @@ -131,4 +141,4 @@ pipeline {
}
}
}
```
----