From 6e27bbe0fd50d2ccb6ff5304e3156aaeea08adb8 Mon Sep 17 00:00:00 2001 From: Florentin Labelle Date: Wed, 9 Jul 2025 11:50:22 +0200 Subject: [PATCH] build: publish artifacts of built layers on main updates --- .github/workflows/build_layer.yml | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/build_layer.yml diff --git a/.github/workflows/build_layer.yml b/.github/workflows/build_layer.yml new file mode 100644 index 00000000..789868ed --- /dev/null +++ b/.github/workflows/build_layer.yml @@ -0,0 +1,35 @@ +name: Build Layers for system-Tests + +on: + push: + branches: + - "main" + +jobs: + build: + runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }} + + strategy: + matrix: + arch: [arm64, amd64] + python_version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Patch pyproject.toml + run: | + echo "Patching pyproject.toml to use main branch of dd-trace-py" + sed -i 's|^ddtrace =.*$|ddtrace = { git = "https://github.com/DataDog/dd-trace-py.git" }|' pyproject.toml + + - name: Build layer for Python ${{ matrix.python_version }} on ${{ matrix.arch }} + run: | + echo "Building layer for Python ${{ matrix.python_version }} on ${{ matrix.arch }}" + ARCH=${{ matrix.arch }} PYTHON_VERSION=${{ matrix.python_version }} ./scripts/build_layers.sh + + - name: Upload layer artifact + uses: actions/upload-artifact@v4 + with: + path: .layers/datadog_lambda_py-${{ matrix.arch }}-${{ matrix.python_version }}.zip + name: datadog-lambda-python-${{ matrix.python_version }}-${{ matrix.arch }}