fix dependencies in docs build (#1236) #1303
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: horovod | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
check-changes: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install GitPython | |
pip install . --no-deps | |
- name: Get changed backends | |
id: backend_check | |
run: | | |
echo "changed=$(python ci/get_changed_backends.py --backend tensorflow --branch ${{github.base_ref}})" >> "$GITHUB_OUTPUT" | |
outputs: | |
needs_testing: ${{ steps.backend_check.outputs.changed }} | |
tests: | |
needs: check-changes | |
if: ${{needs.check-changes.outputs.needs_testing == 'true' || github.ref == 'refs/heads/main'}} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python-version: [3.8] | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Ubuntu packages | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y protobuf-compiler | |
- name: Install conda | |
run: | | |
mkdir -p /tmp/miniconda | |
wget https://repo.anaconda.com/miniconda/Miniconda3-py38_22.11.1-1-Linux-x86_64.sh -O /tmp/miniconda/miniconda.sh | |
bash /tmp/miniconda/miniconda.sh -b -u -p /tmp/miniconda | |
/tmp/miniconda/bin/conda init bash | |
echo "/tmp/miniconda/bin" >> "$GITHUB_PATH" | |
- name: Install and upgrade python packages | |
run: | | |
python -m pip install --upgrade pip setuptools==59.4.0 wheel tox | |
- name: Install tox-conda | |
run: | | |
python -m pip install tox-conda | |
- name: Get Merlin Branch name | |
id: get-branch-name | |
uses: NVIDIA-Merlin/.github/actions/branch-name@main | |
- name: Run tests | |
run: | | |
merlin_branch="${{ steps.get-branch-name.outputs.branch }}" | |
if [[ "${{ github.ref }}" != 'refs/heads/main' ]]; then | |
extra_pytest_markers="and changed" | |
fi | |
PYTEST_MARKERS="$extra_pytest_markers" MERLIN_BRANCH="$merlin_branch" COMPARE_BRANCH=${{ github.base_ref }} tox -e horovod-cpu |