Build Systems and CI

  1. What is build automation?
    Scripting or automating a wide variety of mundane software development tasks
  2. Uses of build automation
    • Compiling code
    • Packaging binaries
    • Running tests
    • Deploying production systems
    • Generating documentation
  3. Examples of build automation software
    • Apache ant
    • Maven
    • Make
    • MSbuild (Visual Studio)
  4. Describe each element in the line of makefile code
    gcc -o prog main.c class.c -I
    • 1. Compiler
    • 2. Executable name
    • 3. Source file
    • 4. Source file
    • 5 Library file
  5. Describe each element in the line of makefile code
    prog: prog.c class.c
    • 1. Target
    • 2. Dependency
    • 3. Dependency
  6. Sections of an apache ant file
    • Properties
    • Cleanup
    • Create structure
    • Compile code
    • Create documentation
    • Deploy system
    • Default action
  7. How does maven relate to apache ant?
    One level of abstraction higher
  8. Properties of Maven
    • Provides pre-defined targets for compiling, running JUnit tests and creating JARs
    • Dynamically downloads java libraries and plugins from repos
  9. What does POM stand for in Maven?
    Project object model
  10. How are POMs in a project related?
    All inherit a super POM
  11. Purpose of POMs
    • Configuring specific parts of the build phases
    • e.g configure compiler plugin to use java 1.5
  12. POM structure in large projects
    • Large projects have multiple POMs
    • Project has a root POM
    • All POMs inherit from a super POM
  13. Components of a maven file
    • Unique project identifier
    • Project dependency
  14. Maven dogma
    • Convention over configuration
    • Default values already defined
    • Only specify unconventional aspects
  15. How does Maven work?
    • All work in maven is done by plug ins
    • Plugins can be made for any build task
    • Plugins provide goals to be executed
  16. Maven plugin syntax
    mvn [pluin name]:[goal]
  17. Maven build lifecycle stages
    • A series of goals:
    • 1. process-resources (download)
    • 2. compile
    • 3. process-test-resources
    • 4. test-compile
    • 5. test
    • 6. package
    • 7. install
    • 8. deploy
  18. How to specify a maven goal to run?
    • mvn [goalname]
    • Runs all goals up to and including that one
  19. How is gradle related to ant and maven?
    Builds on both ant and maven
  20. Gradle dogma
    Convention over configuration
  21. Gradle language
    • Groovy based language
    • Not XML
  22. What is autotools?
    Suite of programming tools to help with cross-platform builds
  23. Autotools tools
    • Autoconf
    • Automake
    • Libtool
  24. Tools autotools depends on
    • Make
    • GCC
    • pkg-cnfig
  25. What does autotools do?
    • Generates a configure script based on a configure.ac file
    • Discovers what tools (compilers) are available
  26. What does automake do?
    • Generates environment specific makefiles
    • Uses a configure file (from autotools)
    • Allows writing a makefile in a high level language
  27. What needs to be provided to automake
    • Name of program
    • List of source code files
    • List of compiler flags
    • List of linker flags
  28. What can automake makefiles do?
    • Compile program
    • Clean
    • install in std dirs
    • uninstall
    • create tarball
    • Test that tarball is self-sufficient
  29. What is the purpose of libtool?
    • Helps manage the creation of static and dynamic libraries across different platforms
    • Not all platforms support dynamic or shared libraries
  30. What is CMake
    • A cross platform build system management tool
    • Same functions as autotools
  31. What does CMake create?
    • Solution files for Windows
    • Makefiles for unix
  32. Dogma of continuous integration
    Integrate early, integrate often
  33. Benefits of continuous integration
    Improves software quality by making quality control continuous through small pieces of effort applied frequently
  34. Outline an automated continuous integration workflow
    • Code change
    • Revision control
    • Continuous integration
    • Build Script
    • Build report
  35. Examples of continuous integration software
    • Bamboo
    • Jenkins
    • CruiseControl
  36. Main idea of continuos integration
    Provide feedback as early as possible
  37. What is continuous integration?
    • A development practice where developers integrate code into a shared repository frequently
    • Several times a day
Author
Ant
ID
353591
Card Set
Build Systems and CI
Description
build
Updated