Skip to content

Commit b1e0094

Browse files
committed
refactor(ci): Move rules workload to job
Make the rules validation first-class citizen of the pull request and master workflows.
1 parent 099900b commit b1e0094

File tree

3 files changed

+29
-40
lines changed

3 files changed

+29
-40
lines changed

.github/workflows/pr.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,3 +217,25 @@ jobs:
217217
export PATH="/c/msys64/mingw64/bin:$PATH"
218218
export PKG_CONFIG_PATH=$(pwd)/pkg-config
219219
./make.bat lint
220+
221+
validate-rules:
222+
runs-on: windows-latest
223+
needs: build
224+
steps:
225+
- name: Checkout
226+
uses: actions/checkout@v4
227+
- name: Download MSI
228+
uses: actions/download-artifact@v4
229+
with:
230+
name: "fibratus-amd64.msi"
231+
path: .
232+
- name: Install MSI
233+
shell: bash
234+
run: |
235+
./make.bat install
236+
- name: Validate rules
237+
shell: bash
238+
run: |
239+
export PATH="/c/Program Files/Fibratus/Bin:$PATH"
240+
fibratus rules list
241+
fibratus rules validate

.github/workflows/rules.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

make.bat

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ robocopy ".\rules" "%RELEASE_DIR%\Rules" /E /S /XF *.md *.png
118118

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

123123
echo Extracting Python distribution...
124124
powershell -Command "Expand-Archive %RELEASE_DIR%\python.zip -DestinationPath %RELEASE_DIR%\python"
@@ -146,9 +146,9 @@ copy %SystemRoot%\System32\dbghelp.dll "%RELEASE_DIR%\Bin"
146146
echo Building MSI package...
147147
pushd .
148148
cd build/msi
149-
wix extension add WixToolset.UI.wixext || exit /b
150-
wix extension add WixToolset.Util.wixext || exit /b
151-
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
149+
wix extension add WixToolset.UI.wixext || goto :fail
150+
wix extension add WixToolset.Util.wixext || goto :fail
151+
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
152152
popd
153153
echo fibratus-%VERSION%-amd64.msi MSI package built successfully
154154

@@ -180,14 +180,12 @@ copy %SystemRoot%\System32\dbghelp.dll "%RELEASE_DIR%\Bin"
180180
echo Building MSI package...
181181
pushd .
182182
cd build/msi
183-
wix extension add WixToolset.UI.wixext || exit /b
184-
wix extension add WixToolset.Util.wixext || exit /b
185-
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
183+
wix extension add WixToolset.UI.wixext || goto :fail
184+
wix extension add WixToolset.Util.wixext || goto :fail
185+
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
186186
popd
187187
echo fibratus-%VERSION%-slim-amd64.msi MSI package built successfully
188188

189-
if errorlevel 1 goto fail
190-
191189
goto :EOF
192190

193191
:clean

0 commit comments

Comments
 (0)