Kokoro: Check lint and doxygen

Move the doxygen CMake output from `out/docs` to `<build>/docs`
`out/docs` requires a GN build or manual directory creation.

Fixed: tint:791
Change-Id: If072f962f444a2d60c368d7c38fd1bb4c5b97caf
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/50309
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0c9e443..8eb4e45 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -124,7 +124,9 @@
   find_package(Doxygen)
   if(DOXYGEN_FOUND)
     add_custom_target(tint-docs ALL
-        COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile
+        COMMAND ${CMAKE_COMMAND}
+          -E env "DOXYGEN_OUTPUT_DIRECTORY=${CMAKE_BINARY_DIR}/docs"
+          ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile
         WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
         COMMENT "Generating API documentation"
         VERBATIM)
diff --git a/Doxyfile b/Doxyfile
index f6fcbb8..028d0ef 100644
--- a/Doxyfile
+++ b/Doxyfile
@@ -58,7 +58,7 @@
 # entered, it will be relative to the location where doxygen was started. If
 # left blank the current directory will be used.
 
-OUTPUT_DIRECTORY       = out/docs
+OUTPUT_DIRECTORY       = $(DOXYGEN_OUTPUT_DIRECTORY)
 
 # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
 # directories (in 2 levels) under the output directory of each output format and
diff --git a/kokoro/linux/docker.sh b/kokoro/linux/docker.sh
index 516518e..37376b1 100755
--- a/kokoro/linux/docker.sh
+++ b/kokoro/linux/docker.sh
@@ -59,6 +59,8 @@
 . /bin/using.sh # Declare the bash `using` function for configuring toolchains.
 
 using depot_tools
+using go-1.14.4      # Speeds up ./tools/lint
+using doxygen-1.8.18
 
 status "Cloning to clean source directory"
 # We do this so that the docker script can be tested in a local development
@@ -72,6 +74,9 @@
 cp standalone.gclient .gclient
 with_retry gclient sync
 
+status "Linting"
+./tools/lint
+
 status "Configuring build system"
 if [ "$BUILD_SYSTEM" == "cmake" ]; then
     using cmake-3.17.2