Skip to content

Fix dependabot issues #1

Fix dependabot issues

Fix dependabot issues #1

name: Nano Unit Tests Basic
# Cancel previous runs in the PR when you push new commits
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
paths:
- 'python/nano/**'
- '.github/workflows/nano_unit_tests_basic.yml'
pull_request:
branches: [ main ]
paths:
- 'python/nano/**'
- '.github/workflows/nano_unit_tests_basic.yml'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
nano-unit-test-basic:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-20.04"]
python-version: ["3.8"]
steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools==58.0.4
python -m pip install --upgrade wheel
- name: Run Nano-init test
shell: bash
run: |
$CONDA/bin/conda create -n bigdl-init -y python==3.8.16 setuptools==58.0.4
source $CONDA/bin/activate bigdl-init
$CONDA/bin/conda info
bash python/nano/dev/build_and_install.sh linux default false basic
source bigdl-nano-init
if [ 0"$LD_PRELOAD" = "0" ]; then
exit 1
else
echo "Set environment variable successfully."
fi
source $CONDA/bin/deactivate
if [ ! 0"$LD_PRELOAD" = "0" ]; then
exit 1
else
echo "Unset environment variable successfully while deactivating conda environment."
fi
source $CONDA/bin/activate bigdl-init
if [ 0"$LD_PRELOAD" = "0" ]; then
exit 1
else
echo "Setup environment variable successfully while activating conda environment."
fi
pip uninstall -y bigdl-nano
source $CONDA/bin/deactivate
$CONDA/bin/conda remove -n bigdl-init --all
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}
- name: Run Basic unit tests (OpenVINO)
shell: bash
run: |
$CONDA/bin/conda create -n openvino-basic -y python==3.8.16 setuptools=58.0.4
source $CONDA/bin/activate openvino-basic
$CONDA/bin/conda info
bash python/nano/dev/build_and_install.sh linux default false basic
pip install pytest openvino-dev==2022.3.0
source bigdl-nano-init
bash python/nano/test/run-nano-basic-openvino-tests.sh
source $CONDA/bin/deactivate
$CONDA/bin/conda remove -n openvino-basic --all
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}