GitHub Action
PROS Build Action
v2.0.2
Latest version
This action creates an environment capable of building PROS projects and templates, and builds them using build.sh
Instructions on creating a custom build script, adding additional packages, and using this image as a base are located at the end of this readme.
multithreading
- Whether to use multithreading when building the project
- Default:
true
- Required:
false
no_commit_hash
- Whether to include a shortened commit hash at the end of the artifact name
- Example:
[email protected]+5881ac
- Default:
true
- Required:
false
copy_readme_and_license_to_include
- Whether to make a VERSION file, copy the README(.md), and copy the LICENSE(.md) files to the
/include/(library name)
folder. - required:
false
- default:
false
- Whether to make a VERSION file, copy the README(.md), and copy the LICENSE(.md) files to the
lib_folder_name
- The name of the library's folder name under the include directory.
- required:
if copy_readme_and_license_to_include is set
write_job_summary
- Whether to output to GitHub's Job Summary (See the bottom of this README)
- required:
false
- default:
true
Note
While this action has the name
output for the artifact name, it does not upload the artifact itself. The name
output is meant to be passed into actions/upload-artifact
.
name
- The recommended name for an artifact.
name: PROS Build Example
on:
push:
branches: "**"
pull_request:
branches: "**"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run LemLib/pros-build
id: test
uses: LemLib/[email protected]
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ steps.test.outputs.name }}
path: ${{ github.workspace }}/template/*
If you wish to use your own build script using this container as a base, you can do so with the following:
It by default includes the packages built into the Ubuntu docker image, and contains the additional packages below:
wget (Used to download the toolchain)
git (Used to get the HEAD SHA hash)
gawk (Used to get lines from the user project's Makefile)
python3-minimal (Minimal installation of Python used for pros-cli)
python3-pip (Used to install pros-cli in the Dockerfile)
unzip (Unzips the template so that it can be uploaded to Github Actions)
pros-cli (through python)
FROM ghcr.io/LemLib/pros-build:stable
# Remove the included build script.
RUN rm -rf /build.sh
## Do what you wish here, such as copying your own build script in, add dependencies, etc
# Override ENTRYPOINT with your own. This isn't strictly necessary if you name your build script build.sh and put it in the root of the container (Such as /build.sh)
ENTRYPOINT []
Build completed in 25 seconds Total Build Script Runtime: 27 seconds