Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(ci): Move rules workload to job #442

Merged
merged 2 commits into from
Feb 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,3 +235,25 @@ jobs:
export PATH="/c/msys64/mingw64/bin:$PATH"
export PKG_CONFIG_PATH=$(pwd)/pkg-config
./make.bat lint

validate-rules:
runs-on: windows-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download MSI
uses: actions/download-artifact@v4
with:
name: "fibratus-amd64.msi"
path: .
- name: Install MSI
shell: bash
run: |
./make.bat install
- name: Validate
shell: bash
run: |
export PATH="/c/Program Files/Fibratus/Bin:$PATH"
fibratus rules list
fibratus rules validate
22 changes: 22 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,3 +217,25 @@ jobs:
export PATH="/c/msys64/mingw64/bin:$PATH"
export PKG_CONFIG_PATH=$(pwd)/pkg-config
./make.bat lint

validate-rules:
runs-on: windows-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download MSI
uses: actions/download-artifact@v4
with:
name: "fibratus-amd64.msi"
path: .
- name: Install MSI
shell: bash
run: |
./make.bat install
- name: Validate
shell: bash
run: |
export PATH="/c/Program Files/Fibratus/Bin:$PATH"
fibratus rules list
fibratus rules validate
31 changes: 0 additions & 31 deletions .github/workflows/rules.yml

This file was deleted.

18 changes: 9 additions & 9 deletions make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ SetLocal EnableDelayedExpansion
set PYTHON_VER=3.7.9
set PYTHON_URL=https://www.python.org/ftp/python/%PYTHON_VER%/python-%PYTHON_VER%-embed-amd64.zip

set WIX_VERSION=5.0.0

set GOBIN=%USERPROFILE%\go\bin

set GOTEST=go test -timeout=10m -v -gcflags=all=-d=checkptr=0
Expand Down Expand Up @@ -118,7 +120,7 @@ robocopy ".\rules" "%RELEASE_DIR%\Rules" /E /S /XF *.md *.png

:: Download the embedded Python distribution
echo Downloading Python %PYTHON_VER%...
powershell -Command "Invoke-WebRequest %PYTHON_URL% -OutFile %RELEASE_DIR%\python.zip"
powershell -Command "Invoke-WebRequest %PYTHON_URL% -OutFile %RELEASE_DIR%\python.zip" || goto :fail

echo Extracting Python distribution...
powershell -Command "Expand-Archive %RELEASE_DIR%\python.zip -DestinationPath %RELEASE_DIR%\python"
Expand Down Expand Up @@ -146,9 +148,9 @@ copy %SystemRoot%\System32\dbghelp.dll "%RELEASE_DIR%\Bin"
echo Building MSI package...
pushd .
cd build/msi
wix extension add WixToolset.UI.wixext || exit /b
wix extension add WixToolset.Util.wixext || exit /b
wix build -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -b dir=fibratus-%VERSION% fibratus.wxs -arch x64 -d VERSION=%VERSION% -o fibratus-%VERSION%-amd64.msi || exit /b
wix extension add WixToolset.UI.wixext/%WIX_VERSION% || goto :fail
wix extension add WixToolset.Util.wixext/%WIX_VERSION% || goto :fail
wix build -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -b dir=fibratus-%VERSION% fibratus.wxs -arch x64 -d VERSION=%VERSION% -o fibratus-%VERSION%-amd64.msi || goto :fail
popd
echo fibratus-%VERSION%-amd64.msi MSI package built successfully

Expand Down Expand Up @@ -180,14 +182,12 @@ copy %SystemRoot%\System32\dbghelp.dll "%RELEASE_DIR%\Bin"
echo Building MSI package...
pushd .
cd build/msi
wix extension add WixToolset.UI.wixext || exit /b
wix extension add WixToolset.Util.wixext || exit /b
wix build -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -b dir=fibratus-%VERSION%-slim fibratus.wxs -arch x64 -d VERSION=%VERSION% -o fibratus-%VERSION%-slim-amd64.msi || exit /b
wix extension add WixToolset.UI.wixext/%WIX_VERSION% || goto :fail
wix extension add WixToolset.Util.wixext/%WIX_VERSION% || goto :fail
wix build -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -b dir=fibratus-%VERSION%-slim fibratus.wxs -arch x64 -d VERSION=%VERSION% -o fibratus-%VERSION%-slim-amd64.msi || goto :fail
popd
echo fibratus-%VERSION%-slim-amd64.msi MSI package built successfully

if errorlevel 1 goto fail

goto :EOF

:clean
Expand Down
Loading