/firebuild-action

GitHub Action to speed up (build) commands using Firebuild

Primary LanguageTypeScriptMIT LicenseMIT

Firebuild for GitHub Actions

A GitHub Action to speed up (build) commands using Firebuild

Works on Linux

Usage

- name: firebuild
  uses: firebuild/firebuild-action@v4

NB! This should always come after the actions/checkout step.

To install firebuild the license needs to be accepted by installing the Firebuild App for the owner of the repository where this action will run.

In order to use firebuild in your steps, prefix the commands to be accelerated with "firebuild "

- name: build
  run: |
   firebuild <your command>
    ...

Firebuild gets installed by this action if it is not installed yet.

If you have multiple jobs

If you have multiple jobs or targets (eg. Debug, Release) or multiple OS's, it makes sense to cache them separately. An additional cache key can be specified.

jobs:
  some_build:
    steps:
      ...
      - name: firebuild
        uses: firebuild/firebuild-action@v4
        with:
          key: ${{ github.job }}-${{ matrix.os }}  # Eg. "some_build-ubuntu-latest"
  some_other_build:
    ...

Other options

See action.yml for a full list of options.

Firebuild statistics

Stats are provided as part of the post action, check the output to see if cache is effective.

How it works

This action is based on https://cristianadam.eu/20200113/speeding-up-c-plus-plus-github-actions-using-ccache/

In a nutshell, the .cache/firebuild folder is configured in the runner path and the folder is persisted and reloaded using cache. For more details see: https://docs.github.com/en/free-pro-team@latest/actions/guides/caching-dependencies-to-speed-up-workflows.