diff options
Diffstat (limited to '.github/workflows/build-selected-artifacts.yml')
| -rw-r--r-- | .github/workflows/build-selected-artifacts.yml | 181 |
1 files changed, 181 insertions, 0 deletions
diff --git a/.github/workflows/build-selected-artifacts.yml b/.github/workflows/build-selected-artifacts.yml new file mode 100644 index 00000000..71e33737 --- /dev/null +++ b/.github/workflows/build-selected-artifacts.yml @@ -0,0 +1,181 @@ +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 }} + release_channel: ${{ steps.v.outputs.release_channel }} + rc_number: ${{ steps.v.outputs.rc_number }} + 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") + CHANNEL=$(jq -r .channel <<<"$STATE") + RC_NUMBER=$(jq -r .rc <<<"$STATE") + echo "Derived version from release-state.txt: $VERSION" + { + echo "version=$VERSION" + echo "release_channel=$CHANNEL" + echo "rc_number=$RC_NUMBER" + } >> "$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 }} + release_channel: ${{ needs.prepare.outputs.release_channel }} + rc_number: ${{ needs.prepare.outputs.rc_number }} + + 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 }} + release_channel: ${{ needs.prepare.outputs.release_channel }} + rc_number: ${{ needs.prepare.outputs.rc_number }} + + 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 }} + release_channel: ${{ needs.prepare.outputs.release_channel }} + rc_number: ${{ needs.prepare.outputs.rc_number }} + + 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 }} + release_channel: ${{ needs.prepare.outputs.release_channel }} + rc_number: ${{ needs.prepare.outputs.rc_number }} + + 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 }} + release_channel: ${{ needs.prepare.outputs.release_channel }} + rc_number: ${{ needs.prepare.outputs.rc_number }} + + 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 }} + release_channel: ${{ needs.prepare.outputs.release_channel }} + rc_number: ${{ needs.prepare.outputs.rc_number }} |
