mirror of https://github.com/astral-sh/uv
Add a CI job to test memory
This commit is contained in:
parent
6010a21d6b
commit
e427a7c6a1
|
|
@ -2731,3 +2731,48 @@ jobs:
|
||||||
with:
|
with:
|
||||||
run: cargo codspeed run
|
run: cargo codspeed run
|
||||||
token: ${{ secrets.CODSPEED_TOKEN }}
|
token: ${{ secrets.CODSPEED_TOKEN }}
|
||||||
|
|
||||||
|
check-memory:
|
||||||
|
timeout-minutes: 10
|
||||||
|
needs: build-binary-linux-libc
|
||||||
|
name: "check memory | x86-64 linux"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||||
|
with:
|
||||||
|
python-version: "${{ env.PYTHON_VERSION }}"
|
||||||
|
|
||||||
|
- name: "Download binary"
|
||||||
|
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
||||||
|
with:
|
||||||
|
name: uv-linux-libc-${{ github.sha }}
|
||||||
|
|
||||||
|
- name: "Prepare binary"
|
||||||
|
run: |
|
||||||
|
chmod +x ./uv
|
||||||
|
chmod +x ./uvx
|
||||||
|
|
||||||
|
- name: "Run `pip compile` with a memory limit"
|
||||||
|
run: |
|
||||||
|
sudo systemd-run \
|
||||||
|
--scope \
|
||||||
|
--property=MemoryMax=512M \
|
||||||
|
--property=MemorySwapMax=0 \
|
||||||
|
/usr/bin/time -v \
|
||||||
|
./uv pip compile -q scripts/requirements/airflow.in --no-cache
|
||||||
|
|
||||||
|
|
||||||
|
- name: "Run `pip compile` with reduced concurrency"
|
||||||
|
run: |
|
||||||
|
# Cutting the concurrent downloads should reduce consumption
|
||||||
|
export UV_CONCURRENT_DOWNLOADS=1
|
||||||
|
sudo systemd-run \
|
||||||
|
--scope \
|
||||||
|
--property=MemoryMax=256M \
|
||||||
|
--property=MemorySwapMax=0 \
|
||||||
|
/usr/bin/time -v \
|
||||||
|
./uv pip compile -q scripts/requirements/airflow.in --no-cache
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue