fix(ape): enforce horizon to be placed after all effects/actions. #942
This file contains hidden or 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: Aries | |
| on: push | |
| env: | |
| CARGO_TERM_COLOR: always | |
| MZN_SOLVER_PATH: ${{github.workspace}}/aries/aries_fzn/share | |
| jobs: | |
| unit-tests: | |
| name: Unit tests | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - run: cargo test | |
| - name: Test with i64 int type | |
| run: cargo test --features aries/i64 | |
| - name: Test with i128 int type | |
| run: cargo test --features aries/i128 | |
| lints: | |
| name: Rustfmt and Clippy | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - uses: dtolnay/rust-toolchain@1.90 # fixed version to avoid failures on rust version releases | |
| with: | |
| components: clippy, rustfmt | |
| - run: cargo fmt --all -- --check | |
| - run: cargo clippy -- -D warnings | |
| integration-tests: | |
| name: Solving | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Install GNU parallel | |
| run: sudo apt-get update && sudo apt-get install parallel | |
| - name: Get problems from LFS | |
| run: git lfs pull | |
| - name: SAT solving | |
| run: ./ci/sat.py debug | |
| - name: Scheduler testing | |
| run: ./ci/scheduling.py | |
| - name: GG solving | |
| run: ./ci/gg.py | |
| - name: PDDL Solving (PDDL & HDDL) | |
| run: ./ci/pddl.sh | |
| minizinc-tests: | |
| name: Minizinc tests | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Initial checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| path: aries | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install Python 3.10 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.10" | |
| - name: Install Minizinc | |
| run: | | |
| sudo snap install minizinc --classic | |
| minizinc --version | |
| minizinc --solvers | |
| printenv MZN_SOLVER_PATH | |
| - name: Checkout mzn-problems | |
| uses: actions/checkout@v3 | |
| with: | |
| repository: plaans/mzn-problems | |
| ref: v4 | |
| path: mzn-problems | |
| - name: Compile aries_fzn (optimized + debug) | |
| run: | | |
| cd aries | |
| cargo build --profile ci --bin aries_fzn | |
| cp target/ci/aries_fzn aries_fzn/share/ | |
| - name: Run mznb | |
| run: | | |
| cd mzn-problems | |
| python mznb.py test --timeout 5 -r problems | |
| unified-planning-api: | |
| name: Unified Planning API | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Check for new protobuf definitions | |
| run: | | |
| # Download the latest protobuf definitions | |
| printf "Checking for new protobuf definitions...\n" | |
| git submodule update --init # get our own copy of unified-planning library | |
| cd planning | |
| rm grpc/api/src/unified_planning.proto | |
| cp unified/deps/unified-planning/unified_planning/grpc/unified_planning.proto grpc/api/src/ | |
| git diff --exit-code | |
| - name: Install Protobuf | |
| run: sudo apt-get update && sudo apt-get install -y libprotobuf-dev protobuf-compiler | |
| - name: Check if generated bindings are up to date | |
| run: | | |
| printf "Checking if the API is up to date...\n" | |
| cd planning/grpc/api | |
| cargo build --features=generate_bindings | |
| cd ../../.. | |
| git diff --exit-code | |
| unified-planning-integration: | |
| name: UP Integration Tests | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: extractions/setup-just@v3 | |
| - name: Submodules initialization | |
| run: git submodule update --init # get our own copy of unified-planing repos | |
| - name: Install python dependencies | |
| run: python3 -m pip install -r planning/unified/requirements.txt "numpy<2" | |
| - name: Solver tests | |
| run: just ci-up-solve | |
| - name: Validator tests | |
| run: just ci-up-val | |
| ipc-tests: | |
| name: IPC Tests | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: extractions/setup-just@v3 | |
| - name: Submodules initialization | |
| run: git submodule update --init # get our own copy of unified-planing repos | |
| - name: Install python dependencies | |
| run: python3 -m pip install -r planning/unified/requirements.txt "numpy<2" | |
| - name: Resolution | |
| run: just ci-ipc | |
| warm-up-tests: | |
| name: Warm-up tests | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: extractions/setup-just@v3 | |
| - name: Submodules initialization | |
| run: git submodule update --init # get our own copy of unified-planing repos | |
| - name: Install python dependencies | |
| run: python3 -m pip install -r planning/unified/requirements.txt "numpy<2" | |
| - name: Resolution | |
| run: just ci-warm-up | |
| pddl-tests: | |
| name: PDDL tests | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: extractions/setup-just@v3 | |
| - name: Download PDDL problems | |
| run: ./planning/ext/init.sh | |
| - name: PDDL Parsing all IPC problems | |
| run: just ci-pddl-parse-all | |
| tests: # Meta-job that only requires all test-jobs to pass | |
| needs: | |
| [ | |
| lints, | |
| unit-tests, | |
| integration-tests, | |
| minizinc-tests, | |
| unified-planning-api, | |
| unified-planning-integration, | |
| ipc-tests, | |
| warm-up-tests, | |
| pddl-tests, | |
| ] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - run: "true" | |
| # ================ Building & Releasing binaries. | |
| # Only active on the master branch and when the previous validation steps passed | |
| build: # Build release binaries for all architecture and save them as artifacts | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| target: [amd64, arm64] | |
| exclude: | |
| - os: ubuntu-latest | |
| target: arm64 # linux-arm64 build has linker issues, done in a distinct job | |
| fail-fast: false | |
| name: Build - ${{ matrix.os }} - ${{ matrix.target }} | |
| runs-on: ${{ matrix.os }} | |
| if: (github.ref == 'refs/heads/master') || startsWith(github.ref, 'refs/tags/v') | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@master | |
| with: | |
| fetch-depth: 0 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Setup python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: "3.8" | |
| - name: Set Environment Variables | |
| run: | | |
| if [ "${{ matrix.os }}" == "ubuntu-latest" ] && [ "${{ matrix.target }}" == "amd64" ]; then | |
| echo "TARGET=x86_64-unknown-linux-musl" >> $GITHUB_ENV | |
| echo "BINARY=up-aries_linux_amd64" >> $GITHUB_ENV | |
| elif [ "${{ matrix.os }}" == "macos-latest" ] && [ "${{ matrix.target }}" == "amd64" ]; then | |
| echo "TARGET=x86_64-apple-darwin" >> $GITHUB_ENV | |
| echo "BINARY=up-aries_macos_amd64" >> $GITHUB_ENV | |
| elif [ "${{ matrix.os }}" == "windows-latest" ] && [ "${{ matrix.target }}" == "amd64" ]; then | |
| echo "TARGET=x86_64-pc-windows-msvc" >> $GITHUB_ENV | |
| echo "BINARY=up-aries_windows_amd64.exe" >> $GITHUB_ENV | |
| elif [ "${{ matrix.os }}" == "macos-latest" ] && [ "${{ matrix.target }}" == "arm64" ]; then | |
| echo "TARGET=aarch64-apple-darwin" >> $GITHUB_ENV | |
| echo "BINARY=up-aries_macos_arm64" >> $GITHUB_ENV | |
| elif [ "${{ matrix.os }}" == "windows-latest" ] && [ "${{ matrix.target }}" == "arm64" ]; then | |
| echo "TARGET=aarch64-pc-windows-msvc" >> $GITHUB_ENV | |
| echo "BINARY=up-aries_windows_arm64.exe" >> $GITHUB_ENV | |
| fi | |
| - name: Install toolchain | |
| run: rustup target add ${{ env.TARGET }} | |
| - name: Build release binary | |
| run: | | |
| cargo build --release --target ${{ env.TARGET }} --bin up-server | |
| mkdir -p bins/ | |
| cp target/${{ env.TARGET }}/release/up-server bins/${{ env.BINARY }} | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.BINARY }} | |
| path: bins/${{ env.BINARY }} | |
| retention-days: 1 | |
| # Deactivated as induces very long CI times | |
| # # Build linux-aarch64 binaries in a dedicated container. | |
| # build-linux-arm64: | |
| # runs-on: ubuntu-latest | |
| # name: Build - ubuntu-latest - arm64 | |
| # if: github.ref == 'refs/heads/master' | |
| # needs: [lints, unit-tests, integration-tests, unified-planning-api] | |
| # steps: | |
| # - uses: actions/checkout@v3 | |
| # with: | |
| # fetch-depth: 0 | |
| # - uses: uraimo/run-on-arch-action@v2 | |
| # name: Build on ubuntu-latest targetting ARM64 | |
| # id: build | |
| # with: | |
| # arch: aarch64 | |
| # distro: ubuntu20.04 | |
| # | |
| # githubToken: ${{ secrets.GITHUB_TOKEN }} | |
| # | |
| # dockerRunArgs: | | |
| # --privileged --volume "${PWD}:/workdir" --workdir /workdir | |
| # | |
| # shell: /bin/bash | |
| # setup: mkdir -p bins/ | |
| # install: | | |
| # apt-get update | |
| # apt-get -y upgrade | |
| # apt-get install -y libssl-dev libudev-dev pkg-config curl git | |
| # apt-get install -y build-essential gcc-aarch64-linux-gnu python3.8 | |
| # curl https://sh.rustup.rs -sSf | sh -s -- -y | |
| # echo $HOME/.cargo/bin >> ~/.bashrc | |
| # source $HOME/.cargo/env | |
| # rustup target add aarch64-unknown-linux-gnu | |
| # run: | | |
| # source $HOME/.cargo/env | |
| # cargo build --release --target aarch64-unknown-linux-gnu --bin up-server | |
| # cp target/aarch64-unknown-linux-gnu/release/up-server bins/up-aries_linux_arm64 | |
| # python3.8 ./ci/grpc.py --executable bins/up-aries_linux_arm64 | |
| # | |
| # - name: Upload artifact | |
| # uses: actions/upload-artifact@v2 | |
| # with: | |
| # name: up-aries_linux_arm64 | |
| # path: bins/up-aries_linux_arm64 | |
| # retention-days: 1 | |
| package-python: | |
| name: Python Package (up_aries) | |
| needs: [build] | |
| runs-on: ubuntu-latest | |
| if: (github.ref == 'refs/heads/master') || startsWith(github.ref, 'refs/tags/v') | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Retrieve git tags # need full git history to determine version number when packaging | |
| run: git fetch --prune --unshallow | |
| - name: Available tags | |
| run: | | |
| git tag | |
| git describe --tags --match v[0-9]* | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.8" | |
| - name: Install build tools | |
| run: pip install build | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: planning/unified/plugin/artifacts | |
| - name: Unpack artifacts | |
| run: | | |
| cd planning/unified/plugin/ | |
| ls -lR | |
| mkdir -p up_aries/bin | |
| cp artifacts/*/* up_aries/bin/ | |
| chmod +x up_aries/bin/* | |
| ls -lR | |
| python -m build --sdist | |
| cp dist/up_aries-*.tar.gz up_aries.tar.gz | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: up_aries.tar.gz | |
| path: planning/unified/plugin/up_aries.tar.gz | |
| retention-days: 1 | |
| pre-release: # If on master branch, Upload all artifacts as a pre-release "latest" | |
| name: Pre Release | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/master' | |
| needs: [tests, build, package-python] | |
| steps: | |
| - name: Download artifact | |
| uses: actions/download-artifact@v4 | |
| - name: Display artifacts | |
| run: ls -R | |
| - uses: marvinpinto/action-automatic-releases@latest | |
| with: | |
| repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
| automatic_release_tag: "latest" | |
| prerelease: true | |
| title: "Development Build" | |
| files: | | |
| up-aries_linux_amd64 | |
| up-aries_macos_amd64 | |
| up-aries_macos_arm64 | |
| up-aries_windows_amd64.exe | |
| up-aries_windows_arm64.exe | |
| up_aries.tar.gz | |
| release: # If on a "v*" tag, cut a new non-draft release | |
| name: Release | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| needs: [tests, build, package-python] | |
| steps: | |
| - name: Download artifact | |
| uses: actions/download-artifact@v4 | |
| - name: Download TAR artifact for python package | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: up_aries.tar.gz | |
| path: dist/ | |
| - name: Rename python package with version | |
| run: | | |
| TAG=${{github.ref_name}} | |
| VERSION="${TAG:1}" # remove the `v` in `v0.3.5` | |
| mv dist/up_aries.tar.gz dist/up_aries-${VERSION}.tar.gz | |
| - name: Display artifacts | |
| run: ls -R | |
| - name: Publish package to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1.6 | |
| with: | |
| password: ${{ secrets.PYPI_TOKEN }} | |
| packages_dir: dist | |
| - uses: marvinpinto/action-automatic-releases@latest | |
| with: | |
| repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
| prerelease: false | |
| title: "${{ github.ref_name }}" | |
| files: | | |
| up-aries_linux_amd64 | |
| up-aries_macos_amd64 | |
| up-aries_macos_arm64 | |
| up-aries_windows_amd64.exe | |
| up-aries_windows_arm64.exe | |
| up_aries.tar.gz |