-
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.
Merge pull request #73 from avast/github-action-to-build-win-wheels
ci: Github Action for building windows wheels
- Loading branch information
Showing
1 changed file
with
7 additions
and
19 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 |
---|---|---|
|
@@ -5,55 +5,43 @@ on: | |
|
||
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 | ||
working-directory: ./yari-py | ||
run: | | ||
pip install --upgrade pip | ||
python -m venv env | ||
. env/Scripts/activate | ||
pip install maturin | ||
maturin build -f --release --strip | ||
working-directory: ./yari-py | ||
|
||
maturin build --find-interpreter --release --strip | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
|