Skip to content

Commit

Permalink
ci: Github Action for building windows wheels
Browse files Browse the repository at this point in the history
  • Loading branch information
MatejKastak committed Jan 10, 2024
1 parent c3e2abc commit 0e636a9
Showing 1 changed file with 10 additions and 20 deletions.
30 changes: 10 additions & 20 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,58 +2,48 @@ name: Build Python Wheels

on:
workflow_dispatch:
# TODO: Remove this trigger
pull_request:

jobs:
builder-windows:
name: Build Yari on Windows

runs-on: windows-latest

defaults:
run:
shell: bash

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

- name: Setup Python
uses: actions/setup-python@v4
- 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 yari-sys
run: cargo build
working-directory: ./yari-sys

- name: Build Python wheels
run: |
pip install maturin
maturin build -f --release --strip
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:
Expand Down

0 comments on commit 0e636a9

Please sign in to comment.