Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue1142: update test versions #224

Merged
merged 19 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/autodoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
name: Autodoc
if: github.repository == 'aibasel/downward'
timeout-minutes: 60
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
env:
DOWNWARD_AUTODOC_PASSWORD: ${{ secrets.DOWNWARD_AUTODOC_PASSWORD }}
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
strategy:
matrix:
version:
- {macos: macos-11, python: '3.8'}
- {macos: macos-12, python: '3.10'}
- {macos: macos-13, python: '3.10'}
- {macos: macos-14, python: '3.10'}
steps:
- name: Clone repository
uses: actions/checkout@v3
Expand Down
11 changes: 2 additions & 9 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
style:
name: Test code style
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Clone repository
uses: actions/checkout@v3
Expand All @@ -23,14 +23,7 @@ jobs:
- name: Install dependencies
run: |
pip3 install tox
sudo apt-get -y install clang-tidy-12

# TODO: Remove once issue with Ubuntu 22.04 and clang++-14 is resolved.
- name: Work around https://github.com/actions/runner-images/issues/8659
run: |
sudo rm -f /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-jammy.list
sudo apt-get update
sudo apt-get install -y --allow-downgrades libc6=2.35-* libc6-dev=2.35-* libstdc++6=12.3.0-* libgcc-s1=12.3.0-*
sudo apt-get -y install clang-tidy-16

- name: Install uncrustify
run: |
Expand Down
25 changes: 8 additions & 17 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,19 @@ jobs:
strategy:
matrix:
version:
- {ubuntu: 'ubuntu-20.04', python: '3.8', cc: gcc-10, cxx: g++-10, run_tox_tests: true}
- {ubuntu: 'ubuntu-20.04', python: '3.8', cc: clang-12, cxx: clang++-12, run_tox_tests: false}
- {ubuntu: 'ubuntu-22.04', python: '3.10', cc: gcc-11, cxx: g++-11, run_tox_tests: false}
- {ubuntu: 'ubuntu-22.04', python: '3.10', cc: gcc-12, cxx: g++-12, run_tox_tests: true}
- {ubuntu: 'ubuntu-22.04', python: '3.10', cc: clang-14, cxx: clang++-14, run_tox_tests: false}
- {ubuntu: 'ubuntu-22.04', python: '3.10', cc: clang-15, cxx: clang++-15, run_tox_tests: false}
- {ubuntu: 'ubuntu-24.04', python: '3.10', cc: gcc-14, cxx: g++-14, run_tox_tests: true}
- {ubuntu: 'ubuntu-24.04', python: '3.10', cc: clang-18, cxx: clang++-18, run_tox_tests: false}
env:
CC: ${{ matrix.version.cc }}
CXX: ${{ matrix.version.cxx }}
CPLEX_URL: ${{ secrets.CPLEX2211_LINUX_URL }}
cplex_DIR: /home/runner/lib/ibm/ILOG/CPLEX_Studio2211/cplex
CPLEX_LIB: /home/runner/lib/ibm/ILOG/CPLEX_Studio2211/cplex/bin/x86-64_linux/libcplex2211.so
soplex_DIR: /home/runner/lib/soplex-6.0.3x
SOPLEX_LIB: /home/runner/lib/soplex-6.0.3x/lib/
SOPLEX_INCLUDE: /home/runner/lib/soplex-6.0.3x/include/
soplex_DIR: /home/runner/lib/soplex-7.1.0
SOPLEX_LIB: /home/runner/lib/soplex-7.1.0/lib/
SOPLEX_INCLUDE: /home/runner/lib/soplex-7.1.0/include/
steps:
- name: Clone repository
uses: actions/checkout@v3
Expand All @@ -57,14 +56,6 @@ jobs:
run: |
sudo apt-get -y install ${{ matrix.version.cxx }}

