Skip to content

Dev: Build Pipeline

markusTraber edited this page Jan 30, 2021 · 30 revisions

Documentation

The automatic build on pull is now deactivated. To activate it again, move " build.yml" from .github/disabled-workflows/ to .github/workflows/.

General

Every configuration file for Github Actions can be found in the following repo directory:

Automatically create branch from issue

With the GitHub Action "Create Issue Branch", we trigger the creation of a branch in relation to an issue just by assigning the issue. After a short moment the branch should be created and can be pulled and checked out.

This enables coherent naming conventions for branches.

Automatically building the IVA app

When a person makes a pull request into master, this will trigger the build server to build the current branch.

Every time this process is being triggered, IVA will be built in Windows, Mac OS and Linux. You can easily download the executables afterwards, have a look at the next section for more information on that.

For a more detailed description on how this works, have a look at the following linked "build.yml"-file. I added comments in order to explain the inner workings directly in the file.

Downloading build artifacts

Click on "Actions" and then select the newest "C/C++ CI"-Workflow, that has been successfully run. You should see a section "Artifacts" where as of now only one link to Linux artifacts is being provided.

Linux

Please keep in mind, that these artifacts are currently built in Ubuntu 18.04. Problems with execution could arise when certain libraries are missing or the distribution links libraries differently. I did not test on Ubuntu 18.04, if the executable is working.

Mac Os

Due to the fact, that the artifact is not being signed, Mac Os will prevent you from directly running the executable. You can change this by navigating with the Terminal to the place, where your "ivaApp.app" is located. Execute the following command: chmod -R 777 ivaApp.app You now should be able to execute the app.

Windows

Only tested in Windows 10 VM and did not work because of missing libraries. Has to be further investigated.

Adding ofx addons

If you want to add an addon, you have to add that addon also to the Github Action for building the project. Therefore you have to edit the Configuration file — build.yml.

In the file find the following comment:

# Addons: Checking out additional addons into the correct openFrameworks directory

Here is how the code for the "ofxCv" addon looks:

- name: Checkout ofxCv addon
   uses: actions/checkout@v2
   with:
     repository:  kylemcdonald/ofxCv
     path: ofx/addons/ofxCv

You will have to change the name, the repository and the path paramter.

  • name: Just adapt it to the name of the new addon.
  • repository: Currently only GitHub repositories are supported. In front of the slash character belongs the owner of the repository. After the slash you have to put the repository name. Basically, if you look at the web-address of the ofxCv repo https://github.com/kylemcdonald/ofxCv, just remove the "https://github.com/" part.
  • path: Just replace the last directory with the correct addon name.

You have to insert this at three positions, because each operating system is being dealt with separately.

GitHub CTECH subscription plan

The "ctechfilmuniversity" Team is currently using the "Team" plan.

  • Unlimited public/private repositories
  • Required reviewers
  • 3,000 Actions minutes/month (Free for public repositories)
  • 2GB of GitHub Packages storage (Free for public repositories)
  • Code owners

Outlook

How the build pipeline can be enhanced

  • Automated code quality, security checks
  • Automated checks for code style
  • Include tests, maybe also have a look at test driven development

Code Checks

Links