From e427a7c6a1236d7768e7097d49f51501a49a5f93 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Thu, 14 Aug 2025 08:31:27 -0500 Subject: [PATCH] Add a CI job to test memory --- .github/workflows/ci.yml | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 772a1c4b4..280eefe31 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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