@@ -2,28 +2,80 @@ name: Build Layers for system-Tests
22
33on :
44 workflow_dispatch :
5+ pull_request :
56 push :
67 branches :
78 - " main"
89
910jobs :
11+ get-ddtrace-run-id :
12+ runs-on : ubuntu-latest
13+ outputs :
14+ run-id : ${{ steps.get-ddtrace-run-id.outputs.run_id }}
15+ steps :
16+ - name : Resolve Run ID of latest dd-trace-py build
17+ id : get-ddtrace-run-id
18+ env :
19+ GH_TOKEN : ${{ github.token }}
20+ run : |
21+ RUN_ID=$(gh run list \
22+ --repo DataDog/dd-trace-py \
23+ --workflow build_deploy.yml \
24+ --branch main \
25+ --status success \
26+ --limit 1 \
27+ --json databaseId \
28+ --jq '.[0].databaseId')
29+
30+ echo "run_id=$RUN_ID" >> $GITHUB_OUTPUT
31+
1032 build :
1133 runs-on : ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
1234
35+ needs : get-ddtrace-run-id
36+
1337 strategy :
1438 fail-fast : false
1539 matrix :
1640 arch : [arm64, amd64]
17- python_version : ["3.9", "3.10", "3.11", "3.12", "3.13"]
41+ python_version : ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14" ]
1842
1943 steps :
2044 - name : Checkout
2145 uses : actions/checkout@v4
2246
47+ - name : Build artifact name
48+ id : build-artifact-name
49+ run : |
50+ if [ "${{ matrix.arch }}" == "amd64" ]; then
51+ ARCH="x86_64"
52+ else
53+ ARCH="aarch64"
54+ fi
55+
56+ VER="${{ matrix.python_version }}"
57+ PY_VERSION_NO_DOT="${VER//./}"
58+
59+ echo "artifact_name=wheels-cp${PY_VERSION_NO_DOT}-manylinux_${ARCH}" >> $GITHUB_OUTPUT
60+
61+ - name : Download ddtrace Wheel
62+ uses : actions/download-artifact@v4
63+ with :
64+ name : ${{ steps.build-artifact-name.outputs.artifact_name }}
65+ repository : DataDog/dd-trace-py
66+ run-id : ${{ needs.get-ddtrace-run-id.outputs.run-id }}
67+ github-token : ${{ secrets.GITHUB_TOKEN }}
68+ path : ./artifacts
69+
70+ - name : Find ddtrace Wheel
71+ id : find-ddtrace-wheel
72+ run : |
73+ echo "wheel_path=$(find ./artifacts -name "*.whl" | head -n 1)" >> $GITHUB_OUTPUT
74+
2375 - name : Patch pyproject.toml
2476 run : |
25- echo "Patching pyproject.toml to use main branch of dd-trace-py"
26- sed -i 's|^ddtrace =.*$|ddtrace = { git = "https://github.com/DataDog/dd-trace-py.git " }|' pyproject.toml
77+ echo "Patching pyproject.toml to use latest build of dd-trace-py"
78+ sed -i 's|^ddtrace =.*$|ddtrace = { file = "${{ steps.find-ddtrace-wheel.outputs.wheel_path }} " }|' pyproject.toml
2779
2880 - name : Build layer for Python ${{ matrix.python_version }} on ${{ matrix.arch }}
2981 run : |
0 commit comments