Skip to content

Commit

Permalink
Update build.yaml (#176)
Browse files Browse the repository at this point in the history
* Update build.yaml

* Fix sysinternalsEBPF build

* Fix sysinternalsEBPF build

* Fix sysinternalsEBPF build

* Fix sysinternalsEBPF build
  • Loading branch information
MarioHewardt authored May 30, 2024
1 parent 4f7d1d7 commit 481dbfd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
2 changes: 2 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ stages:
parameters:
srcPath: 'SysinternalsEBPF'
runStaticAnalysis: false
builddir: 'sysinternalsEBPF_build'

- script: |
cd $(Build.SourcesDirectory)/SysinternalsEBPF/sysinternalsEBPF_build
Expand All @@ -57,3 +58,4 @@ stages:
parameters:
srcPath: 'SysmonForLinux'
runStaticAnalysis: true
builddir: 'sysinternalsEBPF_build'
21 changes: 5 additions & 16 deletions templates/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,20 @@ parameters:
- name: runStaticAnalysis
type: boolean
default: False
- name: builddir
type: string
default: 'build'

steps:
- script: |
cd ${{ parameters.srcPath }}
# -------------------------- TEMP DIAG START ----------------------------------------------------
if [ -e "diag_script.sh" ] && [ -e "/root/.dotnet/tools/dotnet-stack" ]; then
echo "Diag script and dotnet-stack found, running in background"
./diag_script.sh&
fi
# -------------------------- TEMP DIAG END ----------------------------------------------------
mkdir sysmon_build && cd sysmon_build
mkdir -p ${{ parameters.srcPath }}/${{ parameters.builddir }} && cd ${{ parameters.srcPath }}/${{ parameters.builddir }}
cmake ..
make
displayName: "Build Sysmon binaries"

- script: |
cd ${{ parameters.srcPath }}
# -------------------------- TEMP DIAG START ----------------------------------------------------
if [ -e "diag_script.sh" ] && [ -e "/root/.dotnet/tools/dotnet-stack" ]; then
echo "Diag script and dotnet-stack found, running in background"
./diag_script.sh&
fi
# -------------------------- TEMP DIAG END ----------------------------------------------------
if [ ${{ parameters.runStaticAnalysis }} == True ]; then
rm -rf sysmon_build && mkdir sysmon_build && cd sysmon_build
rm -rf ${{ parameters.srcPath }}/${{ parameters.builddir }} && mkdir -p ${{ parameters.srcPath }}/${{ parameters.builddir }} && cd ${{ parameters.srcPath }}/${{ parameters.builddir }}
scan-build cmake ..
scan-build -v --status-bugs -o verifier_result --exclude ../test --exclude openssl -disable-checker cplusplus.NewDelete,cplusplus.NewDeleteLeaks make
else
Expand Down

0 comments on commit 481dbfd

Please sign in to comment.