-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
1,272 additions
and
353 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,49 @@ | ||
--- | ||
name: macos-latest | ||
name: macOS | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
compile: # name of the job. Jobs run in parallel unless specified otherwise. | ||
name: compile | ||
runs-on: macos-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.6'] | ||
build-version: ["release", "debug"] | ||
steps: # each - is a new sequentially run step | ||
- uses: actions/checkout@master | ||
- name: Setup python | ||
uses: actions/setup-python@v1 | ||
test: | ||
name: Compile and test planner | ||
timeout-minutes: 60 | ||
runs-on: macos-10.15 | ||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@master | ||
|
||
- name: Install Python | ||
uses: actions/setup-python@master | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
architecture: x64 | ||
python-version: 3.6 | ||
|
||
- name: compile | ||
- name: Compile planner | ||
run: | | ||
export CXXFLAGS="-Werror" # Treat compilation warnings as errors. | ||
./build.py ${{ matrix.build-version }} | ||
export CXXFLAGS="-Werror" # Treat compilation warnings as errors. | ||
./build.py | ||
./build.py --debug | ||
- name: upload-planner | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: ${{ matrix.build-version }} | ||
path: builds/${{ matrix.build-version }} | ||
|
||
|
||
test: # name of the job. Jobs run in parallel unless specified otherwise. | ||
name: test | ||
runs-on: macos-latest | ||
needs: compile | ||
strategy: | ||
matrix: | ||
python-version: ['3.6'] | ||
steps: # each - is a new sequentially run step | ||
- uses: actions/checkout@master | ||
|
||
- name: Setup python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
architecture: x64 | ||
|
||
- name: setup | ||
- name: Install tox | ||
run: | | ||
pip3 install pytest tox | ||
#brew install valgrind # TODO: does not work | ||
mkdir builds | ||
- name: download-planner | ||
uses: actions/download-artifact@master | ||
with: | ||
# without 'name' attribute all artifacts are downloaded and the | ||
# artifact name is used as directory name. | ||
path: builds/ | ||
pip3 install tox | ||
- name: test | ||
- name: Install VAL | ||
run: | | ||
brew install gnu-sed | ||
git clone https://github.com/KCL-Planning/VAL.git | ||
cd VAL | ||
git checkout a5565396007eee73ac36527fbf904142b3077c74 | ||
make clean # Remove old build artifacts and binaries. | ||
gsed -i 's/-Werror //g' Makefile # Ignore warnings. | ||
make -j2 | ||
mv validate ../ | ||
cd ../ | ||
rm -rf VAL | ||
- name: Run driver, translator and search tests | ||
run: | | ||
chmod +x builds/debug/bin/downward | ||
chmod +x builds/release/bin/downward | ||
cd misc/ | ||
tox -e search,translator | ||
export PATH="$(pwd):$PATH" # Add VAL to path. | ||
cd misc | ||
tox -e driver,translator,search | ||
... |
58 changes: 58 additions & 0 deletions
58
.github/workflows/misc/cplex129_windows_installer.properties
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Thu Feb 11 12:01:26 CET 2021 | ||
# Replay feature output | ||
# --------------------- | ||
# This file was built by the Replay feature of InstallAnywhere. | ||
# It contains variables that were set by Panels, Consoles or Custom Code. | ||
# | ||
# To generate this file: | ||
# 1. Install CPLEX from the command line: ./installer -r installer.properties | ||
# 2. Adapt the directory paths in the resulting 'installer.properties' file | ||
# 3. Add to the file: | ||
# #Silent Installation | ||
# INSTALLER_UI=silent | ||
# For further information visit: | ||
# https://www.ibm.com/support/knowledgecenter/SSSA5P_12.9.0/ilog.odms.studio.help/Optimization_Studio/topics/td_silent_install.html | ||
|
||
|
||
#Accept license agreement | ||
#--------------------------------------------------- | ||
LICENSE_ACCEPTED=TRUE | ||
|
||
#Choose installation directory | ||
#----------------------------- | ||
USER_INSTALL_DIR=D:\\a\\downward\\cplex_temp | ||
|
||
#Copy examples | ||
#------------------- | ||
CPLEX_STUDIO_EXAMPLES_DIR=D:\\a\\downward\\cplex_examples | ||
CPLEX_STUDIO_SAMPLE_COPY_NOT_ACTIVATED=0 | ||
|
||
#Associate files with CPLEX | ||
#-------------- | ||
CPLEX_STUDIO_FILE_ASSOCIATION=0 | ||
|
||
#Update PATH variable | ||
#-------------------- | ||
CPLEX_STUDIO_PATH_UPDATE=1 | ||
|
||
#Silent Installation | ||
INSTALLER_UI=silent | ||
|
||
#Install | ||
#------------ | ||
-fileOverwrite_D\:\\a\\downward\\cplex_temp\\README.html=Yes | ||
-fileOverwrite_D\:\\a\\downward\\cplex_temp\\Uninstall\\Uninstall.lax=Yes | ||
-fileOverwrite_D\:\\a\\downward\\cplex_temp\\Uninstall\\resource\\iawin64_x64.dll=Yes | ||
-fileOverwrite_D\:\\a\\downward\\cplex_temp\\Uninstall\\resource\\iawin32.dll=Yes | ||
-fileOverwrite_D\:\\a\\downward\\cplex_temp\\Uninstall\\resource\\win64_32_x64.exe=Yes | ||
-fileOverwrite_D\:\\a\\downward\\cplex_temp\\Uninstall\\resource\\remove.exe=Yes | ||
-fileOverwrite_D\:\\a\\downward\\cplex_temp\\Uninstall\\resource\\invoker.exe=Yes | ||
-fileOverwrite_D\:\\a\\downward\\cplex_temp\\Uninstall\\ibm_uninsticon.ico=Yes | ||
-fileOverwrite_D\:\\a\\downward\\cplex_temp\\opl\\oplide\\oplide_installer.bat=Yes | ||
-fileOverwrite_D\:\\a\\downward\\cplex_temp\\opl\\oplide\\oplide.exe=Yes | ||
-fileOverwrite_D\:\\a\\downward\\cplex_examples\\.samples=Yes | ||
|
||
#Post installation steps | ||
#------------------------------- | ||
CPLEX_STUDIO_README=0 | ||
CPLEX_STUDIO_IDE=0 |
54 changes: 54 additions & 0 deletions
54
.github/workflows/misc/set-visual-studio-static-runtime-libraries.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
""" | ||
Use this script to set the "RuntimeLibrary" property of a Visual Studio project | ||
file to static linking libraries for all configurations. | ||
""" | ||
from xml.etree import ElementTree | ||
import os | ||
import sys | ||
|
||
ElementTree.register_namespace( | ||
"", "http://schemas.microsoft.com/developer/msbuild/2003") | ||
|
||
|
||
def adapt(in_project, out_project): | ||
tree = ElementTree.parse(in_project) | ||
|
||
root = tree.getroot() | ||
for item_definition_group in root.findall( | ||
'{http://schemas.microsoft.com/developer/msbuild/2003}ItemDefinitionGroup'): | ||
condition = item_definition_group.attrib["Condition"] | ||
is_release = any(x in condition.lower() | ||
for x in ["release", "minsizerel", "relwithdebinfo"]) | ||
is_debug = "debug" in condition.lower() | ||
assert is_release ^ is_debug, condition | ||
|
||
compiler_args = item_definition_group.findall( | ||
'{http://schemas.microsoft.com/developer/msbuild/2003}ClCompile') | ||
assert len(compiler_args) == 1, compiler_args | ||
compiler_args = compiler_args[0] | ||
|
||
runtime_library = compiler_args.findall( | ||
'{http://schemas.microsoft.com/developer/msbuild/2003}RuntimeLibrary') | ||
if len(runtime_library) == 0: | ||
runtime_library = ElementTree.Element("RuntimeLibrary") | ||
compiler_args.append(runtime_library) | ||
elif len(runtime_library) == 1: | ||
runtime_library = runtime_library[0] | ||
else: | ||
assert False, runtime_library | ||
|
||
runtime_library.text = "MultiThreaded" | ||
if is_debug: | ||
runtime_library.text += "Debug" | ||
|
||
tree.write(out_project) | ||
|
||
|
||
if __name__ == "__main__": | ||
if len(sys.argv) != 3: | ||
sys.exit(f"{sys.argv[0]} [OLD_VS_PROJECT_FILE] [OUTPUT_FILE]") | ||
_, in_path, out_path = sys.argv | ||
if not os.path.isfile(in_path): | ||
sys.exit(f"{in_path} does not exist!") | ||
|
||
adapt(in_path, out_path) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
name: Code style tests | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
style: | ||
name: Test code style | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@master | ||
|
||
- name: Install Python | ||
uses: actions/setup-python@master | ||
with: | ||
python-version: 3.6 | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip3 install tox | ||
sudo apt-get -y install clang-tidy-8 | ||
- name: Install uncrustify | ||
run: | | ||
# Set up uncrustify. | ||
wget https://github.com/uncrustify/uncrustify/archive/uncrustify-0.67.tar.gz | ||
tar xzf uncrustify-0.67.tar.gz | ||
cd uncrustify-uncrustify-0.67 | ||
mkdir build | ||
cd build | ||
cmake ../ | ||
make -j2 | ||
mv uncrustify ../../ | ||
cd ../../ | ||
rm -rf uncrustify-0.67.tar.gz uncrustify-uncrustify-0.67 | ||
- name: Run code style tests | ||
run: | | ||
export PATH="$(pwd):$PATH" # Add uncrustify to path. | ||
cd misc/ | ||
tox -e style,clang-tidy | ||
... |
Oops, something went wrong.