Skip to content

Commit 6c569c0

Browse files
authored
Remove Rust hydration (#316)
* refactor: remove rust hydration It lives in https://github.com/gadomski/hydraters now
1 parent f1d71d5 commit 6c569c0

15 files changed

+62
-669
lines changed

.github/workflows/continuous-integration.yml

+23-127
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,26 @@ jobs:
2424
buildpyrustdocker: ${{ steps.check.outputs.buildpy }}
2525

2626
steps:
27-
- uses: actions/checkout@v3
28-
- uses: dorny/paths-filter@v2
29-
id: filter
30-
with:
31-
filters: |
32-
pgstac:
33-
- 'docker/pgstac/**'
34-
pypgstac:
35-
- 'docker/pypgstac/**'
36-
- id: check
37-
run: |
38-
buildpg=false;
39-
ref=$(echo ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} | tr / _);
40-
[[ "${{ steps.filter.outputs.pgstac }}" == "true" ]] && buildpg=true || ref=main;
41-
echo "pgtag=${{ env.REGISTRY }}/stac-utils/pgstac-postgres:$ref" >>$GITHUB_OUTPUT;
42-
echo "buildpg=$buildpg" >>$GITHUB_OUTPUT;
43-
buildy=false;
44-
[[ "${{ steps.filter.outputs.pypgstac }}" == "true" ]] && buildpy=true || ref=main;
45-
echo "pytag=${{ env.REGISTRY }}/stac-utils/pgstac-pyrust:$ref" >>$GITHUB_OUTPUT;
46-
echo "buildpy=$buildpg" >>$GITHUB_OUTPUT;
27+
- uses: actions/checkout@v3
28+
- uses: dorny/paths-filter@v2
29+
id: filter
30+
with:
31+
filters: |
32+
pgstac:
33+
- 'docker/pgstac/**'
34+
pypgstac:
35+
- 'docker/pypgstac/**'
36+
- id: check
37+
run: |
38+
buildpg=false;
39+
ref=$(echo ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} | tr / _);
40+
[[ "${{ steps.filter.outputs.pgstac }}" == "true" ]] && buildpg=true || ref=main;
41+
echo "pgtag=${{ env.REGISTRY }}/stac-utils/pgstac-postgres:$ref" >>$GITHUB_OUTPUT;
42+
echo "buildpg=$buildpg" >>$GITHUB_OUTPUT;
43+
buildy=false;
44+
[[ "${{ steps.filter.outputs.pypgstac }}" == "true" ]] && buildpy=true || ref=main;
45+
echo "pytag=${{ env.REGISTRY }}/stac-utils/pgstac-pyrust:$ref" >>$GITHUB_OUTPUT;
46+
echo "buildpy=$buildpg" >>$GITHUB_OUTPUT;
4747
4848
# This builds a base postgres image that has everything installed to be able to run pgstac. This image does not have pgstac itself installed.
4949
buildpg:
@@ -103,7 +103,7 @@ jobs:
103103
needs: [changes, buildpg, buildpyrust]
104104
runs-on: ubuntu-latest
105105
container:
106-
image: ${{ needs.changes.outputs.pyrustdocker }}
106+
image: ${{ needs.changes.outputs.pyrustdocker }}
107107
env:
108108
PGPASSWORD: postgres
109109
PGHOST: postgres
@@ -125,114 +125,10 @@ jobs:
125125
- uses: actions/checkout@v3
126126
- name: Install pypgstac
127127
working-directory: /__w/pgstac/pgstac/src/pypgstac
128-
run: |
128+
run: |
129129
pip install .[dev,test,psycopg];
130130
131131
- name: Run tests
132132
working-directory: /__w/pgstac/pgstac/docker/pypgstac/bin
133-
run: |
133+
run: |
134134
./test
135-
136-
linux:
137-
runs-on: ubuntu-latest
138-
strategy:
139-
matrix:
140-
target: [x86_64, x86, aarch64, armv7, s390x, ppc64le]
141-
steps:
142-
- uses: actions/checkout@v3
143-
- uses: actions/setup-python@v4
144-
with:
145-
python-version: '3.10'
146-
- name: Build wheels
147-
uses: PyO3/maturin-action@v1
148-
with:
149-
working-directory: src/pypgstac
150-
target: ${{ matrix.target }}
151-
args: --release --out /home/runner/work/pgstac/pgstac/dist
152-
sccache: 'true'
153-
manylinux: auto
154-
- name: Upload wheels
155-
uses: actions/upload-artifact@v3
156-
with:
157-
name: wheels
158-
path: /home/runner/work/pgstac/pgstac/dist/*
159-
160-
windows:
161-
runs-on: windows-latest
162-
strategy:
163-
matrix:
164-
target: [x64, x86]
165-
steps:
166-
- uses: actions/checkout@v3
167-
- uses: actions/setup-python@v4
168-
with:
169-
python-version: '3.10'
170-
architecture: ${{ matrix.target }}
171-
- name: Build wheels
172-
uses: PyO3/maturin-action@v1
173-
with:
174-
working-directory: src/pypgstac
175-
target: ${{ matrix.target }}
176-
args: --release --out /home/runner/work/pgstac/pgstac/dist
177-
sccache: 'true'
178-
- name: Upload wheels
179-
uses: actions/upload-artifact@v3
180-
with:
181-
name: wheels
182-
path: /home/runner/work/pgstac/pgstac/dist/*
183-
184-
macos:
185-
runs-on: macos-latest
186-
strategy:
187-
matrix:
188-
target: [x86_64, aarch64]
189-
steps:
190-
- uses: actions/checkout@v3
191-
- uses: actions/setup-python@v4
192-
with:
193-
python-version: '3.10'
194-
- name: Build wheels
195-
uses: PyO3/maturin-action@v1
196-
with:
197-
working-directory: src/pypgstac
198-
target: ${{ matrix.target }}
199-
args: --release --out /tmp/dist
200-
sccache: 'true'
201-
- name: Upload wheels
202-
uses: actions/upload-artifact@v3
203-
with:
204-
name: wheels
205-
path: /tmp/dist/*
206-
207-
sdist:
208-
runs-on: ubuntu-latest
209-
steps:
210-
- uses: actions/checkout@v3
211-
- name: Build sdist
212-
uses: PyO3/maturin-action@v1
213-
with:
214-
working-directory: src/pypgstac
215-
command: sdist
216-
args: --out /home/runner/work/pgstac/pgstac/dist
217-
- name: Upload sdist
218-
uses: actions/upload-artifact@v3
219-
with:
220-
name: wheels
221-
path: /home/runner/work/pgstac/pgstac/dist/*
222-
223-
# release:
224-
# name: Release
225-
# runs-on: ubuntu-latest
226-
# if: "startsWith(github.ref, 'refs/tags/')"
227-
# needs: [linux, windows, macos, sdist]
228-
# steps:
229-
# - uses: actions/download-artifact@v3
230-
# with:
231-
# name: wheels
232-
# - name: Publish to PyPI
233-
# uses: PyO3/maturin-action@v1
234-
# env:
235-
# MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
236-
# with:
237-
# command: upload
238-
# args: --skip-existing *

.github/workflows/release.yml

+16-98
Original file line numberDiff line numberDiff line change
@@ -151,106 +151,24 @@ jobs:
151151
cache-from: type=gha
152152
cache-to: type=gha, mode=max
153153

154-
linux:
155-
runs-on: ubuntu-latest
156-
strategy:
157-
matrix:
158-
target: [x86_64, x86, aarch64, armv7, s390x, ppc64le]
159-
steps:
160-
- uses: actions/checkout@v3
161-
- uses: actions/setup-python@v4
162-
with:
163-
python-version: '3.10'
164-
- name: Build wheels
165-
uses: PyO3/maturin-action@v1
166-
with:
167-
working-directory: src/pypgstac
168-
target: ${{ matrix.target }}
169-
args: --release --out /home/runner/work/pgstac/pgstac/dist
170-
sccache: 'true'
171-
manylinux: auto
172-
- name: Upload wheels
173-
uses: actions/upload-artifact@v3
174-
with:
175-
name: wheels
176-
path: /home/runner/work/pgstac/pgstac/dist/*
177-
178-
windows:
179-
runs-on: windows-latest
180-
strategy:
181-
matrix:
182-
target: [x64, x86]
183-
steps:
184-
- uses: actions/checkout@v3
185-
- uses: actions/setup-python@v4
186-
with:
187-
python-version: '3.10'
188-
architecture: ${{ matrix.target }}
189-
- name: Build wheels
190-
uses: PyO3/maturin-action@v1
191-
with:
192-
working-directory: src/pypgstac
193-
target: ${{ matrix.target }}
194-
args: --release --out /home/runner/work/pgstac/pgstac/dist
195-
sccache: 'true'
196-
- name: Upload wheels
197-
uses: actions/upload-artifact@v3
198-
with:
199-
name: wheels
200-
path: /home/runner/work/pgstac/pgstac/dist/*
201-
202-
macos:
203-
runs-on: macos-latest
204-
strategy:
205-
matrix:
206-
target: [x86_64, aarch64]
207-
steps:
208-
- uses: actions/checkout@v3
209-
- uses: actions/setup-python@v4
210-
with:
211-
python-version: '3.10'
212-
- name: Build wheels
213-
uses: PyO3/maturin-action@v1
214-
with:
215-
working-directory: src/pypgstac
216-
target: ${{ matrix.target }}
217-
args: --release --out /tmp/dist
218-
sccache: 'true'
219-
- name: Upload wheels
220-
uses: actions/upload-artifact@v3
221-
with:
222-
name: wheels
223-
path: /tmp/dist/*
224-
225-
sdist:
226-
runs-on: ubuntu-latest
227-
steps:
228-
- uses: actions/checkout@v3
229-
- name: Build sdist
230-
uses: PyO3/maturin-action@v1
231-
with:
232-
working-directory: src/pypgstac
233-
command: sdist
234-
args: --out /home/runner/work/pgstac/pgstac/dist
235-
- name: Upload sdist
236-
uses: actions/upload-artifact@v3
237-
with:
238-
name: wheels
239-
path: /home/runner/work/pgstac/pgstac/dist/*
240-
241154
releasetopypi:
242155
name: Release
243156
runs-on: ubuntu-latest
244-
needs: [linux, windows, macos, sdist]
157+
permissions:
158+
id-token: write
159+
environment:
160+
name: pypi
161+
url: https://pypi.org/p/pypgstac
245162
steps:
246-
- uses: actions/download-artifact@v3
247-
with:
248-
name: wheels
163+
- name: Checkout
164+
uses: actions/checkout@v4
165+
- name: Setup Python
166+
uses: actions/setup-python@v5
167+
with:
168+
python-version: "3.x"
169+
- name: Install build
170+
run: pip install build
171+
- name: Build
172+
run: python -m build
249173
- name: Publish to PyPI
250-
uses: PyO3/maturin-action@v1
251-
env:
252-
MATURIN_USERNAME: ${{ secrets.PYPI_STACUTILS_USERNAME }}
253-
MATURIN_PASSWORD: ${{ secrets.PYPI_STACUTILS_PASSWORD }}
254-
with:
255-
command: upload
256-
args: --skip-existing *
174+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)