From cddfbe2530dc9daa26f31e8486b2fffbbf747e4d Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Mon, 29 Oct 2018 16:25:33 -0700 Subject: [PATCH] add build instructions --- README.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/README.md b/README.md index 8f4f611..ecee13e 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,52 @@ As part of Kazan being hosted by [Debian](https://www.debian.org/), it is import The [`master` branch](https://salsa.debian.org/Kazan-team/kazan/tree/master) is the new Rust version. The previous C++ version is in the [`kazan-old` branch](https://salsa.debian.org/Kazan-team/kazan/tree/kazan-old). The version as of the end of GSOC 2017 is in the [`gsoc-2017` tag](https://salsa.debian.org/Kazan-team/kazan/tree/gsoc-2017). +## Building using Docker + +* Clone Git repo: + git clone --recursive https://salsa.debian.org/Kazan-team/kazan.git + +* Build: + cd kazan + docker build -t kazan-cts . + If the build fails due to Out-of-Memory, reduce the number of processes run simultaneously by passing `--cpuset-cpus=` to only use the specified CPUs: + # only use CPUs 0, 1, and 2 + docker build --cpuset-cpus=0,1,2 -t kazan-cts . + +## Building on Ubuntu 18.04 + +* Install Rust via [rustup](https://rustup.rs/): + curl https://sh.rustup.rs -sSf | sh + You need to restart your shell after installing Rust so `PATH` gets set correctly. + +* Install required packages: + sudo apt-get install cmake ninja-build libgl1-mesa-dev libxcb-shm0 libclang-dev clang build-essential git + +* Clone Git repo: + git clone --recursive https://salsa.debian.org/Kazan-team/kazan.git + +* Build using Cargo: + cd kazan + cargo build -vv + Building using `-vv` is recommended because the build process builds LLVM and it doesn't show LLVM's build progress unless using `-vv`. + +* Run unit tests: + cargo test + +* Run a program using the built driver: + ./run.sh [ ...] + For example, to run `vulkaninfo`: + ./run.sh vulkaninfo + +* Run the Vulkan Conformance Test Suite (CTS): + * Build and run the CTS: + ./run-cts.sh + * Only build the CTS: + ./run-cts.sh --update-only + * Run the CTS without trying to rebuild: + ./run-cts.sh --no-update + The CTS is known to fail the `dEQP-VK.api.version_check.entry_points` test due to a bug in the `libvulkan1.so` that comes packaged in Ubuntu 18.04. That test should pass when using the `libvulkan1.so` from the Vulkan SDK. + ## News ### We've moved! - 2018-10-23 -- 2.30.2