# TODO: Remove once issue with Ubuntu 22.04 and clang++-14 is resolved.
- name: Work around https://github.com/actions/runner-images/issues/8659
if: matrix.version.cxx == 'clang++-14'
run: |
sudo rm -f /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-jammy.list
sudo apt-get update
sudo apt-get install -y --allow-downgrades libc6=2.35-* libc6-dev=2.35-* libstdc++6=12.3.0-* libgcc-s1=12.3.0-*

# Only install CPLEX if its URL/secret is set.
- name: Install CPLEX
if: ${{ env.CPLEX_URL != 0 }}
Expand All @@ -80,7 +71,7 @@ jobs:
run: |
git clone https://github.com/scipopt/soplex.git
cd soplex
git checkout a5df0814d67812c13a00f06eec507b4d071fb862
git checkout release-710
cd ..
cmake -S soplex -B build
cmake --build build
Expand Down Expand Up @@ -121,8 +112,8 @@ jobs:
strategy:
matrix:
version:
- {ubuntu: ubuntu-20.04, python: '3.8'}
- {ubuntu: ubuntu-22.04, python: '3.10'}
- {ubuntu: ubuntu-24.04, python: '3.10'}
env:
CPLEX_URL: ${{ secrets.CPLEX2211_LINUX_URL }}
steps:
Expand Down
14 changes: 4 additions & 10 deletions misc/releases/templates/_Dockerfile.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
###############################################################################
# A first image to build the planner
###############################################################################
FROM ubuntu:22.04 AS builder
FROM ubuntu:24.04 AS builder

RUN apt-get update && apt-get install --no-install-recommends -y \
ca-certificates \
Expand All @@ -20,18 +20,12 @@ RUN apt-get update && apt-get install --no-install-recommends -y \

# Set up some environment variables.
ENV CXX g++
# TODO: on next release, replace this with a tagged SoPlex release > 6.0.3.
ENV SOPLEX_REVISION a5df081
ENV SOPLEX_REVISION release-710
ENV soplex_DIR /opt/soplex

# Install SoPlex.
WORKDIR /workspace/soplex
# TODO: on next release, work with a tagged SoPlex release again if possible.
# We might continue using git clone, replacing this with `--depth 1 --branch $SOPLEX_REVISION`
# ($SOPLEX_REVISION needs to be a branch or tag, not a commit hash) or use
# another distribution mechanism.
RUN git clone --branch master https://github.com/scipopt/soplex.git . && \
git checkout $SOPLEX_REVISION && \
RUN git clone --depth 1 --branch $SOPLEX_REVISION https://github.com/scipopt/soplex.git . && \
cmake -DCMAKE_INSTALL_PREFIX="$soplex_DIR" -S . -B build && \
cmake --build build && \
cmake --install build
Expand All @@ -46,7 +40,7 @@ RUN git clone --depth 1 --branch TAG https://github.com/aibasel/downward.git . &
###############################################################################
# The final image to run the planner
###############################################################################
FROM ubuntu:22.04 AS runner
FROM ubuntu:24.04 AS runner

RUN apt-get update && apt-get install --no-install-recommends -y \
python3 \
Expand Down
5 changes: 2 additions & 3 deletions misc/releases/templates/_Vagrantfile.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Vagrant.configure("2") do |config|
v.memory = 2048
end

config.vm.box = "ubuntu/jammy64"
config.vm.box = "ubuntu/noble64"

