Skip to main content

Jobs

Jobs form a crucial component of any workflow. This document will describe the features of jobs as well as provide examples of using them.

Overview#

Each workflow is made of a series of jobs, which are seperate tasks that are to be performed on a runner. Using jobs we can:

  • Run a series of command-line applications in the form of steps.
  • Automate FPGA tools and applications.
  • Form complex dependencies between jobs.

The jobs for a particular workflow may be found by clicking on the workflow in a project's page.

jobsexample-1

Status#

Jobs may have a particular status:

StatusDescription
PassJob has completed succesfully
FailJob has failed
PendingJob is in progress
IdleJob has not started

Configuration Examples#

Concurrent builds#

The following example shows a single workflow that will run two jobs in parallel. By default, all jobs will run in parallel. To create jobs, you need a jobs: section in bbx./config.yaml. Each job will require a unique name, in the provided example the jobs have been named example-build and example-test. Since each job is independent of the other, they will run in parallel.

runners: example-runner:  image: ubuntu-vitis-2020-1
jobs:    example-build:  runner: example-runner  steps:   - run:      name: Running a build      command: |       echo "Running a build"
 example-test:  runner: example-runner  steps:   - run:      name: Running a Test      command: |       echo "Running a test"

workflows: workflow-example:  jobs:   - example-build   - example-test

Parallel builds#

Jobs may require the completion of another job, such as when running a build and then testing that build. Dependencies between jobs can be created through the depends The following example shows a single workflow that will run three jobs that depend on each other. To create a dependency, you need to include a depends in the job, followed by a list of the jobs the current job is dependent on.

runners: example-runner:  image: ubuntu-vitis-2020-1
jobs:    example-build:  runner: example-runner  steps:   - run:      name: Running a build      command: echo "Running a build"
 example-test-1:  runner: example-runner  depends:   - example-build  steps:   - run:      name: Running a Test      command: echo "Running a first test"
 example-test-2:  runner: example-runner  depends:   - example-test-1  steps:   - run:      name: Running a Test      command: echo "Running a second test"

workflows: workflow-example:  jobs:   - example-build   - example-test-1   - example-test-2