From 04921c8bea92642994df88be2d9f4fc1470dda9b Mon Sep 17 00:00:00 2001 From: juliannguyen4 <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 7 Sep 2023 14:17:04 -0700 Subject: [PATCH 1/9] Optionally bump version and upload to JFrog --- .github/workflows/build-wheels.yml | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 08ff0f9c8..5e90cc1b3 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -8,16 +8,23 @@ on: type: boolean required: true default: false - build-rc-or-release: + should-bump-version: + type: boolean + required: true + default: false + description: 'In addition, uploads to JFrog if true, and does not upload to JFrog if false' + bump-rc-or-release: type: choice options: - rc - release default: 'rc' required: true + description: 'If should-bump-version is false, this option will be ignored.' jobs: update-version: + if: ${{ inputs.bump-rc-or-release }} runs-on: ubuntu-latest permissions: # Give the default GITHUB_TOKEN write permission to commit and push the @@ -486,21 +493,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.bump-rc-or-release }} needs: [ # Cat 1 tests source-installs, From 384d221a5a00eb6ecf0fdd0340f8d6a856a6c604 Mon Sep 17 00:00:00 2001 From: juliannguyen4 <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 7 Sep 2023 14:21:58 -0700 Subject: [PATCH 2/9] wrong input --- .github/workflows/build-wheels.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 5e90cc1b3..b84acfebb 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -24,7 +24,7 @@ on: jobs: update-version: - if: ${{ inputs.bump-rc-or-release }} + if: ${{ inputs.should-bump-version }} runs-on: ubuntu-latest permissions: # Give the default GITHUB_TOKEN write permission to commit and push the @@ -494,7 +494,7 @@ jobs: docker container prune -f upload-artifacts-to-jfrog: - if: ${{ inputs.bump-rc-or-release }} + if: ${{ inputs.should-bump-version }} needs: [ # Cat 1 tests source-installs, From 0fbae916cf9c5577c450a14b3f588f179fd73a83 Mon Sep 17 00:00:00 2001 From: juliannguyen4 <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 7 Sep 2023 14:43:51 -0700 Subject: [PATCH 3/9] Run build jobs when bump version job is skipped or passes --- .github/workflows/build-wheels.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index b84acfebb..d4362bb33 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -1,6 +1,6 @@ name: Build wheels -# Builds wheels and sends to QE and Aerospike artifactory +# Builds wheels and optionally sends artifacts to Jfrog Artifactory on: workflow_dispatch: inputs: @@ -61,6 +61,7 @@ jobs: build-sdist: name: Build and install sdist runs-on: ubuntu-latest + if: ${{ needs.update-version.result == 'skipped' || needs.update-version.result == 'success' }} needs: update-version steps: - uses: actions/checkout@v2 @@ -126,6 +127,7 @@ jobs: manylinux_arm64: runs-on: ubuntu-latest needs: update-version + if: ${{ needs.update-version.result == 'skipped' || needs.update-version.result == 'success' }} strategy: fail-fast: false matrix: @@ -187,6 +189,7 @@ jobs: manylinux_x86_64: runs-on: ubuntu-latest needs: update-version + if: ${{ needs.update-version.result == 'skipped' || needs.update-version.result == 'success' }} strategy: fail-fast: false matrix: @@ -383,6 +386,7 @@ jobs: macOS-x86: needs: update-version + if: ${{ needs.update-version.result == 'skipped' || needs.update-version.result == 'success' }} strategy: fail-fast: false matrix: @@ -431,6 +435,7 @@ jobs: macOS-m1: runs-on: [self-hosted, macOS, ARM64] needs: update-version + if: ${{ needs.update-version.result == 'skipped' || needs.update-version.result == 'success' }} strategy: fail-fast: false matrix: From 701230aab86391cbf74fdb6bb32e6383ddf1b913 Mon Sep 17 00:00:00 2001 From: juliannguyen4 <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 7 Sep 2023 14:56:34 -0700 Subject: [PATCH 4/9] Fix --- .github/workflows/build-wheels.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index d4362bb33..cc40dfb65 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -61,7 +61,8 @@ jobs: build-sdist: name: Build and install sdist runs-on: ubuntu-latest - if: ${{ needs.update-version.result == 'skipped' || needs.update-version.result == 'success' }} + # 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 @@ -127,7 +128,7 @@ jobs: manylinux_arm64: runs-on: ubuntu-latest needs: update-version - if: ${{ needs.update-version.result == 'skipped' || needs.update-version.result == 'success' }} + if: ${{ always() && (needs.update-version.result == 'skipped' || needs.update-version.result == 'success') }} strategy: fail-fast: false matrix: @@ -189,7 +190,7 @@ jobs: manylinux_x86_64: runs-on: ubuntu-latest needs: update-version - if: ${{ needs.update-version.result == 'skipped' || needs.update-version.result == 'success' }} + if: ${{ always() && (needs.update-version.result == 'skipped' || needs.update-version.result == 'success') }} strategy: fail-fast: false matrix: @@ -386,7 +387,7 @@ jobs: macOS-x86: needs: update-version - if: ${{ needs.update-version.result == 'skipped' || needs.update-version.result == 'success' }} + if: ${{ always() && (needs.update-version.result == 'skipped' || needs.update-version.result == 'success') }} strategy: fail-fast: false matrix: @@ -435,7 +436,7 @@ jobs: macOS-m1: runs-on: [self-hosted, macOS, ARM64] needs: update-version - if: ${{ needs.update-version.result == 'skipped' || needs.update-version.result == 'success' }} + if: ${{ always() && (needs.update-version.result == 'skipped' || needs.update-version.result == 'success') }} strategy: fail-fast: false matrix: From c43e6c4388f6ea6d78003ce5b5a367c7994a0fb2 Mon Sep 17 00:00:00 2001 From: juliannguyen4 <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 8 Sep 2023 09:20:28 -0700 Subject: [PATCH 5/9] Improve descriptions --- .github/workflows/build-wheels.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index cc40dfb65..75ac99e6f 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -8,11 +8,12 @@ on: type: boolean required: true default: false + description: 'Test against server release candidate?' should-bump-version: type: boolean required: true default: false - description: 'In addition, uploads to JFrog if true, and does not upload to JFrog if false' + description: 'Bump version and upload to JFrog?' bump-rc-or-release: type: choice options: @@ -20,7 +21,7 @@ on: - release default: 'rc' required: true - description: 'If should-bump-version is false, this option will be ignored.' + description: 'If bumping version, what type of bump?' jobs: update-version: From 69ecace4bb9c6c56f55fd6d9b9fb9c0274da14a0 Mon Sep 17 00:00:00 2001 From: juliannguyen4 <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 8 Sep 2023 09:41:19 -0700 Subject: [PATCH 6/9] Fix input name --- .github/workflows/build-wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 75ac99e6f..c567ced6d 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -41,7 +41,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) From 63aecdfb248de8bfe37edf7c0a0b4bda2111be2e Mon Sep 17 00:00:00 2001 From: juliannguyen4 <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 8 Sep 2023 09:47:57 -0700 Subject: [PATCH 7/9] Add customized run name --- .github/workflows/build-wheels.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index c567ced6d..d81514d1b 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -1,4 +1,5 @@ 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 optionally sends artifacts to Jfrog Artifactory on: From e40a6b17f1da6708394841d447b3704a293e359a Mon Sep 17 00:00:00 2001 From: juliannguyen4 Date: Fri, 8 Sep 2023 16:48:52 +0000 Subject: [PATCH 8/9] Bump version to 14.0.0-rc.7 --- VERSION | 2 +- src/main/aerospike.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 821571734..7ac243c73 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -14.0.0-rc.6 +14.0.0-rc.7 diff --git a/src/main/aerospike.c b/src/main/aerospike.c index 4acb98749..ac7833bc4 100644 --- a/src/main/aerospike.c +++ b/src/main/aerospike.c @@ -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; From e376a56601f8f6dc2fcf1dc3b7b9b45ace26d426 Mon Sep 17 00:00:00 2001 From: juliannguyen4 <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 8 Sep 2023 13:01:32 -0700 Subject: [PATCH 9/9] By default bump the version --- .github/workflows/build-wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index d81514d1b..1c8110d1c 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -13,7 +13,7 @@ on: should-bump-version: type: boolean required: true - default: false + default: true description: 'Bump version and upload to JFrog?' bump-rc-or-release: type: choice