weekly-build #74
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: weekly-build | |
on: | |
schedule: | |
# run at 00:00 on sunday | |
- cron: "0 0 * * 0" | |
defaults: | |
run: | |
shell: bash -leo pipefail {0} | |
env: | |
REMOTE_WORK_DIR: /scratch/buildbot/firemarshal-ci-shared/firemarshal-${{ github.sha }} | |
PERSONAL_ACCESS_TOKEN: ${{ secrets.BARTENDER_PERSONAL_ACCESS_TOKEN }} | |
jobs: | |
setup-repo: | |
name: setup-repo | |
runs-on: firemarshal | |
steps: | |
- name: Delete old checkout | |
run: | | |
ls -alh . | |
rm -rf ${{ env.REMOTE_WORK_DIR }}/* || true | |
rm -rf ${{ env.REMOTE_WORK_DIR }}/.* || true | |
rm -rf ${{ github.workspace }}/* || true | |
rm -rf ${{ github.workspace }}/.* || true | |
- uses: actions/checkout@v4 | |
- name: Setup repo copy | |
run: | | |
git clone $GITHUB_WORKSPACE ${{ env.REMOTE_WORK_DIR }} | |
- name: Setup conda (install all deps) | |
run: | | |
cd ${{ env.REMOTE_WORK_DIR }} | |
eval "$(conda shell.bash hook)" | |
./scripts/setup-conda.sh | |
- name: Initialize all submodules | |
run: | | |
cd ${{ env.REMOTE_WORK_DIR }} | |
eval "$(conda shell.bash hook)" | |
conda activate $PWD/.conda-env | |
./init-submodules.sh | |
- name: Verify open file limits | |
run: | | |
HARD_LIMIT=$(ulimit -Hn) | |
REQUIRED_LIMIT=16384 | |
if [ "$HARD_LIMIT" -lt "$REQUIRED_LIMIT" ]; then | |
echo "ERROR: Your system does not support an open files limit (the output of 'ulimit -Sn' and 'ulimit -Hn') of at least $REQUIRED_LIMIT, which is required to workaround a bug in buildroot. You will not be able to build a Linux distro with FireMarshal until this is addressed." | |
exit 1 | |
fi | |
ulimit -Sn $(ulimit -Hn) | |
build-upload-br-image: | |
name: build-upload-br-image | |
needs: [setup-repo] | |
runs-on: firemarshal | |
steps: | |
- name: Build buildroot image | |
run: | | |
cd ${{ env.REMOTE_WORK_DIR }} | |
eval "$(conda shell.bash hook)" | |
conda activate $PWD/.conda-env | |
./marshal -v build br-base.json | |
./scripts/upload-br-image.py | |
cleanup: | |
name: cleanup | |
needs: [setup-repo, build-upload-br-image] | |
runs-on: firemarshal | |
if: ${{ always() }} | |
steps: | |
- name: Delete repo copy and conda env | |
run: | | |
rm -rf ${{ env.REMOTE_WORK_DIR }} |