blob: 9321fd6d4db3e6f15375f97fe1d813d6c94721ef [file] [log] [blame] [view]
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +02001# Nexantic monorepo
Leopold Schabel67f9d092019-10-22 15:41:42 +02002
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +02003This is the monorepo storing all of nexantic's internal projects and libraries.
Leopold Schabel67f9d092019-10-22 15:41:42 +02004
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +02005## Environment
Leopold Schabel5c80aca2019-10-22 15:48:58 +02006
Leopold Schabel8b9c0552019-11-15 14:07:45 +01007We assume a Fedora 30 or 31 host system provisioned using rW, and IntelliJ as the IDE.
Leopold Schabel67f9d092019-10-22 15:41:42 +02008
Leopold Schabel8b9c0552019-11-15 14:07:45 +01009For better reproducibility, all builds are executed in containers.
Leopold Schabel67f9d092019-10-22 15:41:42 +020010
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020011#### Usage
Leopold Schabel5c80aca2019-10-22 15:48:58 +020012
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020013Spinning up: `scripts/create_container.sh`
Leopold Schabel5c80aca2019-10-22 15:48:58 +020014
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020015Spinning down: `scripts/destroy_container.sh`
16
Leopold Schabel8b9c0552019-11-15 14:07:45 +010017Running commands: `scripts/run_in_container.sh <...>`
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020018
Leopold Schabel8b9c0552019-11-15 14:07:45 +010019Using bazel using a wrapper script: `scripts/bin/bazel <...>` (add to your local $PATH for convenience)
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020020
Leopold Schabel8b9c0552019-11-15 14:07:45 +010021#### IntelliJ
22
23This repository is compatible with the IntelliJ Bazel plugin. All commands run inside the container, and
24necessary paths are mapped into the container.
25
26We check the entire .ijwb project directory into the repository, which requires everyone to use the latest
27version of both IntelliJ and the Bazel plugin, but eliminates manual setup steps.
28
29The following steps are necessary:
30
31- Install Google's official Bazel plugin in IntelliJ.
32
33- Add the absolute path to your ~/.cache/bazel-nxt folder to your idea64.vmoptions (Help Edit Custom VM Options)
34 and restart IntelliJ:
35
36 `-Dbazel.bep.path=/home/leopold/.cache/bazel-nxt`
37
38- Set "*Bazel Binary Location*" in Other Settings Bazel Settings to the absolute path of scripts/bin/bazel.
39 This is a wrapper that will execute Bazel inside the container.
40
41- Open the `.ijwb` folder as IntelliJ project.
42
43- Disable Vgo support for the project.
44
45- Run a non-incremental sync in IntelliJ
46
47The plugin will automatically resolve paths for generated files.
48
49If you do not use IntelliJ, you need to use the scripts/bazel_copy_generated_for_ide.sh script to copy files locally.