-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #109 from niklasdewally/issue/108
Add tools/update-submodules.sh + a few other changes to how we build things
- Loading branch information
Showing
17 changed files
with
108 additions
and
50 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
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
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
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
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 +1,20 @@ | ||
Stay tuned! | ||
# Conjure-Oxide | ||
|
||
This repository contains the in progress Conjure Oxide constraints modelling | ||
tool, and it's dependencies. | ||
|
||
This repository hosts the following projects: | ||
|
||
* [Conjure Oxide](https://github.com/conjure-cp/conjure-oxide/tree/main/conjure_oxide) | ||
* [`minion_rs` - Rust bindings to Minion](https://github.com/conjure-cp/conjure-oxide/tree/main/solvers/minion) | ||
* [`chuffed_rs` - Rust bindings to Chuffed](https://github.com/conjure-cp/conjure-oxide/tree/main/solvers/chuffed) | ||
|
||
This project is being produced by staff and students of University of St | ||
Andrews, and is licenced under the [MPL 2.0](./LICENCE). | ||
|
||
## Contributing | ||
|
||
See the [Contributors Guide](https://github.com/conjure-cp/conjure-oxide/wiki/Contributing). | ||
|
||
<!-- vim: cc=80 | ||
--> |
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
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,17 +1,26 @@ | ||
#!/bin/bash | ||
|
||
SCRIPT_DIR=$(dirname "$0") | ||
SCRIPT_DIR="$(readlink -f "$(dirname "$0")")" | ||
cd "$SCRIPT_DIR" | ||
|
||
git submodule init | ||
git submodule update | ||
cd "$SCRIPT_DIR" || exit | ||
git submodule init -- vendor | ||
git submodule sync -- vendor | ||
git submodule update --init --recursive -- vendor | ||
|
||
|
||
if [[ -z "$OUT_DIR" ]]; then | ||
echo "OUT_DIR env variable does not exist - did you run this script through cargo build?" | ||
exit 1 | ||
fi | ||
|
||
echo "------ BUILDING ------" | ||
cd vendor || exit | ||
cmake -B build -S . | ||
cmake --build build | ||
cd .. | ||
|
||
mkdir -p "$OUT_DIR/build" | ||
cd "$OUT_DIR/build" | ||
cmake -B . -S "$SCRIPT_DIR/vendor" | ||
cmake --build . | ||
|
||
# Build wrapper.cpp as static library | ||
c++ -c wrapper.cpp -Ivendor --std=c++11 | ||
cd "$OUT_DIR" || exit 1 | ||
c++ -c "$SCRIPT_DIR/wrapper.cpp" -I"$SCRIPT_DIR/vendor" --std=c++11 | ||
ar rvs libwrapper.a wrapper.o |
This file was deleted.
Oops, something went wrong.
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
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,23 +1,23 @@ | ||
#!/bin/bash | ||
|
||
SCRIPT_DIR=$(dirname "$0") | ||
|
||
git submodule init | ||
git submodule update | ||
SCRIPT_DIR="$(readlink -f "$(dirname "$0")")" | ||
cd "$SCRIPT_DIR" | ||
|
||
echo "------ CONFIGURE STEP ------" | ||
git submodule init -- vendor | ||
git submodule sync -- vendor | ||
git submodule update --init --recursive -- vendor | ||
|
||
if [ -d vendor/build ]; then | ||
echo "vendor/build already exists; skipping" | ||
echo "if you need to reconfigure minion (such as after an update), delete this directory!" | ||
else | ||
mkdir -p vendor/build | ||
cd vendor/build | ||
python3 ../configure.py --lib --quick | ||
if [[ -z "$OUT_DIR" ]]; then | ||
echo "OUT_DIR env variable does not exist - did you run this script through cargo build?" | ||
exit 1 | ||
fi | ||
|
||
echo "------ CONFIGURE STEP ------" | ||
|
||
mkdir -p "$OUT_DIR/build" | ||
cd "$OUT_DIR/build" | ||
python3 "$SCRIPT_DIR/vendor/configure.py" --lib --quick | ||
|
||
echo "------ BUILD STEP ------" | ||
cd "$SCRIPT_DIR" | ||
cd vendor/build | ||
cd "$OUT_DIR/build" | ||
make |
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
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
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,28 @@ | ||
#!/bin/bash | ||
# vim: cc=80 | ||
|
||
# root of project | ||
cd $(dirname "$0")/.. | ||
|
||
# update, initialise, and sync all submodules to ensure that changes are | ||
# reflected here. `git submodule sync` means change where the submodule points | ||
# to match .gitmodules, should it have changed (in particular, from a dev fork | ||
# to upstream). | ||
|
||
echo "=== Cleaning submodules ===" 1>&2 | ||
|
||
bash ./tools/plumbing/get_submodule_paths.sh | | ||
{ | ||
while read -r submodule_path; do | ||
cd "$submodule_path" | ||
git clean -dfx . | ||
cd - &> /dev/null | ||
done | ||
} | ||
|
||
echo "=== Updating and resetting submodules ===" 1>&2 | ||
|
||
git submodule init --recursive | ||
git submodule sync --recursive | ||
git submodule update --init --recursive | ||
|