Skip to content

Commit 92b11cd

Browse files
yihauwillhickey
andauthored
ci: reorganize Windows build (anza-xyz#5031)
* ci: refactor publish windows tarball * ci: trigger windows build in the secondary pipeline * Update .github/workflows/publish-windows-tarball.yml Co-authored-by: Will Hickey <[email protected]> --------- Co-authored-by: Will Hickey <[email protected]>
1 parent 8b99321 commit 92b11cd

5 files changed

+42
-69
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
echo "branch: $BUILDKITE_BRANCH"
6+
echo "commit: $BUILDKITE_COMMIT"
7+
8+
curl -L \
9+
-X POST \
10+
-H "Accept: application/vnd.github+json" \
11+
-H "Authorization: Bearer $GITHUB_TOKEN" \
12+
-H "X-GitHub-Api-Version: 2022-11-28" \
13+
https://api.github.com/repos/anza-xyz/agave/actions/workflows/publish-windows-tarball.yml/dispatches \
14+
-d '{"ref":"'"$BUILDKITE_BRANCH"'","inputs":{"commit":"'"$BUILDKITE_COMMIT"'"}}'

.github/workflows/release-artifacts.yml .github/workflows/publish-windows-tarball.yml

+20-22
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
name: release-artifacts
1+
name: Publish Windows Tarball
22

33
on:
4-
workflow_call:
4+
workflow_dispatch:
55
inputs:
66
commit:
7-
required: false
87
type: string
9-
secrets:
10-
GCS_RELEASE_BUCKET_WRITER_CREDIENTIAL:
118
required: true
9+
description: commit
1210

1311
jobs:
1412
windows-build:
@@ -23,22 +21,6 @@ jobs:
2321
ref: master
2422
fetch-depth: 0
2523

26-
- name: Setup Rust
27-
shell: bash
28-
run: |
29-
source ci/rust-version.sh stable
30-
31-
# copy the newest version env.sh before switching version.
32-
- name: Copy Env Script
33-
shell: bash
34-
run: |
35-
cp -r ci/env.sh /tmp/env.sh
36-
37-
- name: Switch Version
38-
if: ${{ inputs.commit }}
39-
run: |
40-
git checkout ${{ inputs.commit }}
41-
4224
# took the workaround from https://github.com/sfackler/rust-openssl/issues/2149
4325
- name: Set Perl environment variables
4426
run: |
@@ -48,14 +30,30 @@ jobs:
4830
- name: Build
4931
id: build
5032
shell: bash
33+
env:
34+
COMMIT: ${{ github.event.inputs.commit }}
5135
run: |
5236
# install all deps
5337
source .github/scripts/install-all-deps.sh ${{ runner.os }}
5438
55-
source /tmp/env.sh
39+
# checkout the commit
40+
if [[ -z ${{ env.COMMIT }} ]]; then
41+
echo "Required parameter env.COMMIT is empty."
42+
exit 1
43+
fi
44+
45+
git checkout ${{ env.COMMIT }}
46+
47+
source ci/env.sh
5648
echo "tag=$CI_TAG" >> $GITHUB_OUTPUT
5749
eval "$(ci/channel-info.sh)"
5850
echo "channel=$CHANNEL" >> $GITHUB_OUTPUT
51+
52+
# print the info
53+
echo "::notice::commit: ${{ env.COMMIT }}"
54+
echo "::notice::tag: $CI_TAG"
55+
echo "::notice::channel: $CHANNEL"
56+
5957
ci/publish-tarball.sh
6058
6159
- name: Prepare Upload Files

.github/workflows/release-artifacts-auto.yml

-30
This file was deleted.

.github/workflows/release-artifacts-manually.yml

-17
This file was deleted.

ci/buildkite-secondary.yml

+8
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ steps:
3333
permit_on_passed: true
3434
timeout_in_minutes: 240
3535
branches: "!master"
36+
- name: "trigger github actions windows build"
37+
command: ".buildkite/scripts/trigger-github-actions-windows-build.sh"
38+
agents:
39+
queue: "release-build"
40+
retry:
41+
manual:
42+
permit_on_passed: true
43+
timeout_in_minutes: 5
3644
- name: "publish tarball (aarch64-apple-darwin)"
3745
command: "ci/publish-tarball.sh"
3846
agents:

0 commit comments

Comments
 (0)