Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f3bf2ab852dc
Choose a base ref
...
head repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: bd889a968059
Choose a head ref
  • 3 commits
  • 2 files changed
  • 1 contributor

Commits on Aug 30, 2019

  1. Support for Disco and Clang 8.

    pleroy committed Aug 30, 2019
    Copy the full SHA
    1d7de64 View commit details

Commits on Aug 31, 2019

  1. Migrate to Disco.

    pleroy committed Aug 31, 2019
    Copy the full SHA
    d549c5d View commit details
  2. Merge pull request #2317 from pleroy/DiscoDingo

    Add support for Disco Dingo and Clang 8
    pleroy authored Aug 31, 2019
    Copy the full SHA
    bd889a9 View commit details
Showing with 55 additions and 10 deletions.
  1. +9 −4 Makefile
  2. +46 −6 Vagrantfile
13 changes: 9 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -69,11 +69,11 @@ LIBS := $(DEP_DIR)protobuf/src/.libs/libprotobuf.a \
$(DEP_DIR)abseil-cpp/absl/debugging/libabsl_*.a \
$(DEP_DIR)abseil-cpp/absl/numeric/libabsl_*.a \
$(DEP_DIR)abseil-cpp/absl/base/libabsl_*.a \
$(DEP_DIR)glog/.libs/libglog.a -lpthread -lc++ -lc++abi
$(DEP_DIR)glog/.libs/libglog.a -lpthread -lc++ -lc++abi -lc++fs
TEST_INCLUDES := \
-I$(DEP_DIR)googletest/googlemock/include -I$(DEP_DIR)googletest/googletest/include \
-I$(DEP_DIR)googletest/googlemock/ -I$(DEP_DIR)googletest/googletest/ -I$(DEP_DIR)benchmark/include
INCLUDES := -I. -I$(DEP_DIR)glog/src -I$(DEP_DIR)protobuf/src -I$(DEP_DIR)compatibility/filesystem \
INCLUDES := -I. -I$(DEP_DIR)glog/src -I$(DEP_DIR)protobuf/src \
-I$(DEP_DIR)gipfeli/include -I$(DEP_DIR)abseil-cpp
SHARED_ARGS := \
-std=c++1z -stdlib=libc++ -O3 -g \
@@ -96,7 +96,7 @@ ifeq ($(UNAME_S),Linux)
SHAREDFLAG := -shared
endif
ifeq ($(UNAME_S),Darwin)
INCLUDES += -I$(DEP_DIR)compatibility/optional -I$(DEP_DIR)Optional
INCLUDES += -I$(DEP_DIR)compatibility/filesystem -I$(DEP_DIR)compatibility/optional -I$(DEP_DIR)Optional
SHARED_ARGS += -mmacosx-version-min=10.12 -arch x86_64
MDTOOL ?= "/Applications/Xamarin Studio.app/Contents/MacOS/mdtool"
SHAREDFLAG := -dynamiclib
@@ -282,7 +282,12 @@ $(ADAPTER): $(GENERATED_PROFILES)

######### Distribution

release: $(ADAPTER) $(KSP_PLUGIN)
# Something got broken in Disco where building the adapter is no longer possible
# because /usr/lib/mono/msbuild/15.0/bin/System.Reflection.Metadata.dll points
# to a missing Roslyn directory. We don't care, we don't use the adapter built
# on Linux
# release: $(ADAPTER) $(KSP_PLUGIN)
release: $(KSP_PLUGIN)
cd $(FINAL_PRODUCTS_DIR); tar -c -z -f - GameData/ > principia_$(UNAME_S)-$(shell git describe --tags --always --dirty --abbrev=40 --long).tar.gz
########## Cleaning

52 changes: 46 additions & 6 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -2,12 +2,15 @@
# vi: set ft=ruby :

# Note: Use 'sudo su' in the ubuntu machine before make'ing.
# To mount:
# mkdir "/home/vagrant/KSP Assemblies"
# mount -t vboxsf Assemblies "/home/vagrant/KSP Assemblies"
Vagrant.configure("2") do |config|

config.vm.define "ubuntu" do |ubuntu|
ubuntu.vm.box = "ubuntu/bionic64"
ubuntu.vm.box_url = "https://app.vagrantup.com/ubuntu/boxes/bionic64/versions/20180315.0.0/providers/virtualbox.box"
ubuntu.vm.synced_folder "../KSP Assemblies", "/home/vagrant/KSP Assemblies", id: "Assemblies"
config.vm.define "bionic" do |bionic|
bionic.vm.box = "ubuntu/bionic64"
bionic.vm.box_url = "https://app.vagrantup.com/ubuntu/boxes/bionic64/versions/20180315.0.0/providers/virtualbox.box"
bionic.vm.synced_folder "../KSP Assemblies", "/home/vagrant/KSP Assemblies", id: "Assemblies"

script = <<SCRIPT
echo Provisioning Principia
@@ -33,9 +36,46 @@ cd principia
if [ -d deps ]; then echo "Dependencies already installed, remove deps/ to reinstall."; else ./install_deps.sh; fi
SCRIPT

ubuntu.vm.provision "shell", inline: script
bionic.vm.provision "shell", inline: script

ubuntu.vm.provider "virtualbox" do |v|
bionic.vm.provider "virtualbox" do |v|
v.memory = 8192
v.cpus = 4
end
end

config.vm.define "disco" do |disco|
disco.vm.box = "ubuntu/disco64"
disco.vm.box_url = "https://app.vagrantup.com/ubuntu/boxes/disco64/versions/20190828.0.0/providers/virtualbox.box"
disco.vm.synced_folder "../KSP Assemblies", "/home/vagrant/KSP Assemblies", id: "Assemblies"

script = <<SCRIPT
echo Provisioning Principia
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian wheezy main" | tee /etc/apt/sources.list.d/mono-xamarin.list
wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
add-apt-repository 'deb http://apt.llvm.org/disco/ llvm-toolchain-disco-8 main'
apt-get update
apt-get install -y clang-8 clang-tools-8 clang-format-8 clang-tidy-8 git unzip wget libc++-dev libc++abi-dev binutils make automake libtool curl cmake monodevelop
ln -s /usr/bin/clang-8 /usr/bin/clang
clang --version
ln -s /usr/bin/clang++-8 /usr/bin/clang++
clang++ --version
ln -s /usr/bin/clang-format-8 /usr/bin/clang-format
clang-format --version
ln -s /usr/bin/clang-format-diff-8 /usr/bin/clang-format-diff
clang-format-diff --help
ln -s /usr/bin/clang-tidy-8 /usr/bin/clang-tidy
clang-tidy --version
git clone https://github.com/mockingbirdnest/Principia.git principia
chown -R vagrant:vagrant principia KSP
cd principia
if [ -d deps ]; then echo "Dependencies already installed, remove deps/ to reinstall."; else ./install_deps.sh; fi
SCRIPT

disco.vm.provision "shell", inline: script

disco.vm.provider "virtualbox" do |v|
v.memory = 8192
v.cpus = 4
end