# Build Constellation binaries as quality control
name: Build Constellation binaries

on:
  workflow_dispatch:
  push:
    branches:
      - main
    paths:
      - "**.go"
  pull_request:
    paths:
      - "**.go"

# Abort runs of *this* workflow, if a new commit with the same ref is pushed.
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
  build-bootstrapper:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
      - name: Build the bootstrapper
        uses: ./.github/actions/build_bootstrapper

  build-debugd:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
      - name: Build debugd
        uses: ./.github/actions/build_debugd

  build-disk-mapper:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
      - name: Build disk-mapper
        uses: ./.github/actions/build_disk_mapper

  build-cli:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
      - name: Build CLI
        uses: ./.github/actions/build_cli
