slick-queue-py 1.0.0__tar.gz → 1.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {slick_queue_py-1.0.0 → slick_queue_py-1.1.0}/.github/FUNDING.yml +14 -14
- slick_queue_py-1.1.0/.github/workflows/ci.yml +48 -0
- slick_queue_py-1.1.0/.github/workflows/publish-conda.yml +98 -0
- slick_queue_py-1.1.0/.github/workflows/publish-pypi.yml +95 -0
- slick_queue_py-1.1.0/.github/workflows/publish-release.yml +177 -0
- slick_queue_py-1.1.0/.github/workflows/release.yml +56 -0
- {slick_queue_py-1.0.0 → slick_queue_py-1.1.0}/.gitignore +243 -243
- slick_queue_py-1.1.0/.pypirc.template +22 -0
- slick_queue_py-1.1.0/CHANGELOG.md +80 -0
- {slick_queue_py-1.0.0 → slick_queue_py-1.1.0}/LICENSE +21 -21
- {slick_queue_py-1.0.0 → slick_queue_py-1.1.0}/MANIFEST.in +0 -1
- {slick_queue_py-1.0.0 → slick_queue_py-1.1.0}/PKG-INFO +820 -805
- {slick_queue_py-1.0.0 → slick_queue_py-1.1.0}/README.md +50 -35
- {slick_queue_py-1.0.0 → slick_queue_py-1.1.0}/atomic_ops.py +37 -18
- {slick_queue_py-1.0.0 → slick_queue_py-1.1.0}/atomic_ops_ext.cpp +48 -1
- slick_queue_py-1.1.0/conda.recipe/meta.yaml +68 -0
- {slick_queue_py-1.0.0 → slick_queue_py-1.1.0}/pyproject.toml +30 -5
- {slick_queue_py-1.0.0 → slick_queue_py-1.1.0}/setup.cfg +4 -4
- {slick_queue_py-1.0.0 → slick_queue_py-1.1.0}/setup.py +6 -6
- {slick_queue_py-1.0.0 → slick_queue_py-1.1.0}/slick_queue_py.egg-info/SOURCES.txt +12 -2
- {slick_queue_py-1.0.0 → slick_queue_py-1.1.0}/slick_queue_py.py +257 -54
- {slick_queue_py-1.0.0 → slick_queue_py-1.1.0}/tests/cleanup_shm.py +2 -1
- {slick_queue_py-1.0.0 → slick_queue_py-1.1.0}/tests/cpp_multi_producer.cpp +5 -2
- slick_queue_py-1.1.0/tests/cpp_read_last_tester.cpp +153 -0
- {slick_queue_py-1.0.0 → slick_queue_py-1.1.0}/tests/cpp_work_stealing_consumer.cpp +2 -8
- {slick_queue_py-1.0.0 → slick_queue_py-1.1.0}/tests/test_atomic_cursor.py +650 -715
- {slick_queue_py-1.0.0 → slick_queue_py-1.1.0}/tests/test_atomic_ops.py +16 -0
- {slick_queue_py-1.0.0 → slick_queue_py-1.1.0}/tests/test_interop.py +41 -35
- {slick_queue_py-1.0.0 → slick_queue_py-1.1.0}/tests/test_local_mode.py +0 -1
- slick_queue_py-1.1.0/tests/test_modern_format.py +288 -0
- {slick_queue_py-1.0.0 → slick_queue_py-1.1.0}/tests/test_multi_producer.py +29 -26
- slick_queue_py-1.1.0/tests/test_read_last.py +338 -0
- slick_queue_py-1.1.0/tests/test_read_last_interop.py +473 -0
- slick_queue_py-1.0.0/.github/workflows/ci.yml +0 -32
- slick_queue_py-1.0.0/SOLUTION.md +0 -51
- {slick_queue_py-1.0.0 → slick_queue_py-1.1.0}/API_DIFFERENCES.md +0 -0
- {slick_queue_py-1.0.0 → slick_queue_py-1.1.0}/BUILDING.md +0 -0
- {slick_queue_py-1.0.0 → slick_queue_py-1.1.0}/CMakeLists.txt +0 -0
- {slick_queue_py-1.0.0 → slick_queue_py-1.1.0}/requirements.txt +0 -0
- {slick_queue_py-1.0.0 → slick_queue_py-1.1.0}/tests/cpp_consumer.cpp +0 -0
- {slick_queue_py-1.0.0 → slick_queue_py-1.1.0}/tests/cpp_producer.cpp +0 -0
- {slick_queue_py-1.0.0 → slick_queue_py-1.1.0}/tests/run_test.py +0 -0
- {slick_queue_py-1.0.0 → slick_queue_py-1.1.0}/tests/test_queue.py +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
# These are supported funding model platforms
|
|
2
|
-
|
|
3
|
-
github: SlickQuant
|
|
4
|
-
patreon: # Replace with a single Patreon username
|
|
5
|
-
open_collective: # Replace with a single Open Collective username
|
|
6
|
-
ko_fi: # Replace with a single Ko-fi username
|
|
7
|
-
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
|
8
|
-
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
-
liberapay: # Replace with a single Liberapay username
|
|
10
|
-
issuehunt: # Replace with a single IssueHunt username
|
|
11
|
-
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
|
12
|
-
polar: # Replace with a single Polar username
|
|
13
|
-
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
|
|
14
|
-
thanks_dev: # Replace with a single thanks.dev username
|
|
1
|
+
# These are supported funding model platforms
|
|
2
|
+
|
|
3
|
+
github: SlickQuant
|
|
4
|
+
patreon: # Replace with a single Patreon username
|
|
5
|
+
open_collective: # Replace with a single Open Collective username
|
|
6
|
+
ko_fi: # Replace with a single Ko-fi username
|
|
7
|
+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
|
8
|
+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
+
liberapay: # Replace with a single Liberapay username
|
|
10
|
+
issuehunt: # Replace with a single IssueHunt username
|
|
11
|
+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
|
12
|
+
polar: # Replace with a single Polar username
|
|
13
|
+
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
|
|
14
|
+
thanks_dev: # Replace with a single thanks.dev username
|
|
15
15
|
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main ]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build-and-test:
|
|
14
|
+
strategy:
|
|
15
|
+
matrix:
|
|
16
|
+
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
17
|
+
build_type: [Release, Debug]
|
|
18
|
+
python-version: ['3.12']
|
|
19
|
+
|
|
20
|
+
runs-on: ${{ matrix.os }}
|
|
21
|
+
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v4
|
|
24
|
+
|
|
25
|
+
- name: Set up Python
|
|
26
|
+
uses: actions/setup-python@v5
|
|
27
|
+
with:
|
|
28
|
+
python-version: ${{ matrix.python-version }}
|
|
29
|
+
|
|
30
|
+
- name: Install Python package with C++ extension
|
|
31
|
+
run: |
|
|
32
|
+
pip install -e .
|
|
33
|
+
python -c "import atomic_ops; supported, msg = atomic_ops.check_platform_support(); print(f'Platform support: {supported}, {msg}'); print('Extension location:', atomic_ops._atomic_ops_ext if hasattr(atomic_ops, '_atomic_ops_ext') else 'Not loaded')"
|
|
34
|
+
|
|
35
|
+
- name: Get Python executable path
|
|
36
|
+
id: python-path
|
|
37
|
+
run: python -c "import sys; print(f'path={sys.executable}')" >> $GITHUB_OUTPUT
|
|
38
|
+
shell: bash
|
|
39
|
+
|
|
40
|
+
- name: Configure CMake
|
|
41
|
+
run: cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DPython3_EXECUTABLE="${{ steps.python-path.outputs.path }}"
|
|
42
|
+
|
|
43
|
+
- name: Build
|
|
44
|
+
run: cmake --build build --config ${{ matrix.build_type }}
|
|
45
|
+
|
|
46
|
+
- name: Run Tests
|
|
47
|
+
working-directory: build
|
|
48
|
+
run: ctest -C ${{ matrix.build_type }} --output-on-failure --verbose
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
name: Publish to Conda
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch: # Manual trigger only (publish-release.yml handles automatic releases)
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
build-conda:
|
|
8
|
+
if: false # Disabled: workflow doesn't work yet
|
|
9
|
+
name: Build Conda Package
|
|
10
|
+
runs-on: ${{ matrix.os }}
|
|
11
|
+
strategy:
|
|
12
|
+
matrix:
|
|
13
|
+
os: [ubuntu-latest] # Intel runner for conda compatibility
|
|
14
|
+
python-version: ['3.11']
|
|
15
|
+
# python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
|
|
16
|
+
# Note: Excluded Python 3.13+ due to conda-build virtual package resolution issues
|
|
17
|
+
# Note: Using macos-15-intel (x86_64) for consistency with conda-forge practices
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
|
|
22
|
+
- name: Set up Conda
|
|
23
|
+
uses: conda-incubator/setup-miniconda@v3
|
|
24
|
+
with:
|
|
25
|
+
python-version: ${{ matrix.python-version }}
|
|
26
|
+
auto-update-conda: false
|
|
27
|
+
auto-activate-base: false
|
|
28
|
+
show-channel-urls: true
|
|
29
|
+
channels: conda-forge
|
|
30
|
+
channel-priority: strict
|
|
31
|
+
activate-environment: build-env
|
|
32
|
+
|
|
33
|
+
# - name: Install conda-build and anaconda-client
|
|
34
|
+
# shell: bash -l {0}
|
|
35
|
+
# run: |
|
|
36
|
+
# # Use classic solver to avoid libmamba compatibility issues
|
|
37
|
+
# conda config --set solver classic
|
|
38
|
+
# conda install -y conda-build anaconda-client
|
|
39
|
+
|
|
40
|
+
- name: Build conda package
|
|
41
|
+
uses: uibcdf/action-build-and-upload-conda-packages@v2.0.0
|
|
42
|
+
with:
|
|
43
|
+
meta_yaml_dir: conda.recipe/meta.yaml # Replace with the path to your meta.yaml directory
|
|
44
|
+
user: kzhao77
|
|
45
|
+
token: ${{ secrets.ANACONDA_API_TOKEN }} # Replace with the name of your Anaconda Token secret
|
|
46
|
+
# shell: bash -l {0}
|
|
47
|
+
# run: |
|
|
48
|
+
# conda build conda.recipe --output-folder ./conda-bld
|
|
49
|
+
|
|
50
|
+
# - name: Upload build artifacts
|
|
51
|
+
# uses: actions/upload-artifact@v4
|
|
52
|
+
# with:
|
|
53
|
+
# name: conda-package-${{ matrix.os }}-py${{ matrix.python-version }}
|
|
54
|
+
# path: ./conda-bld/**/*.tar.bz2
|
|
55
|
+
# retention-days: 7
|
|
56
|
+
|
|
57
|
+
# publish-conda:
|
|
58
|
+
# name: Publish to Anaconda Cloud
|
|
59
|
+
# needs: build-conda
|
|
60
|
+
# runs-on: ubuntu-latest
|
|
61
|
+
# if: github.event_name == 'release' && github.event.action == 'published'
|
|
62
|
+
|
|
63
|
+
# steps:
|
|
64
|
+
# - name: Set up Conda
|
|
65
|
+
# uses: conda-incubator/setup-miniconda@v3
|
|
66
|
+
# with:
|
|
67
|
+
# python-version: '3.11'
|
|
68
|
+
# channels: conda-forge
|
|
69
|
+
|
|
70
|
+
# - name: Install anaconda-client
|
|
71
|
+
# shell: bash -l {0}
|
|
72
|
+
# run: |
|
|
73
|
+
# conda install -y anaconda-client
|
|
74
|
+
|
|
75
|
+
# - name: Download all artifacts
|
|
76
|
+
# uses: actions/download-artifact@v4
|
|
77
|
+
# with:
|
|
78
|
+
# pattern: conda-package-*
|
|
79
|
+
# merge-multiple: true
|
|
80
|
+
# path: ./conda-packages
|
|
81
|
+
|
|
82
|
+
# - name: Upload to Anaconda Cloud
|
|
83
|
+
# shell: bash -l {0}
|
|
84
|
+
# env:
|
|
85
|
+
# ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
|
|
86
|
+
# run: |
|
|
87
|
+
# # Login using token
|
|
88
|
+
# anaconda -t $ANACONDA_API_TOKEN upload ./conda-packages/**/*.tar.bz2 --force --label main
|
|
89
|
+
|
|
90
|
+
- name: Summary
|
|
91
|
+
shell: bash -l {0}
|
|
92
|
+
run: |
|
|
93
|
+
echo "### Conda Package Published! :rocket:" >> $GITHUB_STEP_SUMMARY
|
|
94
|
+
echo "" >> $GITHUB_STEP_SUMMARY
|
|
95
|
+
echo "Users can install with:" >> $GITHUB_STEP_SUMMARY
|
|
96
|
+
echo '```bash' >> $GITHUB_STEP_SUMMARY
|
|
97
|
+
echo "conda install -c ${{ github.repository_owner }} slick-queue-py" >> $GITHUB_STEP_SUMMARY
|
|
98
|
+
echo '```' >> $GITHUB_STEP_SUMMARY
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch: # Manual trigger only (publish-release.yml handles automatic releases)
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
# Build source distribution (sdist) - only once, platform-independent
|
|
8
|
+
build-sdist:
|
|
9
|
+
name: Build Source Distribution
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
|
|
15
|
+
- name: Set up Python
|
|
16
|
+
uses: actions/setup-python@v5
|
|
17
|
+
with:
|
|
18
|
+
python-version: '3.11'
|
|
19
|
+
|
|
20
|
+
- name: Install build dependencies
|
|
21
|
+
run: |
|
|
22
|
+
python -m pip install --upgrade pip
|
|
23
|
+
pip install build wheel setuptools
|
|
24
|
+
|
|
25
|
+
- name: Build source distribution only
|
|
26
|
+
run: python -m build --sdist
|
|
27
|
+
|
|
28
|
+
- name: Upload sdist artifact
|
|
29
|
+
uses: actions/upload-artifact@v4
|
|
30
|
+
with:
|
|
31
|
+
name: dist-sdist
|
|
32
|
+
path: dist/*.tar.gz
|
|
33
|
+
|
|
34
|
+
# Build binary wheels for each platform/Python version
|
|
35
|
+
build-wheels:
|
|
36
|
+
name: Build Wheels
|
|
37
|
+
runs-on: ${{ matrix.os }}
|
|
38
|
+
strategy:
|
|
39
|
+
matrix:
|
|
40
|
+
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
41
|
+
|
|
42
|
+
steps:
|
|
43
|
+
- uses: actions/checkout@v4
|
|
44
|
+
|
|
45
|
+
- name: Build wheels
|
|
46
|
+
uses: pypa/cibuildwheel@v2.22
|
|
47
|
+
# Configuration is in pyproject.toml under [tool.cibuildwheel]
|
|
48
|
+
|
|
49
|
+
- name: Upload wheel artifacts
|
|
50
|
+
uses: actions/upload-artifact@v4
|
|
51
|
+
with:
|
|
52
|
+
name: dist-wheel-${{ matrix.os }}
|
|
53
|
+
path: wheelhouse/*.whl
|
|
54
|
+
|
|
55
|
+
publish-testpypi:
|
|
56
|
+
name: Publish to TestPyPI
|
|
57
|
+
needs: [build-sdist, build-wheels]
|
|
58
|
+
runs-on: ubuntu-latest
|
|
59
|
+
if: github.event_name == 'workflow_dispatch'
|
|
60
|
+
|
|
61
|
+
steps:
|
|
62
|
+
- name: Download all artifacts
|
|
63
|
+
uses: actions/download-artifact@v4
|
|
64
|
+
with:
|
|
65
|
+
pattern: dist-*
|
|
66
|
+
merge-multiple: true
|
|
67
|
+
path: dist/
|
|
68
|
+
|
|
69
|
+
- name: Publish to TestPyPI
|
|
70
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
71
|
+
with:
|
|
72
|
+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
|
73
|
+
repository-url: https://test.pypi.org/legacy/
|
|
74
|
+
|
|
75
|
+
publish-pypi:
|
|
76
|
+
name: Publish to PyPI
|
|
77
|
+
needs: [build-sdist, build-wheels]
|
|
78
|
+
runs-on: ubuntu-latest
|
|
79
|
+
if: github.event_name == 'release' && github.event.action == 'published'
|
|
80
|
+
|
|
81
|
+
permissions:
|
|
82
|
+
id-token: write # For trusted publishing
|
|
83
|
+
|
|
84
|
+
steps:
|
|
85
|
+
- name: Download all artifacts
|
|
86
|
+
uses: actions/download-artifact@v4
|
|
87
|
+
with:
|
|
88
|
+
pattern: dist-*
|
|
89
|
+
merge-multiple: true
|
|
90
|
+
path: dist/
|
|
91
|
+
|
|
92
|
+
- name: Publish to PyPI
|
|
93
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
94
|
+
with:
|
|
95
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
name: Publish Release (PyPI + Conda)
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
# Build source distribution (sdist) - only once, platform-independent
|
|
9
|
+
build-sdist:
|
|
10
|
+
name: Build Source Distribution
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
|
|
16
|
+
- name: Set up Python
|
|
17
|
+
uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: '3.11'
|
|
20
|
+
|
|
21
|
+
- name: Install build dependencies
|
|
22
|
+
run: |
|
|
23
|
+
python -m pip install --upgrade pip
|
|
24
|
+
pip install build wheel setuptools
|
|
25
|
+
|
|
26
|
+
- name: Build source distribution only
|
|
27
|
+
run: python -m build --sdist
|
|
28
|
+
|
|
29
|
+
- name: Upload sdist artifact
|
|
30
|
+
uses: actions/upload-artifact@v4
|
|
31
|
+
with:
|
|
32
|
+
name: pypi-sdist
|
|
33
|
+
path: dist/*.tar.gz
|
|
34
|
+
retention-days: 7
|
|
35
|
+
|
|
36
|
+
# Build binary wheels for each platform/Python version
|
|
37
|
+
build-wheels:
|
|
38
|
+
name: Build Wheels
|
|
39
|
+
runs-on: ${{ matrix.os }}
|
|
40
|
+
strategy:
|
|
41
|
+
matrix:
|
|
42
|
+
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
43
|
+
|
|
44
|
+
steps:
|
|
45
|
+
- uses: actions/checkout@v4
|
|
46
|
+
|
|
47
|
+
- name: Build wheels
|
|
48
|
+
uses: pypa/cibuildwheel@v2.22
|
|
49
|
+
# Configuration is in pyproject.toml under [tool.cibuildwheel]
|
|
50
|
+
|
|
51
|
+
- name: Upload wheel artifacts
|
|
52
|
+
uses: actions/upload-artifact@v4
|
|
53
|
+
with:
|
|
54
|
+
name: pypi-wheel-${{ matrix.os }}
|
|
55
|
+
path: wheelhouse/*.whl
|
|
56
|
+
retention-days: 7
|
|
57
|
+
|
|
58
|
+
# Build Conda packages
|
|
59
|
+
build-conda:
|
|
60
|
+
if: false # Disabled: conda workflow doesn't work yet
|
|
61
|
+
name: Build Conda Package
|
|
62
|
+
runs-on: ${{ matrix.os }}
|
|
63
|
+
continue-on-error: true # Allow conda builds to fail without blocking PyPI release
|
|
64
|
+
strategy:
|
|
65
|
+
fail-fast: false
|
|
66
|
+
matrix:
|
|
67
|
+
os: [ubuntu-latest, windows-latest, macos-15-intel] # Intel runner for conda compatibility
|
|
68
|
+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
|
|
69
|
+
# Note: Excluded Python 3.13+ due to conda-build virtual package resolution issues
|
|
70
|
+
# Note: Using macos-15-intel (x86_64) for consistency with conda-forge practices
|
|
71
|
+
|
|
72
|
+
steps:
|
|
73
|
+
- uses: actions/checkout@v4
|
|
74
|
+
|
|
75
|
+
- name: Set up Conda
|
|
76
|
+
uses: conda-incubator/setup-miniconda@v3
|
|
77
|
+
with:
|
|
78
|
+
python-version: ${{ matrix.python-version }}
|
|
79
|
+
channels: conda-forge
|
|
80
|
+
channel-priority: strict
|
|
81
|
+
activate-environment: build-env
|
|
82
|
+
|
|
83
|
+
- name: Install conda-build and anaconda-client
|
|
84
|
+
shell: bash -l {0}
|
|
85
|
+
run: |
|
|
86
|
+
# Use classic solver to avoid libmamba compatibility issues
|
|
87
|
+
conda config --set solver classic
|
|
88
|
+
conda install -y conda-build anaconda-client
|
|
89
|
+
|
|
90
|
+
- name: Build conda package
|
|
91
|
+
shell: bash -l {0}
|
|
92
|
+
run: |
|
|
93
|
+
conda build conda.recipe --output-folder ./conda-bld
|
|
94
|
+
|
|
95
|
+
- name: Upload Conda artifacts
|
|
96
|
+
uses: actions/upload-artifact@v4
|
|
97
|
+
with:
|
|
98
|
+
name: conda-package-${{ matrix.os }}-py${{ matrix.python-version }}
|
|
99
|
+
path: ./conda-bld/**/*.tar.bz2
|
|
100
|
+
retention-days: 7
|
|
101
|
+
|
|
102
|
+
# Publish to PyPI
|
|
103
|
+
publish-pypi:
|
|
104
|
+
name: Publish to PyPI
|
|
105
|
+
needs: [build-sdist, build-wheels]
|
|
106
|
+
runs-on: ubuntu-latest
|
|
107
|
+
permissions:
|
|
108
|
+
id-token: write
|
|
109
|
+
|
|
110
|
+
steps:
|
|
111
|
+
- name: Download all PyPI artifacts
|
|
112
|
+
uses: actions/download-artifact@v4
|
|
113
|
+
with:
|
|
114
|
+
pattern: pypi-*
|
|
115
|
+
merge-multiple: true
|
|
116
|
+
path: dist/
|
|
117
|
+
|
|
118
|
+
- name: Publish to PyPI
|
|
119
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
120
|
+
with:
|
|
121
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
122
|
+
|
|
123
|
+
# Publish to Anaconda Cloud
|
|
124
|
+
publish-conda:
|
|
125
|
+
if: false # Disabled: conda workflow doesn't work yet
|
|
126
|
+
name: Publish to Anaconda Cloud
|
|
127
|
+
needs: build-conda
|
|
128
|
+
runs-on: ubuntu-latest
|
|
129
|
+
# if: success() # Only run if conda builds succeeded
|
|
130
|
+
|
|
131
|
+
steps:
|
|
132
|
+
- name: Set up Conda
|
|
133
|
+
uses: conda-incubator/setup-miniconda@v3
|
|
134
|
+
with:
|
|
135
|
+
python-version: '3.11'
|
|
136
|
+
channels: conda-forge
|
|
137
|
+
|
|
138
|
+
- name: Install anaconda-client
|
|
139
|
+
shell: bash -l {0}
|
|
140
|
+
run: |
|
|
141
|
+
conda install -y anaconda-client
|
|
142
|
+
|
|
143
|
+
- name: Download Conda artifacts
|
|
144
|
+
uses: actions/download-artifact@v4
|
|
145
|
+
with:
|
|
146
|
+
pattern: conda-package-*
|
|
147
|
+
merge-multiple: true
|
|
148
|
+
path: ./conda-packages
|
|
149
|
+
|
|
150
|
+
- name: Upload to Anaconda Cloud
|
|
151
|
+
shell: bash -l {0}
|
|
152
|
+
env:
|
|
153
|
+
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
|
|
154
|
+
run: |
|
|
155
|
+
anaconda -t $ANACONDA_API_TOKEN upload ./conda-packages/**/*.tar.bz2 --force --label main
|
|
156
|
+
|
|
157
|
+
# Create release summary
|
|
158
|
+
release-summary:
|
|
159
|
+
name: Release Summary
|
|
160
|
+
needs: [publish-pypi]
|
|
161
|
+
runs-on: ubuntu-latest
|
|
162
|
+
if: always() # Run even if conda publish fails
|
|
163
|
+
|
|
164
|
+
steps:
|
|
165
|
+
- name: Create summary
|
|
166
|
+
run: |
|
|
167
|
+
echo "## 🎉 Release Published!" >> $GITHUB_STEP_SUMMARY
|
|
168
|
+
echo "" >> $GITHUB_STEP_SUMMARY
|
|
169
|
+
echo "### Installation" >> $GITHUB_STEP_SUMMARY
|
|
170
|
+
echo "" >> $GITHUB_STEP_SUMMARY
|
|
171
|
+
echo "**Via pip (PyPI):**" >> $GITHUB_STEP_SUMMARY
|
|
172
|
+
echo '```bash' >> $GITHUB_STEP_SUMMARY
|
|
173
|
+
echo "pip install slick-queue-py" >> $GITHUB_STEP_SUMMARY
|
|
174
|
+
echo '```' >> $GITHUB_STEP_SUMMARY
|
|
175
|
+
echo "" >> $GITHUB_STEP_SUMMARY
|
|
176
|
+
echo "### Links" >> $GITHUB_STEP_SUMMARY
|
|
177
|
+
echo "- PyPI: https://pypi.org/project/slick-queue-py/" >> $GITHUB_STEP_SUMMARY
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
name: Create Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*' # Trigger on version tags like v0.1.0, v1.0.0, etc.
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
create-release:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- name: Checkout code
|
|
16
|
+
uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- name: Extract version from tag
|
|
19
|
+
id: get_version
|
|
20
|
+
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
|
|
21
|
+
|
|
22
|
+
- name: Extract changelog for this version
|
|
23
|
+
id: changelog
|
|
24
|
+
run: |
|
|
25
|
+
if [ -f CHANGELOG.md ]; then
|
|
26
|
+
# Extract the section for this version from CHANGELOG.md
|
|
27
|
+
VERSION="${{ github.ref_name }}"
|
|
28
|
+
# Escape dots in version for regex
|
|
29
|
+
VERSION_ESCAPED=$(echo "$VERSION" | sed 's/\./\\./g')
|
|
30
|
+
# Use awk to extract content: start at version header, stop at next ## header
|
|
31
|
+
CHANGES=$(awk "BEGIN{p=0} /^## \[$VERSION_ESCAPED\]/{p=1;next} /^## \[/{p=0} p" CHANGELOG.md | sed '/^$/d')
|
|
32
|
+
|
|
33
|
+
if [ -z "$CHANGES" ]; then
|
|
34
|
+
echo "CHANGELOG_CONTENT=No changelog entry found for this version." >> $GITHUB_OUTPUT
|
|
35
|
+
else
|
|
36
|
+
# Escape newlines for GitHub output
|
|
37
|
+
echo "CHANGELOG_CONTENT<<EOF" >> $GITHUB_OUTPUT
|
|
38
|
+
echo "$CHANGES" >> $GITHUB_OUTPUT
|
|
39
|
+
echo "EOF" >> $GITHUB_OUTPUT
|
|
40
|
+
fi
|
|
41
|
+
else
|
|
42
|
+
echo "CHANGELOG_CONTENT=CHANGELOG.md not found." >> $GITHUB_OUTPUT
|
|
43
|
+
fi
|
|
44
|
+
|
|
45
|
+
- name: Create Release
|
|
46
|
+
uses: softprops/action-gh-release@v1
|
|
47
|
+
with:
|
|
48
|
+
name: Release ${{ github.ref_name }}
|
|
49
|
+
body: |
|
|
50
|
+
## Changes
|
|
51
|
+
|
|
52
|
+
${{ steps.changelog.outputs.CHANGELOG_CONTENT }}
|
|
53
|
+
|
|
54
|
+
draft: true
|
|
55
|
+
prerelease: false
|
|
56
|
+
generate_release_notes: false
|