This repository has been archived by the owner on Aug 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add windows test * add new line Signed-off-by: Wenxin Zhang <[email protected]>
- Loading branch information
1 parent
8c846d6
commit b5d5673
Showing
4 changed files
with
81 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
SET conda_env_name=windows_build_ns | ||
SET python_version=3.10 | ||
cd ../../.. | ||
|
||
FOR /F %%i IN ('conda info -e ^| find /c "%conda_env_name%"') do SET CONDA_COUNT=%%i | ||
if %CONDA_COUNT% EQU 0 ( | ||
CALL conda create python=%python_version% -y -n %conda_env_name% | ||
) | ||
|
||
IF %ERRORLEVEL% NEQ 0 ( | ||
echo "Could not create new conda environment." | ||
exit 1 | ||
) | ||
CALL conda activate %conda_env_name% | ||
CALL pip uninstall neural-speed -y | ||
echo "pip list all the components------------->" | ||
CALL pip list | ||
CALL pip install -U pip | ||
echo "Installing requirements for validation scripts..." | ||
CALL pip install -r requirements.txt | ||
echo "pip list all the components------------->" | ||
CALL pip list | ||
echo "------------------------------------------" | ||
IF %ERRORLEVEL% NEQ 0 ( | ||
echo "Could not install requirements." | ||
exit 1 | ||
) | ||
|
||
git submodule update --init --recursive | ||
python setup.py sdist bdist_wheel | ||
IF %ERRORLEVEL% NEQ 0 ( | ||
echo "Could not build binary." | ||
exit 1 | ||
) |
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Windows Binary Test | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
paths: | ||
- ".github/workflows/windows-test.yml" | ||
- "requirements.txt" | ||
- "setup.py" | ||
- "neural_speed/**" | ||
- "bestla/**" | ||
- '!bestla/ut/**' | ||
- '!bestla/xbyak/**' | ||
- '!bestla/xbyak/*.md' | ||
- '!neural_speed/*.md' | ||
|
||
workflow_dispatch: | ||
|
||
# If there is a new commit, the previous jobs will be canceled | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
SCRIPT_PATH: ${{ github.workspace }}\.github\workflows\script | ||
WORKING_DIR: ${{ github.workspace }} | ||
|
||
jobs: | ||
Windows-Binary-Test: | ||
runs-on: 'Windows' | ||
steps: | ||
- name: Checkout out Repo | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: "recursive" | ||
fetch-tags: true | ||
path: "a" | ||
|
||
- name: Binary build | ||
shell: cmd | ||
run: | | ||
SET HTTP_PROXY=${{ vars.HTTP_PROXY_WINDOWS }} | ||
SET HTTPS_PROXY=${{ vars.HTTP_PROXY_WINDOWS }} | ||
cd ${{ github.workspace }}\a\.github\workflows\scripts | ||
prepare_env_with_conda.bat |
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
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