Add a CI job to test memory

This commit is contained in:
Zanie Blue 2025-08-14 08:31:27 -05:00
parent 6010a21d6b
commit e427a7c6a1
1 changed files with 45 additions and 0 deletions

View File

@ -2731,3 +2731,48 @@ jobs:
with:
run: cargo codspeed run
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