ci: Github Action for building windows wheels #4
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: Build Python Wheels | |
on: | |
workflow_dispatch: | |
# TODO: Remove this trigger | |
pull_request: | |
jobs: | |
builder-windows: | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: | | |
3.8 | |
3.9 | |
3.10 | |
3.11 | |
3.12 | |
- name: Setup Nuget.exe | |
uses: nuget/setup-nuget@v1 | |
with: | |
nuget-version: 'latest' | |
- name: Setup msbuild | |
uses: microsoft/[email protected] | |
- name: Install YARA Dependencies | |
run: nuget.exe restore windows/vs2017/yara.sln | |
working-directory: ./yari-sys/yara | |
- name: Build YARA | |
run: msbuild /m /p:Platform=x64 /p:Configuration=Release /p:PlatformToolset="v142" /p:WindowsTargetPlatformVersion="10.0.19041.0" windows/vs2017/yara.sln | |
working-directory: ./yari-sys/yara | |
shell: cmd | |
- name: Build Python wheels | |
working-directory: ./yari-py | |
run: | | |
pip install --upgrade pip | |
python -m venv env | |
. env/Scripts/activate | |
pip install maturin pytest | |
maturin build --find-interpreter --release --strip | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Windows python wheels | |
path: target/wheels/*.whl |