fixing workflows #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: global-checks | |
on: | |
push: | |
branches: [ main, WIP ] | |
pull_request: | |
branches: [ main, WIP ] | |
jobs: | |
build-check-global: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Build Executable | |
run: | | |
python -m nuitka --follow-imports --assume-yes-for-downloads --remove-output --onefile --output-filename=py-shield --windows-icon-from-ico=icon.ico --company-name="ByteCorum" --product-name="Py-Shield" --file-version=1.0.0.0 --product-version=1.0.0.0 --file-description="Program/Library for Python created to protect your code from decompilation and detection by antiviruses" --copyright="https://github.com/ByteCorum/Py-Shield/blob/main/LICENSE" py-sheild.py | |
- name: Archive Executable | |
uses: actions/upload-artifact@v4 | |
with: | |
name: py-shield-executable | |
path: py-shield.exe | |
obfuscation-test-global: | |
needs: build-check-global | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Download Executable | |
uses: actions/download-artifact@v4 | |
with: | |
name: py-shield-executable | |
path: "" | |
- name: Prepare For Tests | |
run: | | |
move "py-shield.exe" "examples/multifile-global" | |
Remove-Item -Path "examples\multifile-global\obfuscated" -Recurse -Force | |
- name: Obfuscate | |
working-directory: examples\multifile-global | |
run: | | |
.\py-sheild.exe --mode "hashstr;crypt;looping;aes" --loops 3 --output obfuscated --follow imports --files lib.py main.py | |
- name: Run Tests | |
working-directory: examples\multifile-global\obfuscated | |
run: | | |
$OUTPUT = $(python main.py) | |
Write-Host "Output: " | |
Write-Host $OUTPUT | |
- name: Check Output" | |
run: | | |
if ($OUTPUT -eq "hello world") { | |
Write-Host "Success: main.py output contains 'hello world'" | |
} else { | |
Write-Host "Failure: main.py output does not contain 'hello world'" | |
exit 1 | |
} |