Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLIENT-2547] CI/CD: Make bumping version in build wheels workflow optional #506

Merged
merged 9 commits into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 19 additions & 17 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,32 @@
name: Build wheels
run-name: Build wheels (use-server-rc=${{ inputs.use-server-rc }}, should-bump-version=${{ inputs.should-bump-version }}, bump-rc-or-release=${{ inputs.bump-rc-or-release }})

# Builds wheels and sends to QE and Aerospike artifactory
# Builds wheels and optionally sends artifacts to Jfrog Artifactory
on:
workflow_dispatch:
inputs:
use-server-rc:
type: boolean
required: true
default: false
build-rc-or-release:
description: 'Test against server release candidate?'
should-bump-version:
type: boolean
required: true
default: true
description: 'Bump version and upload to JFrog?'
bump-rc-or-release:
type: choice
options:
- rc
- release
default: 'rc'
required: true
description: 'If bumping version, what type of bump?'

jobs:
update-version:
if: ${{ inputs.should-bump-version }}
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
Expand All @@ -33,7 +42,7 @@ jobs:
latest_tag=$(cat VERSION)
echo "Bumping off of latest tag $latest_tag"
# If creating release wheels, bump rc version to release version
if [[ ${{ inputs.build-rc-or-release }} == "rc" ]]; then
if [[ ${{ inputs.bump-rc-or-release }} == "rc" ]]; then
new_tag=$(pysemver bump prerelease $latest_tag)
else
new_tag=$(pysemver nextver $latest_tag patch)
Expand All @@ -54,6 +63,8 @@ jobs:
build-sdist:
name: Build and install sdist
runs-on: ubuntu-latest
# Run if update version workflow was skipped or succeeds
if: ${{ always() && (needs.update-version.result == 'skipped' || needs.update-version.result == 'success') }}
needs: update-version
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -119,6 +130,7 @@ jobs:
manylinux_arm64:
runs-on: ubuntu-latest
needs: update-version
if: ${{ always() && (needs.update-version.result == 'skipped' || needs.update-version.result == 'success') }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -180,6 +192,7 @@ jobs:
manylinux_x86_64:
runs-on: ubuntu-latest
needs: update-version
if: ${{ always() && (needs.update-version.result == 'skipped' || needs.update-version.result == 'success') }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -376,6 +389,7 @@ jobs:

macOS-x86:
needs: update-version
if: ${{ always() && (needs.update-version.result == 'skipped' || needs.update-version.result == 'success') }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -424,6 +438,7 @@ jobs:
macOS-m1:
runs-on: [self-hosted, macOS, ARM64]
needs: update-version
if: ${{ always() && (needs.update-version.result == 'skipped' || needs.update-version.result == 'success') }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -486,21 +501,8 @@ jobs:
docker container stop aerospike
docker container prune -f

send-to-qe:
needs: [manylinux_x86_64, manylinux_arm64]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- run: echo "Upload to QE"
# - uses: shallwefootball/s3-upload-action@master
# with:
# aws_key_id: ${{ secrets.AWS_KEY_ID }}
# aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
# aws_bucket: ${{ secrets.AWS_BUCKET }}
# # Send all distributions to QE build system
# source_dir: './wheelhouse'

upload-artifacts-to-jfrog:
if: ${{ inputs.should-bump-version }}
needs: [
# Cat 1 tests
source-installs,
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.0.0-rc.6
14.0.0-rc.7
2 changes: 1 addition & 1 deletion src/main/aerospike.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ static int Aerospike_Clear(PyObject *aerospike)
PyMODINIT_FUNC PyInit_aerospike(void)
{

const char version[] = "14.0.0-rc.6";
const char version[] = "14.0.0-rc.7";
// Makes things "thread-safe"
Py_Initialize();
int i = 0;
Expand Down