|
91 | 91 | if: ${{ inputs.tools }} |
92 | 92 | with: |
93 | 93 | tool: ${{ inputs.tools }} |
94 | | - |
95 | | - # Cache valgrind and all its dependencies (20MB valgrind + 12MB dependencies) |
96 | | - - name: Save and restore Valgrind cache on main |
97 | | - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # 4.3.0 |
98 | | - id: cache-valgrind |
99 | | - if: ${{ runner.os == 'Linux' && contains(inputs.tools, 'cargo-codspeed') && github.ref_name == 'main' }} |
100 | | - with: |
101 | | - path: ~/valgrind-cache |
102 | | - key: valgrind-3.25.1-codspeed-ubuntu-24.04-v1 |
103 | | - |
104 | | - - name: Restore Valgrind cache on PR |
105 | | - uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # 4.3.0 |
106 | | - id: cache-valgrind-restore |
107 | | - if: ${{ runner.os == 'Linux' && contains(inputs.tools, 'cargo-codspeed') && github.ref_name != 'main' }} |
108 | | - with: |
109 | | - path: ~/valgrind-cache |
110 | | - key: valgrind-3.25.1-codspeed-ubuntu-24.04-v1 |
111 | | - |
112 | | - - name: Download Valgrind and dependencies |
113 | | - if: ${{ runner.os == 'Linux' && contains(inputs.tools, 'cargo-codspeed') && steps.cache-valgrind.outputs.cache-hit != 'true' && steps.cache-valgrind-restore.outputs.cache-hit != 'true' }} |
114 | | - shell: bash |
115 | | - run: | |
116 | | - mkdir -p ~/valgrind-cache |
117 | | - cd ~/valgrind-cache |
118 | | - curl -L https://github.com/CodSpeedHQ/valgrind-codspeed/releases/download/3.25.1-3codspeed2/valgrind_3.25.1-3codspeed2_ubuntu-24.04_amd64.deb -o valgrind-codspeed.deb |
119 | | - apt-get download gdb libbabeltrace1 libc6-dbg libdebuginfod-common libdebuginfod1t64 libipt2 libsource-highlight-common libsource-highlight4t64 |
120 | | -
|
121 | | - # `cargo codspeed run` takes 1-2 minutes to run `cargo-codspeed` |
122 | | - - name: Install Valgrind |
123 | | - if: ${{ runner.os == 'Linux' && contains(inputs.tools, 'cargo-codspeed') }} |
124 | | - shell: bash |
125 | | - run: | |
126 | | - # Disable man-db update (takes 80 seconds) |
127 | | - # Skip installing pacakge docs {makes the man-db trigger much faster) |
128 | | - # <https://github.com/actions/runner-images/issues/10977#issuecomment-2810713336> |
129 | | - sudo tee /etc/dpkg/dpkg.cfg.d/01_nodoc > /dev/null << 'EOF' |
130 | | - path-exclude /usr/share/doc/* |
131 | | - path-exclude /usr/share/man/* |
132 | | - path-exclude /usr/share/info/* |
133 | | - EOF |
134 | | - sudo DEBIAN_FRONTEND=noninteractive dpkg -i ~/valgrind-cache/*.deb |
0 commit comments