-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Github Action for building windows wheels
- Loading branch information
1 parent
c3e2abc
commit 0e636a9
Showing
1 changed file
with
10 additions
and
20 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|