[Fix OpenSSF Pinned-Dependencies Issues]: GitHub-owned GitHubAction actions/checkout not pinned by hash #27
Workflow file for this run
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
name: Chronos Tests for How-to Guides Spark3.1 py38 py39 | |
# 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 pull request events but only for the main branch | |
pull_request: | |
branches: [ main ] | |
paths: | |
- 'python/chronos/colab-notebook/howto/**' | |
- 'python/chronos/benchmark/**' | |
- '.github/workflows/chronos-howto-guides-python-spark31.yml' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
chronos-howto-guides-test: | |
runs-on: [ self-hosted, Gondolin, ubuntu-20.04-lts ] | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9"] | |
steps: | |
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # actions/checkout@v2 | |
- name: Set up JDK 8 | |
uses: ./.github/actions/jdk-setup-action | |
- name: Set up Maven | |
uses: ./.github/actions/maven-setup-action | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Run tests for Chronos How-to Guides | |
shell: bash | |
run: | | |
conda remove -n chronos-howto-env -y --all | |
conda create -n chronos-howto-env -y python=${{matrix.python-version}} setuptools=58.0.4 -c ${GONDOLIN_CONDA_CHANNEL} --override-channels | |
conda info -e | |
source activate chronos-howto-env | |
pip install nbmake ipykernel==5.5.6 | |
apt-get update | |
apt-get install -y libgl1 | |
pip uninstall -y bigdl-friesian bigdl-friesian-spark3 bigdl-dllib bigdl-dllib-spark3 bigdl-orca pyspark bigdl-orca-spark3 bigdl-chronos bigdl-chronos-spark3 bigdl-nano bigdl-friesian bigdl-friesian-spark3 | |
sed -i "s/pyspark==2.4.6/pyspark==3.1.3/g" python/dllib/src/setup.py | |
wget https://raw.githubusercontent.com/analytics-zoo/gha-cicd-env/main/python-requirements/requirements-chronos-python-ut.txt -O ${{ github.workspace }}/requirements-chronos-python-ut.txt | |
pip install -i ${GONDOLIN_PIP_MIRROR} --trusted-host ${GONDOLIN_TRUSTED_HOST} -r ${{ github.workspace }}/requirements-chronos-python-ut.txt | |
bash python/dev/release_default_linux_spark3.sh default false false | |
bash python/nano/dev/build_and_install.sh linux default false pytorch --force-reinstall --no-deps -U | |
whl_name=`ls python/nano/dist/` | |
pip install -i https://pypi.python.org/simple python/nano/dist/${whl_name}[pytorch,inference] | |
pip install -i https://pypi.python.org/simple intel-tensorflow==2.7.0 tf2onnx==1.13.0 tensorflow==2.7.0 | |
pip install -i https://pypi.python.org/simple python/dllib/src/dist/bigdl_dllib_*-py3-none-manylinux1_x86_64.whl | |
pip install -i https://pypi.python.org/simple python/orca/src/dist/bigdl_orca_*-py3-none-manylinux1_x86_64.whl | |
pip install -i https://pypi.python.org/simple python/chronos/src/dist/bigdl_chronos_*-py3-none-manylinux1_x86_64.whl | |
export SPARK_LOCAL_HOSTNAME=localhost | |
export KERAS_BACKEND=tensorflow | |
bash python/chronos/dev/test/run-pytests-howto-guides.sh | |
source deactivate | |
conda remove -n chronos-howto-env --all | |
env: | |
BIGDL_ROOT: ${{ github.workspace }} | |
ANALYTICS_ZOO_ROOT: ${{ github.workspace }} | |
- name: Remove Chronos Env | |
if: ${{ always() }} | |
shell: bash | |
run: | | |
conda remove -n chronos-howto-env -y --all | |
chronos-benchmark-tool-test: | |
runs-on: [ self-hosted, Gondolin, ubuntu-20.04-lts ] | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9"] | |
steps: | |
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # actions/checkout@v2 | |
- name: Set up JDK 8 | |
uses: ./.github/actions/jdk-setup-action | |
- name: Set up Maven | |
uses: ./.github/actions/maven-setup-action | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Run tests for Chronos-benchmark-tool | |
shell: bash | |
run: | | |
conda remove -n chronos-benchmark-tool-env -y --all | |
conda create -n chronos-benchmark-tool-env -y python=${{matrix.python-version}} setuptools==58.0.4 -c ${GONDOLIN_CONDA_CHANNEL} --override-channels | |
source activate chronos-benchmark-tool-env | |
apt-get update | |
apt-get install patchelf | |
pip uninstall -y bigdl-friesian bigdl-friesian-spark3 bigdl-dllib bigdl-dllib-spark3 bigdl-orca pyspark bigdl-orca-spark3 bigdl-chronos bigdl-chronos-spark3 bigdl-nano bigdl-friesian bigdl-friesian-spark3 | |
wget https://raw.githubusercontent.com/analytics-zoo/gha-cicd-env/main/python-requirements/requirements-chronos-python-ut.txt -O ${{ github.workspace }}/requirements-chronos-python-ut.txt | |
sed -i "s/pyspark==2.4.6/pyspark==3.1.3/g" python/dllib/src/setup.py | |
bash python/dev/release_default_linux_spark3.sh default false false | |
bash python/nano/dev/build_and_install.sh linux default false pytorch --force-reinstall --no-deps -U | |
whl_name=`ls python/nano/dist/` | |
pip install -i https://pypi.python.org/simple python/nano/dist/${whl_name}[pytorch,inference] | |
pip install -i https://pypi.python.org/simple intel-tensorflow==2.7.0 tf2onnx==1.13.0 tensorflow==2.7.0 | |
pip install -i https://pypi.python.org/simple python/dllib/src/dist/bigdl_dllib_*-py3-none-manylinux1_x86_64.whl | |
pip install -i https://pypi.python.org/simple python/orca/src/dist/bigdl_orca_*-py3-none-manylinux1_x86_64.whl | |
pip install -i https://pypi.python.org/simple python/chronos/src/dist/bigdl_chronos_*-py3-none-manylinux1_x86_64.whl | |
export SPARK_LOCAL_HOSTNAME=localhost | |
export KERAS_BACKEND=tensorflow | |
bash python/chronos/dev/test/run-benchmark-tool.sh | |
source deactivate | |
conda remove -n chronos-benchmark-tool-env -y --all | |
env: | |
BIGDL_ROOT: ${{ github.workspace }} | |
ANALYTICS_ZOO_ROOT: ${{ github.workspace }} | |
- name: Remove Chronos Env | |
if: ${{ always() }} | |
shell: bash | |
run: | | |
conda remove -n chronos-benchmark-tool-env -y --all | |