This is the README file that explains the automated build system for Bedrock.
A build is done whenever a branch is pushed to the Bedrock GitHub repository. This is controlled by the GitHub actions configuration that looks something like this:
name: openbedrock
on:
push:
branches: "*"
jobs:
test-module:
runs-on: ubuntu-latest
container:
image: ghcr.io/rlauer6/bedrock-test:latest
credentials:
username: rlauer6
password: ${{ secrets.DOCKER_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: build
run: ./build-github
The build will run configure
, make
, and make test
in a pre-existing container
(bedrock-test
) previously pushed to
the GitHub container registry.
The build looks something like this:
#!/bin/bash
# -*- mode: sh; -*-
set -ex
./bootstrap
./configure
make
cd src/main/perl
make test
cd -
cd src/main/perl/lib
make test
The docker image used to build and test Bedrock is based on the `perl:5.40-threaded-bookworm' docker image (a Debian variant). A Dockerfile is provided as part of this project which will load all of the dependencies required to build and test Bedrock.
From time to time new dependencies introduced by Bedrock may require that you update the CI container. Below are some basic instructions for creating a new container.
In order to push an image to the GitHub Container Registry you need a personal access token with privileges to do so. If you've lost the token you'll need to re-create one here.
After building the image, login to the registry and push the image to GitHub.
cd docker
docker build -f Dockerfile.github . -t bedrock-test:latest
echo $GITHUB_TOKEN | docker login ghcr.io -u rlauer6 --password-stdin
docker push ghcr.io/rlauer6/bedrock-test:latest
``