Skip to content

Commit

Permalink
CI(promote-compatibility-data): upload both X64 and ARM64 archs
Browse files Browse the repository at this point in the history
  • Loading branch information
bayandin committed Aug 29, 2024
1 parent f50ecfe commit 964dc80
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/actions/run-python-test-set/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ runs:
if: github.event_name == 'pull_request' && github.base_ref == 'main'
uses: ./.github/actions/upload
with:
name: compatibility-snapshot-${{ inputs.build_type }}-pg${{ inputs.pg_version }}
name: compatibility-snapshot-${{ runner.arch }}-${{ inputs.build_type }}-pg${{ inputs.pg_version }}
# Directory is created by test_compatibility.py::test_create_snapshot, keep the path in sync with the test
path: /tmp/test_output/compatibility_snapshot_pg${{ inputs.pg_version }}/

Expand Down
34 changes: 19 additions & 15 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1088,9 +1088,26 @@ jobs:
old_prefix="artifacts/${COMMIT_SHA}/${RUN_ID}"
# Update compatibility snapshot for the release
for pg_version in v14 v15 v16; do
for arch in X64 ARM64; do
for pg_version in v14 v15 v16; do
for build_type in debug release; do
filename=compatibility-snapshot-${arch}-${build_type}-pg${pg_version}.tar.zst
s3_key=$(aws s3api list-objects-v2 --bucket ${BUCKET} --prefix ${old_prefix} | jq -r '.Contents[]?.Key' | grep ${filename} | sort --version-sort | tail -1 || true)
if [ -z "${s3_key}" ]; then
echo >&2 "Neither s3://${BUCKET}/${old_prefix}/${filename} nor its version from previous attempts exist"
exit 1
fi
time aws s3 cp --only-show-errors s3://${BUCKET}/${s3_key} s3://${BUCKET}/${PREFIX}/${filename}
done
done
done
# Update Neon artifact for the release (reuse already uploaded artifact)
for arch in X64 ARM64; do
for build_type in debug release; do
filename=compatibility-snapshot-${build_type}-pg${pg_version}.tar.zst
filename=neon-${RUNNER_OS}-${arch}-${build_type}-artifact.tar.zst
s3_key=$(aws s3api list-objects-v2 --bucket ${BUCKET} --prefix ${old_prefix} | jq -r '.Contents[]?.Key' | grep ${filename} | sort --version-sort | tail -1 || true)
if [ -z "${s3_key}" ]; then
Expand All @@ -1102,19 +1119,6 @@ jobs:
done
done
# Update Neon artifact for the release (reuse already uploaded artifact)
for build_type in debug release; do
filename=neon-${RUNNER_OS}-${RUNNER_ARCH}-${build_type}-artifact.tar.zst
s3_key=$(aws s3api list-objects-v2 --bucket ${BUCKET} --prefix ${old_prefix} | jq -r '.Contents[]?.Key' | grep ${filename} | sort --version-sort | tail -1 || true)
if [ -z "${s3_key}" ]; then
echo >&2 "Neither s3://${BUCKET}/${old_prefix}/${filename} nor its version from previous attempts exist"
exit 1
fi
time aws s3 cp --only-show-errors s3://${BUCKET}/${s3_key} s3://${BUCKET}/${PREFIX}/${filename}
done
pin-build-tools-image:
needs: [ build-build-tools-image, promote-images, build-and-test-locally ]
if: github.ref_name == 'main'
Expand Down

0 comments on commit 964dc80

Please sign in to comment.