Skip to content

Add support for bootstrap commands #5171

Add support for bootstrap commands

Add support for bootstrap commands #5171

Workflow file for this run

name: Build
on:
pull_request:
branches: [develop]
# Here we list file types that don't affect the build and don't need to use
# up our Actions runners.
paths-ignore:
# draw.io (diagrams.net) files, the source of png images for docs
- '**.drawio'
# Example configuration files
- '**.example'
# Markdown documentation
- '**.md'
# Images for documentation
- '**.png'
# Templates for README files
- '**.tpl'
# Sample config files and OpenAPI docs
- '**.yaml'
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
list-variants:
# This needs to be its own job since the build job needs its output before
# it can initialize
if: github.repository == 'bottlerocket-os/bottlerocket'
name: "Determine variants"
runs-on: ubuntu-latest
outputs:
variants: ${{ steps.get-variants.outputs.variants }}
aarch-enemies: ${{ steps.get-variants.outputs.aarch-enemies }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/list-variants
id: get-variants
build:
needs: list-variants
runs-on:
group: bottlerocket
labels: bottlerocket_ubuntu-latest_32-core
continue-on-error: true
strategy:
matrix:
variant: ${{ fromJson(needs.list-variants.outputs.variants) }}
arch: [x86_64, aarch64]
exclude: ${{ fromJson(needs.list-variants.outputs.aarch-enemies) }}
fail-fast: false
name: "Build ${{ matrix.variant }}-${{ matrix.arch }}"
steps:
- name: Random delay
run: |
delay=$((1 + $RANDOM % 32))
echo "Waiting ${delay} seconds before execution"
sleep $delay
- uses: actions/checkout@v4
- name: Preflight step to set up the runner
uses: ./.github/actions/setup-node
- run: rustup component add rustfmt
- run: cargo make -e BUILDSYS_VARIANT=${{ matrix.variant }} unit-tests
- run: cargo make -e BUILDSYS_VARIANT=${{ matrix.variant }} check-fmt
- run: cargo make -e BUILDSYS_VARIANT=${{ matrix.variant }} check-clippy
- run: cargo make -e BUILDSYS_VARIANT=${{ matrix.variant }} check-shell
- run: |
cargo make -e BUILDSYS_VARIANT=${{ matrix.variant }} \
-e BUILDSYS_ARCH=${{ matrix.arch }} \
-e BUILDSYS_JOBS=12