Skip to content

Commit a97a1c9

Browse files
authored
build: publish artifacts of built layers on main updates (#629)
1 parent d2a195e commit a97a1c9

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/build_layer.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Build Layers for system-Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
8+
jobs:
9+
build:
10+
runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
11+
12+
strategy:
13+
matrix:
14+
arch: [arm64, amd64]
15+
python_version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Patch pyproject.toml
22+
run: |
23+
echo "Patching pyproject.toml to use main branch of dd-trace-py"
24+
sed -i 's|^ddtrace =.*$|ddtrace = { git = "https://github.com/DataDog/dd-trace-py.git" }|' pyproject.toml
25+
26+
- name: Build layer for Python ${{ matrix.python_version }} on ${{ matrix.arch }}
27+
run: |
28+
echo "Building layer for Python ${{ matrix.python_version }} on ${{ matrix.arch }}"
29+
ARCH=${{ matrix.arch }} PYTHON_VERSION=${{ matrix.python_version }} ./scripts/build_layers.sh
30+
31+
- name: Upload layer artifact
32+
uses: actions/upload-artifact@v4
33+
with:
34+
path: .layers/datadog_lambda_py-${{ matrix.arch }}-${{ matrix.python_version }}.zip
35+
name: datadog-lambda-python-${{ matrix.python_version }}-${{ matrix.arch }}

0 commit comments

Comments
 (0)