name: Build Selected Artifacts on: workflow_dispatch: inputs: targets: description: "Artifact set to build" required: true type: choice options: - macos-arm64 - windows-x64 - macos-arm64-windows-x64 - linux-x64 - linux-arm64 - macos-x64 - all default: macos-arm64 mode: description: "Build selected artifacts immediately or gate them on Linux x64 first" required: true type: choice options: - artifact-now - linux-smoke-first default: artifact-now recache: description: "Force ccache to recompile and refresh cached objects" required: false type: boolean default: false concurrency: group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.targets }}-${{ inputs.mode }} cancel-in-progress: false permissions: contents: read packages: read jobs: prepare: runs-on: ubuntu-latest timeout-minutes: 10 outputs: version: ${{ steps.v.outputs.version }} linux_image_tag: ${{ steps.linux-image.outputs.image_tag }} steps: - uses: actions/checkout@v7 - id: v run: | STATE=$(python3 .github/scripts/release-policy.py read-state) VERSION=$(jq -r .version <<<"$STATE") echo "Derived version from release-state.txt: $VERSION" echo "version=$VERSION" >> "$GITHUB_OUTPUT" - id: linux-image name: Resolve Linux CI image generation env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: .github/scripts/resolve-linux-ci-image-tag.py # In linux-smoke-first mode, this is both the cheap gate and a normal Linux # x64 artifact build. Do not also run linux-x64 for the same dispatch. linux-smoke-x64: needs: [prepare] if: inputs.mode == 'linux-smoke-first' uses: ./.github/workflows/build-linux.yml with: version: ${{ needs.prepare.outputs.version }} hamlib_branch: "4.7.2" arch: "x86_64" image_tag: ${{ needs.prepare.outputs.linux_image_tag }} save_ccache: true recache: ${{ inputs.recache }} linux-x64: needs: [prepare] if: >- inputs.mode != 'linux-smoke-first' && (inputs.targets == 'linux-x64' || inputs.targets == 'all') uses: ./.github/workflows/build-linux.yml with: version: ${{ needs.prepare.outputs.version }} hamlib_branch: "4.7.2" arch: "x86_64" image_tag: ${{ needs.prepare.outputs.linux_image_tag }} save_ccache: true recache: ${{ inputs.recache }} linux-arm64: needs: [prepare, linux-smoke-x64] if: >- always() && !cancelled() && needs.prepare.result == 'success' && (needs.linux-smoke-x64.result == 'success' || needs.linux-smoke-x64.result == 'skipped') && (inputs.targets == 'linux-arm64' || inputs.targets == 'all') uses: ./.github/workflows/build-linux.yml with: version: ${{ needs.prepare.outputs.version }} hamlib_branch: "4.7.2" arch: "aarch64" image_tag: ${{ needs.prepare.outputs.linux_image_tag }} save_ccache: true recache: ${{ inputs.recache }} macos-arm64: needs: [prepare, linux-smoke-x64] if: >- always() && !cancelled() && needs.prepare.result == 'success' && (needs.linux-smoke-x64.result == 'success' || needs.linux-smoke-x64.result == 'skipped') && ( inputs.targets == 'macos-arm64' || inputs.targets == 'macos-arm64-windows-x64' || inputs.targets == 'all' ) uses: ./.github/workflows/build-macos.yml with: version: ${{ needs.prepare.outputs.version }} hamlib_branch: "4.7.2" arch: "arm64" runner: "macos-15" deployment_target: "11.0" recache: ${{ inputs.recache }} macos-x64: needs: [prepare, linux-smoke-x64] if: >- always() && !cancelled() && needs.prepare.result == 'success' && (needs.linux-smoke-x64.result == 'success' || needs.linux-smoke-x64.result == 'skipped') && (inputs.targets == 'macos-x64' || inputs.targets == 'all') uses: ./.github/workflows/build-macos.yml with: version: ${{ needs.prepare.outputs.version }} hamlib_branch: "4.7.2" arch: "x86_64" runner: "macos-15-intel" deployment_target: "10.13" recache: ${{ inputs.recache }} windows-x64: needs: [prepare, linux-smoke-x64] if: >- always() && !cancelled() && needs.prepare.result == 'success' && (needs.linux-smoke-x64.result == 'success' || needs.linux-smoke-x64.result == 'skipped') && ( inputs.targets == 'windows-x64' || inputs.targets == 'macos-arm64-windows-x64' || inputs.targets == 'all' ) uses: ./.github/workflows/build-windows.yml with: version: ${{ needs.prepare.outputs.version }} hamlib_branch: "4.7.2" recache: ${{ inputs.recache }}