@@ -189,132 +189,6 @@ jobs:
189189 - name : test-cairo
190190 run : make test-cairo
191191
192- coverage :
193- name : coverage
194- runs-on : ubuntu-24.04
195- strategy :
196- matrix :
197- partition : [1, 2, 3, 4]
198- include :
199- - partition : 1
200- output : lcov-1.info
201- - partition : 2
202- output : lcov-2.info
203- - partition : 3
204- output : lcov-3.info
205- - partition : 4
206- output : lcov-4.info
207- env :
208- MLIR_SYS_190_PREFIX : /usr/lib/llvm-19/
209- LLVM_SYS_191_PREFIX : /usr/lib/llvm-19/
210- TABLEGEN_190_PREFIX : /usr/lib/llvm-19/
211- RUST_LOG : cairo_native=debug
212- steps :
213- - uses : actions/checkout@v4
214- - name : check and free hdd space left
215- run : |
216- echo "Listing 20 largest packages"
217- dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 20
218- df -h
219- sudo apt-get update
220- sudo apt-get remove -y '^llvm-.*'
221- sudo apt-get remove -y 'php.*'
222- sudo apt-get remove -y '^dotnet-.*'
223- sudo apt-get remove -y '^temurin-.*'
224- sudo apt-get remove -y azure-cli microsoft-edge-stable google-chrome-stable firefox mono-devel
225- sudo apt-get autoremove -y
226- sudo apt-get clean
227- df -h
228- echo "Removing large directories"
229- # deleting 15GB
230- sudo rm -rf /usr/share/dotnet/
231- sudo rm -rf /usr/local/lib/android
232- df -h
233- - name : Setup rust env
234- uses : dtolnay/rust-toolchain@1.84.1
235- - name : Retreive cached dependecies
236- uses : Swatinem/rust-cache@v2
237- - name : add llvm deb repository
238- uses : myci-actions/add-deb-repo@11
239- with :
240- repo : deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main
241- repo-name : llvm-repo
242- keys-asc : https://apt.llvm.org/llvm-snapshot.gpg.key
243- - name : Install LLVM
244- run : sudo apt-get install llvm-19 llvm-19-dev llvm-19-runtime clang-19 clang-tools-19 lld-19 libpolly-19-dev libmlir-19-dev mlir-19-tools
245- - name : Install testing tools
246- uses : taiki-e/install-action@v2
247- with :
248- tool : cargo-nextest,cargo-llvm-cov
249- - name : Install deps
250- run : make deps
251-
252- - name : Run tests and generate coverage partition ${{ matrix.partition }}
253- run : cargo llvm-cov nextest --verbose --lcov --output-path ${{ matrix.output }} --partition count:${{ matrix.partition }}/4
254-
255- - name : test and generate coverage corelib
256- if : ${{ matrix.partition == '1' }}
257- run : cargo llvm-cov run --verbose --lcov --output-path lcov-test.info --package cairo-native-test -- corelib
258-
259- - name : save coverage data with corelib
260- if : ${{ matrix.partition == '1' }}
261- uses : actions/upload-artifact@v4
262- with :
263- name : coverage-data-1
264- path : |
265- ./${{ matrix.output }}
266- ./lcov-test.info
267-
268- - name : save coverage data
269- if : ${{ matrix.partition != '1' }}
270- uses : actions/upload-artifact@v4
271- with :
272- name : coverage-data-${{ matrix.partition }}
273- path : ./${{ matrix.output }}
274-
275- upload-coverage :
276- name : Upload Coverage
277- runs-on : ubuntu-24.04
278- needs : [coverage]
279- steps :
280- - name : Setup rust env
281- uses : dtolnay/rust-toolchain@1.84.1
282- - name : Retreive cached dependencies
283- uses : Swatinem/rust-cache@v2
284- - name : Install testing tools
285- uses : taiki-e/install-action@v2
286- with :
287- tool : cargo-nextest,cargo-llvm-cov
288- - name : Checkout
289- uses : actions/checkout@v4
290- - name : Download artifacts partition 1
291- uses : actions/download-artifact@v4
292- with :
293- name : coverage-data-1
294- - name : Download artifacts partition 2
295- uses : actions/download-artifact@v4
296- with :
297- name : coverage-data-2
298- - name : Download artifacts partition 3
299- uses : actions/download-artifact@v4
300- with :
301- name : coverage-data-3
302- - name : Download artifacts partition 4
303- uses : actions/download-artifact@v4
304- with :
305- name : coverage-data-4
306- - name : Install lcov
307- run : sudo apt-get update && sudo apt-get install -y lcov
308- - name : Merge the reports
309- run : lcov -a lcov-1.info -a lcov-2.info -a lcov-3.info -a lcov-4.info -o lcov.info
310- - name : Upload coverage
311- uses : codecov/codecov-action@v4
312- with :
313- token : ${{ secrets.CODECOV_TOKEN }}
314- files : ./lcov.info,./lcov-test.info
315- fail_ci_if_error : true
316- verbose : true
317-
318192 dockerfile :
319193 name : dockerfile (linux, amd64)
320194 runs-on : ubuntu-24.04
0 commit comments