Skip to content

Commit

Permalink
plumb
Browse files Browse the repository at this point in the history
  • Loading branch information
nlgripto committed Oct 11, 2024
1 parent 8dbcc2c commit 5b12938
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
34 changes: 34 additions & 0 deletions .github/actions/deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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: |
Expand All @@ -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 }}

5 changes: 4 additions & 1 deletion .github/workflows/clusterfuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 5b12938

Please sign in to comment.