ci: Add build check.

setup.py
Pierre-Antoine Rouby 2024-02-05 11:14:14 +01:00
parent d541becb1a
commit 16caae9d40
2 changed files with 26 additions and 3 deletions

View File

@ -331,6 +331,7 @@ build-windows:
- mkdir windows
- cd windows
# Setup env
- pip3 install -U pip
- python -m pip install -r ..\requirements.txt
- python -m pip install -U -r ..\requirements.txt
# Run Pyinstaller
@ -404,6 +405,23 @@ windows-package-exe:
- copy ..\packages\pamhyr.nsi pamhyr.nsi
- .\make-windows-exe.bat
build-check-clamav:
stage: antivirus
tags:
- release
- linux
needs:
- job: build-linux
artifacts: true
- job: build-windows
artifacts: true
rules:
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG
script:
- cd packages
- ./clamav-scan.sh builds
allow_failure: true
pkg-check-clamav:
stage: antivirus
tags:
@ -420,7 +438,7 @@ pkg-check-clamav:
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_TAG
script:
- cd packages
- ./clamav-scan.sh
- ./clamav-scan.sh packages
allow_failure: true
###########

View File

@ -1,8 +1,13 @@
#! /bin/bash
set +x
OPTS="-r -a"
OPTS="-r -a -i"
if [ "$1" == "builds" ]; then
FILES="../windows/ ../linux/"
else
FILES="../windows/pamhyr-windows.exe ../windows/pamhyr-windows.zip ../linux/pamhyr-gnulinux.tar.xz"
fi
clamscan $OPTS $FILES | tee clamav.log