-
Notifications
You must be signed in to change notification settings - Fork 542
Expand file tree
/
Copy pathbuild-base-venvs.yml
More file actions
58 lines (58 loc) · 2.17 KB
/
Copy pathbuild-base-venvs.yml
File metadata and controls
58 lines (58 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
build_base_venvs:
extends: .cached_testrunner
stage: setup
needs: []
parallel:
matrix:
- PYTHON_VERSION: [{python_versions}]
variables:
CMAKE_BUILD_PARALLEL_LEVEL: '12'
PIP_VERBOSE: '0'
DD_PROFILING_NATIVE_TESTS: '1'
DD_USE_SCCACHE: '1'
# S3-backed sccache, matches the wheel-build jobs in .gitlab/package.yml
SCCACHE_BUCKET: 'dd-trace-py-builds'
SCCACHE_S3_KEY_PREFIX: 'sccache'
SCCACHE_REGION: 'us-east-1'
DD_PROFILING_MEMALLOC_ASSERT_ON_REENTRY: '1'
# Pin resources and disable the VPA. This job compiles every native
# extension in parallel (CMAKE_BUILD_PARALLEL_LEVEL=12, set above) whenever
# the ext_cache is cold (e.g. a newly added Python version), which peaks
# well above the ~5Gi the VPA otherwise tunes it down to and gets OOMKilled.
# Matches the resource requests used by the native package build jobs.
KUBERNETES_CPU_REQUEST: '6'
KUBERNETES_MEMORY_REQUEST: '10Gi'
KUBERNETES_MEMORY_LIMIT: '10Gi'
DD_DISABLE_VPA: 'true'
# Disable link time optimization settings to improve build times, the impact will be larger binary sizes
CARGO_PROFILE_RELEASE_LTO: 'off'
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: '16'
CARGO_PROFILE_RELEASE_OPT_LEVEL: '2'
script: |
set -e -o pipefail
echo "UNPIN_DEPENDENCIES: {unpin_dependencies}"
echo "NIGHTLY_BUILD: {nightly_build}"
if [[ "{unpin_dependencies}" == "true" ]]
then
python scripts/allow_prerelease_dependencies.py
export PIP_PRE=true
fi
# PIP_IGNORE_REQUIRES_PYTHON lets riot's `pip install -e .` install the
# dev package despite requires-python = ">=3.9,<3.15". 3.15 only: other
# matrix versions already satisfy the bound.
# TODO(py-315): drop this once requires-python includes 3.15
case "$PYTHON_VERSION" in
3.15) export PIP_IGNORE_REQUIRES_PYTHON=1 ;;
esac
riot -P -v generate --python=$PYTHON_VERSION
.riot/venv_py3*/bin/pip freeze
echo "Running smoke tests"
riot -v run -s --python=$PYTHON_VERSION smoke_test
sccache --show-stats || true
artifacts:
name: venv_$PYTHON_VERSION
when: always
paths:
- core.*
- ddtrace/**/*.so*
- .riot/venv_*