Skip to content

Resolved leftover todos, ready for a second round of feedback #2831

Resolved leftover todos, ready for a second round of feedback

Resolved leftover todos, ready for a second round of feedback #2831

Workflow file for this run

name: CI
on: push
env:
up_tamer_commit: "7912ef322348b9c4c0928f9c4fe12c5b0fca2e6f"
up_pyperplan_commit: "71e0c1fe65f9564f04912168ee26699eff144095"
up_fast_downward_commit: "7ccd86de2ce8992a2bc720b1a4b43002b6e1230b"
up_fmap_commit: "ad3a878eb049749cdf3ff2ce7d44014dfc4c4424"
jobs:
basic-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install Python dependencies
run: python3 -m pip install -r requirements.txt
- name: Install Development Python dependencies
run: python3 -m pip install -r dev-requirements.txt
- name: Install tarski
run: |
python3 -m pip install tarski[arithmetic]
sudo apt install -y gringo
- name: Black check
run: |
python3 -m pip install black==22.6.0
python3 -m black --check --exclude=unified_planning/grpc/generated/ .
- name: MyPy check
run: python3 -m mypy unified_planning
- name: Test all packages imports
run: python3 scripts/test_imports.py
check-documentation:
runs-on: ubuntu-latest
needs: [
basic-check,
check-protobuf,
]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install pandoc
run: |
sudo apt-get update
sudo apt-get install -y pandoc
- name: Install python requirements
run: |
pip install --upgrade pip
pip install .
pip install -r docs/requirements.txt
- name: Listing dependency versions
run: pip freeze
- name: Building docs
run: make html
working-directory: ./docs
run-tests-ubuntu-20-04:
runs-on: ubuntu-20.04
needs: [
basic-check,
check-protobuf,
]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install pyparsing version used in ROS1
run: python3 -m pip install pyparsing==2.4.6
- name: Install Python dependencies
run: python3 -m pip install -r requirements.txt
- name: Install Development Python dependencies
run: python3 -m pip install -r dev-requirements.txt
- name: Checkout up-tamer
uses: actions/checkout@v2
with:
repository: aiplan4eu/up-tamer
path: up-tamer
ref: ${{env.up_tamer_commit}}
- name: Install up-tamer
run: python3 -m pip install up-tamer/
- name: Checkout up-pyperplan
uses: actions/checkout@v2
with:
repository: aiplan4eu/up-pyperplan
path: up-pyperplan
ref: ${{env.up_pyperplan_commit}}
- name: Install up-pyperplan
run: python3 -m pip install up-pyperplan/
- name: Setup java for ENHSP
uses: actions/setup-java@v2
with:
distribution: "microsoft"
java-version: "17"
- name: Download and install ENHSP
run: |
git clone https://gitlab.com/enricos83/ENHSP-Public.git
cd ENHSP-Public; git checkout enhsp20-0.9.7; ./compile; cd ..
mkdir .planners; mv ENHSP-Public/enhsp-dist .planners/enhsp-20; rm -rf ENHSP-Public
- name: Run tests
run: bash run_tests.sh
run-tests-ubuntu:
runs-on: ubuntu-latest
needs: [
basic-check,
check-protobuf,
]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install Python dependencies
run: python3 -m pip install -r requirements.txt
- name: Install Development Python dependencies
run: python3 -m pip install -r dev-requirements.txt
- name: Install tarski
run: |
python3 -m pip install tarski[arithmetic]
sudo apt install -y gringo
- name: Checkout up-tamer
uses: actions/checkout@v2
with:
repository: aiplan4eu/up-tamer
path: up-tamer
ref: ${{env.up_tamer_commit}}
- name: Install up-tamer
run: python3 -m pip install up-tamer/
- name: Checkout up-pyperplan
uses: actions/checkout@v2
with:
repository: aiplan4eu/up-pyperplan
path: up-pyperplan
ref: ${{env.up_pyperplan_commit}}
- name: Install up-pyperplan
run: python3 -m pip install up-pyperplan/
- name: Setup java for ENHSP
uses: actions/setup-java@v2
with:
distribution: "microsoft"
java-version: "17"
- name: Download and install ENHSP
run: |
git clone https://gitlab.com/enricos83/ENHSP-Public.git
cd ENHSP-Public; git checkout enhsp20-0.9.7; ./compile; cd ..
mkdir .planners; mv ENHSP-Public/enhsp-dist .planners/enhsp-20; rm -rf ENHSP-Public
- name: Test code-snippets
run: bash scripts/test_code_snippets.sh
- name: Run tests
run: bash run_tests.sh
- name: "Upload coverage to Codecov"
if: ${{ github.repository == 'aiplan4eu/unified-planning' }}
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
fail_ci_if_error: true
run-tests-windows:
runs-on: windows-latest
needs: [
basic-check,
check-protobuf,
]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install Python dependencies
run: python3 -m pip install -r requirements.txt
- name: Install Development Python dependencies
run: python3 -m pip install -r dev-requirements.txt
- name: Checkout up-tamer
uses: actions/checkout@v2
with:
repository: aiplan4eu/up-tamer
path: up-tamer
ref: ${{env.up_tamer_commit}}
- name: Install up-tamer
run: python3 -m pip install up-tamer/
- name: Checkout up-pyperplan
uses: actions/checkout@v2
with:
repository: aiplan4eu/up-pyperplan
path: up-pyperplan
ref: ${{env.up_pyperplan_commit}}
- name: Install up-pyperplan
run: python3 -m pip install up-pyperplan/
- name: Setup java for ENHSP
uses: actions/setup-java@v2
with:
distribution: "microsoft"
java-version: "17"
- name: Download and install ENHSP
run: |
git clone https://gitlab.com/enricos83/ENHSP-Public.git
cd ENHSP-Public; git checkout enhsp20-0.9.7; bash ./compile; cd ..
bash -c "mkdir .planners; mv ENHSP-Public/enhsp-dist .planners/enhsp-20; rm -rf ENHSP-Public"
- name: Run tests
run: bash run_tests.sh
run-tests-macos:
runs-on: macos-latest
needs: [
basic-check,
check-protobuf,
]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install Python dependencies
run: python3 -m pip install -r requirements.txt
- name: Install Development Python dependencies
run: python3 -m pip install -r dev-requirements.txt
- name: Install tarski
run: |
python3 -m pip install tarski[arithmetic]
# brew install gringo -- Commented because not working on github actions
- name: Checkout up-tamer
uses: actions/checkout@v2
with:
repository: aiplan4eu/up-tamer
path: up-tamer
ref: ${{env.up_tamer_commit}}
- name: Install up-tamer
run: python3 -m pip install up-tamer/
- name: Checkout up-pyperplan
uses: actions/checkout@v2
with:
repository: aiplan4eu/up-pyperplan
path: up-pyperplan
ref: ${{env.up_pyperplan_commit}}
- name: Install up-pyperplan
run: python3 -m pip install up-pyperplan/
- name: Setup java for ENHSP
uses: actions/setup-java@v2
with:
distribution: "microsoft"
java-version: "17"
- name: Download and install ENHSP
run: |
git clone https://gitlab.com/enricos83/ENHSP-Public.git
cd ENHSP-Public; git checkout enhsp20-0.9.7; bash ./compile; cd ..
bash -c "mkdir .planners; mv ENHSP-Public/enhsp-dist .planners/enhsp-20; rm -rf ENHSP-Public"
- name: Run tests
run: bash run_tests.sh
check-protobuf:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install Protobuf compiler
run: |
python3 -m pip install grpcio-tools==1.48.1
- name: Check Protobuf generation
run: bash scripts/generate_protobuf_bindings.sh
- name: Check Protobuf bindings
run: |
echo "Checking that the committed protobuf bindings are exactly the one generated from the declaration"
git diff --exit-code
run-colab-notebooks:
runs-on: ubuntu-latest
needs: [
basic-check,
check-protobuf,
]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Python dependencies
run: python3 -m pip install -r requirements.txt
- name: Install Development Python dependencies
run: python3 -m pip install -r dev-requirements.txt
- name: Checkout up-tamer
uses: actions/checkout@v2
with:
repository: aiplan4eu/up-tamer
path: up-tamer
ref: ${{env.up_tamer_commit}}
- name: Install up-tamer
run: python3 -m pip install up-tamer/
- name: Checkout up-pyperplan
uses: actions/checkout@v2
with:
repository: aiplan4eu/up-pyperplan
path: up-pyperplan
ref: ${{env.up_pyperplan_commit}}
- name: Install up-pyperplan
run: python3 -m pip install up-pyperplan/
- name: Checkout up-fast-downward
uses: actions/checkout@v2
with:
repository: aiplan4eu/up-fast-downward
path: up-fast-downward
ref: ${{env.up_fast_downward_commit}}
- name: Install up-fast-downward
run: python3 -m pip install up-fast-downward/
- name: Install up-aries
run: pip3 install up-aries
- name: Checkout up-fmap
uses: actions/checkout@v2
with:
repository: aiplan4eu/up-fmap
path: up-fmap
ref: ${{env.up_fmap_commit}}
- name: Install up-fmap
run: python3 -m pip install up-fmap/
- name: Install jupyter and ipython3
run: sudo apt install jupyter; sudo apt install ipython3
- name: Run colabs
run: bash scripts/test_colab.sh
deploy-pypi:
runs-on: ubuntu-latest
needs: [
basic-check,
run-tests-ubuntu,
run-tests-ubuntu-20-04,
run-tests-windows,
run-tests-macos,
check-protobuf,
run-colab-notebooks,
check-documentation,
] # We only deploy if the tests were successful
if: github.ref == 'refs/heads/master' # We only deploy on master commits
steps:
- name: Checkout repo
uses: actions/checkout@master
with:
fetch-depth: 0
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Make distrib
run: |
python3 -m pip install wheel
bash scripts/make_distrib.sh
- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}