Skip to content
Draft
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
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly

- package-ecosystem: cargo
directory: /
schedule:
interval: weekly

- package-ecosystem: pip
directory: /
schedule:
interval: weekly
106 changes: 68 additions & 38 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: CI Build & Test

on:
push:
pull_request:
branches:
- dev
- stage
- main
pull_request:
workflow_dispatch:
# For publish workflow
workflow_call:

permissions:
Expand Down Expand Up @@ -62,14 +62,19 @@ jobs:
]
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit

- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Setup Rust
uses: actions-rs/toolchain@v1
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
with:
toolchain: 1.90.0
components: rustfmt, clippy
- name: Setup Python for maturin
uses: actions/setup-python@v6
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.13'
- name: Install specific Rust version
Expand All @@ -78,7 +83,7 @@ jobs:
rustup default 1.90.0
rustup show
- name: Build wheels
uses: PyO3/maturin-action@v1
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
with:
target: ${{ matrix.target[0] }}
args: --release --out aerospike_async --interpreter ${{ matrix.python }}
Expand Down Expand Up @@ -122,7 +127,7 @@ jobs:

- name: Set up QEMU
if: ${{ !startsWith(matrix.target[0], 'x86_64') }}
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0

- name: Get Docker image name and tag
run: echo DOCKER_IMAGE_TAG=$(echo ${{ matrix.python }} | sed -E "s/(python|pypy)/\1:/") >> $GITHUB_ENV
Expand All @@ -139,7 +144,7 @@ jobs:

- name: Install wheel (non-x86 wheels)
if: ${{ !startsWith(matrix.target[0], 'x86_64') }}
run: docker exec --workdir /aerospike-client-python-async ${{ matrix.python }} ${{ matrix.python }} -m pip install --find-links=aerospike_async/ aerospike_client_python_async
run: docker exec --workdir /aerospike-client-python-async ${{ matrix.python }} ${{ matrix.python }} -m pip install --find-links=aerospike_async/ aerospike_async
- name: Install pytest (non-x86 wheels)
if: ${{ !startsWith(matrix.target[0], 'x86_64') }}
run: docker exec --workdir /aerospike-client-python-async ${{ matrix.python }} ${{ matrix.python }} -m pip install pytest pytest-asyncio
Expand All @@ -166,7 +171,7 @@ jobs:

- name: Setup Python for testing
if: ${{ startsWith(matrix.target[0], 'x86_64') }}
uses: actions/setup-python@v6
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ env.PYTHON_VERSION }}

Expand Down Expand Up @@ -204,7 +209,7 @@ jobs:
fi

- name: Upload wheels
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: wheels-linux-${{ matrix.python }}-${{ matrix.target[0] }}
path: aerospike_async
Expand All @@ -223,18 +228,23 @@ jobs:
]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit

- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Setup Rust
uses: actions-rs/toolchain@v1
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
with:
toolchain: 1.90.0
components: rustfmt, clippy
- name: Setup Python for maturin
uses: actions/setup-python@v6
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.13'
- name: Build wheels
uses: PyO3/maturin-action@v1
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
with:
target: aarch64
args: --release --out aerospike_async --interpreter ${{ matrix.python }}
Expand Down Expand Up @@ -276,7 +286,7 @@ jobs:
run: echo PYTHON_VERSION=$(echo ${{ matrix.python }} | sed -E "s/python(.*)/\1/") >> $GITHUB_ENV

- name: Setup Python for testing
uses: actions/setup-python@v6
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ env.PYTHON_VERSION }}

Expand Down Expand Up @@ -309,7 +319,7 @@ jobs:
fi

- name: Upload wheels
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: wheels-linux-arm64-${{ matrix.python }}
path: aerospike_async
Expand All @@ -321,9 +331,14 @@ jobs:
target: [x64, x86]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit

- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Setup Rust
uses: actions-rs/toolchain@v1
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
with:
toolchain: 1.90.0
components: rustfmt, clippy
Expand All @@ -347,12 +362,12 @@ jobs:
echo "NASM installed but path verification skipped (will be available in next step)"
}
}
- uses: actions/setup-python@v6
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.13'
architecture: ${{ matrix.target }}
- name: Build wheels
uses: PyO3/maturin-action@v1
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
with:
target: ${{ matrix.target }}
args: --release --out aerospike_async --find-interpreter
Expand All @@ -367,7 +382,7 @@ jobs:
# Windows wheels are built and uploaded, but tests run on Linux/macOS only.

- name: Upload wheels
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: wheels-windows-${{ matrix.target }}
path: aerospike_async
Expand All @@ -385,7 +400,12 @@ jobs:
]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit

- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Try Podman
run: |
brew install podman
Expand Down Expand Up @@ -419,28 +439,28 @@ jobs:
echo "=== Server Build ==="
podman exec aerospike-server asinfo -v "build"
- name: Setup Rust
uses: actions-rs/toolchain@v1
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
with:
toolchain: 1.90.0
components: rustfmt, clippy
- name: Setup Python for maturin
uses: actions/setup-python@v6
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.13'
- name: Build wheels
uses: PyO3/maturin-action@v1
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
with:
target: x86_64
args: --release --out aerospike_async --interpreter ${{ matrix.python }}
sccache: 'true'
- name: Remove python prefix for setting up python (CPython only)
run: echo PYTHON_VERSION=$(echo ${{ matrix.python }} | sed -E "s/python(.*)/\1/") >> $GITHUB_ENV
- name: Setup Python for testing
uses: actions/setup-python@v6
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install wheel
run: ${{ matrix.python }} -m pip install --find-links=aerospike_async/ aerospike_client_python_async
run: ${{ matrix.python }} -m pip install --find-links=aerospike_async/ aerospike_async
- name: Install pytest
run: ${{ matrix.python }} -m pip install pytest pytest-asyncio
- name: Debug module contents (macOS)
Expand All @@ -466,7 +486,7 @@ jobs:
exit 1
fi
- name: Upload wheels
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: wheels-macos-x86-${{ matrix.python }}
path: aerospike_async
Expand All @@ -487,44 +507,54 @@ jobs:
]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit

- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Setup Rust
uses: actions-rs/toolchain@v1
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
with:
toolchain: 1.90.0
components: rustfmt, clippy
- name: Setup Python for maturin
uses: actions/setup-python@v6
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.13'
- name: Build wheels
uses: PyO3/maturin-action@v1
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
with:
target: aarch64
args: --release --out aerospike_async --interpreter ${{ matrix.python }}
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: wheels-macos-arm64-${{ matrix.python }}
path: aerospike_async

sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit

- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Setup Rust
uses: actions-rs/toolchain@v1
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
with:
toolchain: 1.90.0
components: rustfmt, clippy
- name: Build sdist
uses: PyO3/maturin-action@v1
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
with:
command: sdist
args: --out aerospike_async
- name: Upload sdist
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: wheels
path: aerospike_async
67 changes: 67 additions & 0 deletions .github/workflows/publish-rtd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# SKELETON — not yet wired into the live release pipeline.
#
# Implements Gate 4 (Product GA, owner: Product) — triggers a
# ReadTheDocs build for the given version. Single curl POST against
# the RTD v3 API.
#
# Status: skeleton. Will not trigger anything until the RTD project
# is created and a token is provisioned. When `vars.RTD_PROJECT` or
# `secrets.RTD_TOKEN` is unset the workflow logs and exits 0.

name: Publish docs to ReadTheDocs (Gate 4)

on:
workflow_dispatch:
inputs:
version:
description: "RTD version slug to build (e.g. v0.1.0-alpha.1, latest, stable)"
type: string
required: true
dry-run:
description: "Dry-run (skip the actual RTD API call)"
type: boolean
default: true

permissions:
contents: read

jobs:
trigger-rtd:
runs-on: ubuntu-22.04
steps:
- name: Skip if RTD not provisioned (skeleton phase)
id: gate
run: |
if [[ -z "${{ vars.RTD_PROJECT }}" ]]; then
echo "RTD_PROJECT unset — skeleton phase, skipping trigger."
echo "skip=true" >> "$GITHUB_OUTPUT"
exit 0
fi
echo "skip=false" >> "$GITHUB_OUTPUT"

- name: Harden the runner
if: steps.gate.outputs.skip != 'true'
uses: step-security/harden-runner@fe104658747b27e96e4f7e80cd0a94068e53901d # v2.16.1
with:
egress-policy: audit

- name: Trigger RTD build
if: steps.gate.outputs.skip != 'true'
env:
RTD_PROJECT: ${{ vars.RTD_PROJECT }}
RTD_VERSION: ${{ inputs.version }}
RTD_TOKEN: ${{ secrets.RTD_TOKEN }}
DRY_RUN: ${{ inputs.dry-run }}
run: |
if [[ -z "$RTD_TOKEN" ]]; then
echo "::warning::secrets.RTD_TOKEN is not set — skipping RTD trigger."
exit 0
fi
API="https://readthedocs.org/api/v3/projects/${RTD_PROJECT}/versions/${RTD_VERSION}/builds/"
if [[ "$DRY_RUN" == "true" ]]; then
echo "DRY-RUN: would POST $API"
exit 0
fi
curl -fSsL -X POST -H "Authorization: Token ${RTD_TOKEN}" "$API"
echo
echo "Triggered RTD build: project=$RTD_PROJECT version=$RTD_VERSION"
Loading