fix(planning): add mis-removed condition #468
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: Aries | |
on: push | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
unit-tests: | |
name: Unit tests | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: dtolnay/rust-toolchain@stable | |
- run: cargo test | |
lints: | |
name: Rustfmt and Clippy | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: dtolnay/[email protected] # 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-22.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: LCP Solving (PDDL & HDDL) | |
run: ./ci/lcp.sh | |
unified-planning-api: | |
name: Unified Planning API | |
runs-on: ubuntu-22.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-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
- 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: Install just | |
run: curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to . | |
- name: Solver tests | |
run: ./just ci-up-solve | |
- name: Validator tests | |
run: ./just ci-up-val | |
ipc-tests: | |
name: IPC Tests | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
- 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: Install just | |
run: curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to . | |
- name: Resolution | |
run: ./just ci-ipc | |
tests: # Meta-job that only requires all test-jobs to pass | |
needs: | |
[ | |
lints, | |
unit-tests, | |
integration-tests, | |
unified-planning-api, | |
unified-planning-integration, | |
ipc-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: mv dist/up_aries.tar.gz dist/up_aries-${{github.ref_name}}.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 |