diff --git a/.github/actions/deps/action.yml b/.github/actions/deps/action.yml index c797fbd0bb..d142d79ff6 100644 --- a/.github/actions/deps/action.yml +++ b/.github/actions/deps/action.yml @@ -17,6 +17,11 @@ inputs: options: - gcc - clang + msan-opt: + description: "whether or not to build deps with msan" + required: false + default: 'false' + type: boolean compiler-version: description: 'The compiler version to use' required: true @@ -50,6 +55,14 @@ runs: path: deps-bundle.tar.zst key: deps-sh-${{ runner.os }}-${{ runner.arch }}-${{ inputs.compiler }}-${{ inputs.compiler-version }}-${{ steps.deps-sh-hash.outputs.HASH }} clean-key: deps-sh + + - id: deps-sh-msan-cache + uses: corca-ai/local-cache@v2 + with: + base: "${{ runner.tool_cache }}/cache" + path: deps-bundle-msan.tar.zst + key: deps-sh-${{ runner.os }}-${{ runner.arch }}-${{ inputs.compiler }}-${{ inputs.compiler-version }}-${{ steps.deps-sh-hash.outputs.HASH }}-MSAN + clean-key: deps-sh - name: Install system level dependencies shell: bash @@ -60,6 +73,11 @@ runs: run: tar -Izstd -xvf deps-bundle.tar.zst if: steps.deps-sh-cache.outputs.cache-hit == 'true' + - name: Install MSAN dependencies from cache + shell: bash + run: tar -Izstd -xvf deps-bundle-msan.tar.zst + if: steps.deps-sh-msan-cache.outputs.cache-hit == 'true' && ${{ inputs.msan-opt }} + - name: Install dependencies from scratch shell: bash run: | @@ -72,3 +90,19 @@ runs: '${{ inputs.deps-script-path }}' +dev fetch install '${{ inputs.deps-bundle-path }}' if: steps.deps-sh-cache.outputs.cache-hit != 'true' + + - name: Install MSAN dependencies from scratch + shell: bash + env: + MSAN: 1 + run: | + if [[ "${{ inputs.compiler-version }}" != "system" ]]; then + source /opt/${{ inputs.compiler }}/${{ inputs.compiler }}-${{ inputs.compiler-version }}/activate + fi + CC='${{ inputs.compiler }}' \ + CXX='${{ inputs.compiler == 'gcc' && 'g++' || 'clang++' }}' \ + FD_AUTO_INSTALL_PACKAGES=1 \ + '${{ inputs.deps-script-path }}' +dev +msan fetch install + '${{ inputs.deps-bundle-path }}' + if: steps.deps-sh-msan-cache.outputs.cache-hit == 'true' && ${{ inputs.msan-opt }} + diff --git a/.github/workflows/clusterfuzz.yml b/.github/workflows/clusterfuzz.yml index 777ef18e11..b61c34eb5c 100644 --- a/.github/workflows/clusterfuzz.yml +++ b/.github/workflows/clusterfuzz.yml @@ -34,7 +34,10 @@ jobs: submodules: recursive - uses: ./.github/actions/hugepages - - uses: ./.github/actions/deps + - uses: ./.github/actions/deps # "regular" non-msan dependencies (./opt) + - uses: ./.github/actions/deps # build deps with msan (./opt-msan) + with: + msan-opt: true - run: sudo apt update && sudo apt install -y zip