summaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yml
blob: 52592fb42748438db87c0f037ea887702b83a9ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: CI

on:
  push:
    branches: [develop]
  pull_request:
    branches: [develop]
  workflow_dispatch:

jobs:
  # Single source of truth for the project version string: read it from
  # CMakeLists.txt so CI and release.yml cannot disagree. Strip the
  # optional fourth tweak segment (3.0.0.0 → 3.0.0) to match the 3-part
  # shape release.yml derives from build/v<X.Y.Z> tags.
  prepare:
    runs-on: ubuntu-latest
    outputs:
      version: ${{ steps.v.outputs.version }}
    steps:
      - uses: actions/checkout@v6
      - id: v
        run: |
          VERSION=$(grep -E '^\s*VERSION\s+[0-9]' CMakeLists.txt | head -1 | awk '{print $2}' | cut -d. -f1-3)
          if [ -z "$VERSION" ]; then
            echo "::error::Could not derive VERSION from CMakeLists.txt"
            exit 1
          fi
          echo "Derived version from CMakeLists.txt: $VERSION"
          echo "version=$VERSION" >> "$GITHUB_OUTPUT"

  macos:
    needs: prepare
    uses: ./.github/workflows/build-macos.yml
    with:
      version: ${{ needs.prepare.outputs.version }}
      hamlib_branch: "4.7.1"
      arch: "arm64"
      runner: "macos-15"
      deployment_target: "11.0"
    secrets: inherit

  macos-intel:
    needs: prepare
    uses: ./.github/workflows/build-macos.yml
    with:
      version: ${{ needs.prepare.outputs.version }}
      hamlib_branch: "4.7.1"
      arch: "x86_64"
      runner: "macos-15-intel"
      deployment_target: "10.13"
    secrets: inherit

  linux:
    needs: prepare
    uses: ./.github/workflows/build-linux.yml
    with:
      version: ${{ needs.prepare.outputs.version }}
      hamlib_branch: "4.7.1"
      arch: "x86_64"
    secrets: inherit

  linux-arm:
    needs: prepare
    uses: ./.github/workflows/build-linux.yml
    with:
      version: ${{ needs.prepare.outputs.version }}
      hamlib_branch: "4.7.1"
      arch: "aarch64"
    secrets: inherit

  windows:
    needs: prepare
    uses: ./.github/workflows/build-windows.yml
    with:
      version: ${{ needs.prepare.outputs.version }}
      hamlib_branch: "4.7.1"
    secrets: inherit