88 test :
99 name : " cargo test --workspace #${{ matrix.platform }} ${{ matrix.rust_version }}"
1010 runs-on : ${{ matrix.platform }}
11+ env :
12+ CARGO_TERM_COLOR : always
13+ CARGO_INCREMENTAL : 0
1114 strategy :
1215 matrix :
1316 platform : [windows-latest, ubuntu-latest, macos-15]
2831 large-packages : true
2932 docker-images : false
3033 swap-storage : true
31-
3234 - name : Checkout sources
3335 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
34- - name : Cache
35- uses : ./.github/actions/cache
36- with :
37- rust_version : ${{ matrix.rust_version }}
3836 - name : Install Rust ${{ matrix.rust_version }}
3937 if : matrix.rust_version != ''
4038 run : rustup install ${{ matrix.rust_version }} && rustup default ${{ matrix.rust_version }}
4543 uses : taiki-e/install-action@2c41309d51ede152b6f2ee6bf3b71e6dc9a8b7df # 2.49.27
4644 with :
4745 tool : nextest@0.9.96
46+ - name : Cache [rust]
47+ uses : Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # 2.8.1
48+ with :
49+ cache-targets : true # cache build artifacts
50+ cache-bin : true # cache the ~/.cargo/bin directory
4851 - name : " Remove nextest CI report"
4952 shell : bash
5053 run : rm -rf target/nextest/ci/junit.xml
9093 ffi :
9194 name : " FFI #${{ matrix.platform }} ${{ matrix.rust_version }}"
9295 runs-on : ${{ matrix.platform }}
96+ env :
97+ CARGO_TERM_COLOR : always
98+ CARGO_INCREMENTAL : 0
9399 strategy :
94100 matrix :
95101 platform : [windows-latest, ubuntu-latest, macos-15]
@@ -106,7 +112,6 @@ jobs:
106112 steps :
107113 - name : Checkout sources
108114 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
109-
110115 - name : Setup output dir
111116 shell : bash
112117 run : |
@@ -115,7 +120,6 @@ jobs:
115120 WORKSPACE_PATH=$(cygpath -ua '${{ github.workspace }}')
116121 fi
117122 echo "LIBDD_OUTPUT_FOLDER=$WORKSPACE_PATH/artifacts" >> $GITHUB_ENV
118-
119123 - name : Free Disk Space (Ubuntu only)
120124 if : runner.os == 'Linux' && matrix.platform == 'ubuntu-latest'
121125 uses : jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # 1.3.1
@@ -127,14 +131,6 @@ jobs:
127131 large-packages : false
128132 docker-images : false
129133 swap-storage : true
130-
131-
132- - name : Cache
133- uses : ./.github/actions/cache
134- with :
135- rust_version : ${{ matrix.rust_version }}
136- build_profile : " release"
137-
138134 - name : Install Rust ${{ matrix.rust_version }}
139135 if : matrix.rust_version != ''
140136 run : rustup install ${{ matrix.rust_version }} && rustup default ${{ matrix.rust_version }}
@@ -143,13 +139,19 @@ jobs:
143139 # On Windows run happens in a PowerShell, so start bash explicitly
144140 run : bash -c 'echo "version=$(rustc --version)" >> $GITHUB_OUTPUT'
145141
142+ - name : Cache [rust]
143+ uses : Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # 2.8.1
144+ env :
145+ RUSTFLAGS : " ${{ matrix.flags }}"
146+ with :
147+ cache-targets : true # cache build artifacts
148+ cache-bin : true # cache the ~/.cargo/bin directory
146149 - name : " Generate profiling FFI"
147150 shell : bash
148151 env :
149152 RUSTFLAGS : " ${{ matrix.flags }}"
150153 run : |
151- cargo run --bin release --features profiling,telemetry,data-pipeline,symbolizer,crashtracker,library-config,log,ddsketch --release -- --out $LIBDD_OUTPUT_FOLDER
152-
154+ cargo run --bin release --release -- --out $LIBDD_OUTPUT_FOLDER
153155 - name : ' Publish libdatadog'
154156 uses : actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # 4.6.1
155157 # Only upload the artifacts built with the default Rust version
@@ -159,7 +161,6 @@ jobs:
159161 name : libdatadog.${{ matrix.platform }}
160162 path : ${{ github.workspace }}/artifacts
161163 retention-days : 1
162-
163164 - name : " (Windows) Test building Profiling C bindings - dynamic link vc runtime"
164165 if : matrix.platform == 'windows-latest'
165166 shell : bash
@@ -170,7 +171,6 @@ jobs:
170171 cd examples/ffi/build_dll
171172 cmake -S .. -DDatadog_ROOT=$LIBDD_OUTPUT_FOLDER -DVCRUNTIME_LINK_TYPE=DLL
172173 cmake --build .
173-
174174 - name : " (Windows) Test building Profiling C bindings - static link vc runtime"
175175 if : matrix.platform == 'windows-latest'
176176 shell : bash
@@ -181,7 +181,6 @@ jobs:
181181 cd examples/ffi/build_static
182182 cmake -S .. -DDatadog_ROOT=$LIBDD_OUTPUT_FOLDER -DVCRUNTIME_LINK_TYPE=STATIC
183183 cmake --build .
184-
185184 - name : " Test building Profiling C bindings"
186185 shell : bash
187186 if : matrix.platform != 'windows-latest'
@@ -219,10 +218,11 @@ jobs:
219218 swap-storage : true
220219 - name : Checkout
221220 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
222- - name : Cache
223- uses : ./.github/actions/ cache
221+ - name : Cache [rust]
222+ uses : Swatinem/rust- cache@f13886b937689c021905a6b90929199931d60db1 # 2.8.1
224223 with :
225- rust_version : cross-centos7
224+ cache-targets : true # cache build artifacts
225+ cache-bin : true # cache the ~/.cargo/bin directory
226226 - run : cargo install cross || true
227227 - run : cross build --workspace --target x86_64-unknown-linux-gnu --exclude builder
228228 - run : cross test --workspace --features libdd-crashtracker/generate-unit-test-files --target x86_64-unknown-linux-gnu --exclude builder -- --skip "::single_threaded_tests::" --skip "tracing_integration_tests::"
@@ -233,25 +233,20 @@ jobs:
233233 matrix :
234234 target : [alpine-build] # debian-build-aarch64 is oom killed at the moment
235235 name : " FFI ${{ matrix.target }} via docker bake"
236-
237236 concurrency :
238237 group : ci-${{ github.ref }}-${{ matrix.target }}
239238 cancel-in-progress : true
240-
241239 runs-on :
242240 labels : ubuntu-latest-16-cores
243241 group : APM Larger Runners
244242 steps :
245- -
246- name : Checkout
243+ - name : Checkout
247244 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
248- -
249- name : Set up Docker Buildx
245+ - name : Set up Docker Buildx
250246 uses : docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # 3.10.0
251247 with :
252248 buildkitd-config : .github/buildkitd-16-cores.toml
253- -
254- name : Build and Generate FFI
249+ - name : Build and Generate FFI
255250 uses : docker/bake-action@4ba453fbc2db7735392b93edf935aaf9b1e8f747 # 6.5.0
256251 with :
257252 targets : ${{ matrix.target }}
0 commit comments