# To compile the planner with support for CPLEX, download the 64-bit Linux
# installer of CPLEX 22.1.1 and set the environment variable
Expand Down Expand Up @@ -56,9 +56,8 @@ Vagrant.configure("2") do |config|
export soplex_DIR="/opt/soplex"
EOM
source /etc/profile.d/downward-soplex.sh
git clone --branch master https://github.com/scipopt/soplex.git soplex
git clone --depth 1 --branch release-710 https://github.com/scipopt/soplex.git soplex
cd soplex
git checkout a5df081
cmake -DCMAKE_INSTALL_PREFIX="$soplex_DIR" -S . -B build
cmake --build build
cmake --install build
Expand Down
8 changes: 4 additions & 4 deletions misc/style/run-clang-tidy.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ def check_search_code_with_clang_tidy():
{{key: performance-unnecessary-value-param.AllowedTypes, value: "{';'.join(LIGHTWEIGHT_TYPES)}"}},\
]}}""".replace(" ", "")
cmd = [
"run-clang-tidy-12",
"run-clang-tidy-16",
"-quiet",
"-p", build_dir,
"-clang-tidy-binary=clang-tidy-12",
"-clang-tidy-binary=clang-tidy-16",
"-checks=-*," + ",".join(checks),
f"-config={config}",
]
Expand All @@ -116,7 +116,7 @@ def check_search_code_with_clang_tidy():
try:
p = subprocess.run(cmd, cwd=DIR, text=True, capture_output=True, check=False)
except FileNotFoundError:
sys.exit(f"run-clang-tidy-12 not found. Is it on the PATH?")
sys.exit(f"run-clang-tidy-16 not found. Is it on the PATH?")
output = f"{p.stdout}\n{p.stderr}"
errors = re.findall(r"^(.*:\d+:\d+: .*(?:warning|error): .*)$", output, flags=re.M)
filtered_errors = [error for error in errors if not any(ignore in error for ignore in IGNORES)]
Expand All @@ -126,7 +126,7 @@ def check_search_code_with_clang_tidy():
for error in filtered_errors:
print(error)
fix_cmd = cmd + [
"-clang-apply-replacements-binary=clang-apply-replacements-12", "-fix"]
"-clang-apply-replacements-binary=clang-apply-replacements-16", "-fix"]
print("\nYou may be able to fix some of these issues with the following command:\n" +
" ".join(pipes.quote(x) for x in fix_cmd))
sys.exit(1)
Expand Down
3 changes: 1 addition & 2 deletions src/search/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -561,8 +561,7 @@ if(USE_LP)
target_sources(lp_solver INTERFACE lp/cplex_solver_interface.h lp/cplex_solver_interface.cc)
endif()

# TODO: we actually require a version greater than 6.0.3 but it is not released yet.
find_package(soplex 6.0.3 QUIET)
find_package(soplex 7.1.0 QUIET)
if (SOPLEX_FOUND)
message(STATUS "Found SoPlex: ${SOPLEX_INCLUDE_DIRS}")
target_link_libraries(lp_solver INTERFACE libsoplex)
Expand Down
8 changes: 8 additions & 0 deletions src/search/cmake/common_cxx_flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,11 @@ target_compile_options(common_cxx_warnings INTERFACE
# /wd4244: conversion with possible loss of data
# /wd4267: conversion from size_t to int with possible loss of data
target_link_libraries(common_cxx_flags INTERFACE common_cxx_warnings)

set(v15_or_later "$<VERSION_GREATER_EQUAL:$<CXX_COMPILER_VERSION>,15>")
set(using_clang "$<CXX_COMPILER_ID:Clang>")
set(using_apple_clang "$<CXX_COMPILER_ID:AppleClang>")
set(using_clang_like "$<OR:${using_clang},${using_apple_clang}>")
set(should_ignore_std_warning "$<AND:${using_clang_like},${v15_or_later}>")
target_compile_options(common_cxx_warnings INTERFACE
"$<${should_ignore_std_warning}:-Wno-unqualified-std-cast-call>")
6 changes: 3 additions & 3 deletions src/search/command_line.cc
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ static shared_ptr<SearchAlgorithm> parse_cmd_line_aux(const vector<string> &args
SearchPtr search_algorithm = nullptr;
// TODO: Remove code duplication.
for (size_t i = 0; i < args.size(); ++i) {
string arg = args[i];
const string &arg = args[i];
bool is_last = (i == args.size() - 1);
if (arg == "--search") {
if (search_algorithm)
input_error("multiple --search arguments defined");
if (is_last)
input_error("missing argument after --search");
++i;
string search_arg = args[i];
const string &search_arg = args[i];
try {
parser::TokenStream tokens = parser::split_tokens(search_arg);
parser::ASTNodePtr parsed = parser::parse(tokens);
Expand All @@ -112,7 +112,7 @@ static shared_ptr<SearchAlgorithm> parse_cmd_line_aux(const vector<string> &args
bool txt2tags = false;
vector<string> plugin_names;
for (size_t j = i + 1; j < args.size(); ++j) {
string help_arg = args[j];
const string &help_arg = args[j];
if (help_arg == "--txt2tags") {
txt2tags = true;
} else {
Expand Down
2 changes: 0 additions & 2 deletions src/search/heuristics/hm_heuristic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ void HMHeuristic::init_hm_table(const Tuple &t) {


void HMHeuristic::update_hm_table() {
int round = 0;
do {
++round;
was_updated = false;

for (OperatorProxy op : task_proxy.get_operators()) {
Expand Down
2 changes: 0 additions & 2 deletions src/search/heuristics/lm_cut_landmarks.cc
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,7 @@ bool LandmarkCutLandmarks::compute_landmarks(
if (artificial_goal.status == UNREACHED)
return true;

int num_iterations = 0;
while (artificial_goal.h_max_cost != 0) {
++num_iterations;
mark_goal_plateau(&artificial_goal);
assert(cut.empty());
second_exploration(state, second_exploration_queue, cut);
Expand Down
1 change: 1 addition & 0 deletions src/search/landmarks/landmark_factory_rpg_sasp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ void LandmarkFactoryRpgSasp::found_simple_lm_and_order(

// Retrieve incoming edges from disj_lm
vector<LandmarkNode *> predecessors;
predecessors.reserve(disj_lm->parents.size());
for (auto &pred : disj_lm->parents) {
predecessors.push_back(pred.first);
}
Expand Down
2 changes: 2 additions & 0 deletions src/search/lp/soplex_solver_interface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,10 @@ void SoPlexSolverInterface::print_failure_analysis() const {
case SPxSolverBase<double>::Status::NOT_INIT:
cout << "Not initialized" << endl;
break;
#if SOPLEX_VERSION < 700
case SPxSolverBase<double>::Status::ABORT_EXDECOMP:
case SPxSolverBase<double>::Status::ABORT_DECOMP:
#endif
case SPxSolverBase<double>::Status::ABORT_CYCLING:
case SPxSolverBase<double>::Status::ABORT_TIME:
case SPxSolverBase<double>::Status::ABORT_ITER:
Expand Down
4 changes: 2 additions & 2 deletions src/search/merge_and_shrink/factored_transition_system.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ void FactoredTransitionSystem::assert_index_valid(int index) const {
assert(utils::in_bounds(index, transition_systems));
assert(utils::in_bounds(index, mas_representations));
assert(utils::in_bounds(index, distances));
if (!(transition_systems[index] && mas_representations[index] && distances[index]) &&
!(!transition_systems[index] && !mas_representations[index] && !distances[index])) {
if ((!transition_systems[index] || !mas_representations[index] || !distances[index]) &&
(transition_systems[index] || mas_representations[index] || distances[index])) {
cerr << "Factor at index is in an inconsistent state!" << endl;
utils::exit_with(utils::ExitCode::SEARCH_CRITICAL_ERROR);
}
Expand Down
3 changes: 0 additions & 3 deletions src/search/merge_and_shrink/merge_and_shrink_algorithm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ void MergeAndShrinkAlgorithm::main_loop(
<< timer.get_elapsed_time()
<< " (" << msg << ")" << endl;
};
int iteration_counter = 0;
while (fts.get_num_active_entries() > 1) {
// Choose next transition systems to merge
pair<int, int> merge_indices = merge_strategy->get_next();
Expand Down Expand Up @@ -321,8 +320,6 @@ void MergeAndShrinkAlgorithm::main_loop(
if (log.is_at_least_normal()) {
log << endl;
}

++iteration_counter;
}

log << "End of merge-and-shrink algorithm, statistics:" << endl;
Expand Down
Loading