All Projects → ejholmes → Walk

ejholmes / Walk

Licence: mit
A fast, general purpose, graph based build and task execution utility.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Walk

makesure
Simple task/command runner with declarative goals and dependencies
Stars: ✭ 230 (+112.96%)
Mutual labels:  build-automation, build-tool, make, build-system
Zeus
An Electrifying Build System
Stars: ✭ 176 (+62.96%)
Mutual labels:  build-tool, build-automation, make
Reggae
Build system in D, Python, Ruby, Javascript or Lua
Stars: ✭ 141 (+30.56%)
Mutual labels:  build-tool, build-system, make
Flubucore
A cross platform build and deployment automation system for building projects and executing deployment scripts using C# code.
Stars: ✭ 695 (+543.52%)
Mutual labels:  build-tool, build-automation, build-system
Hopp
Crazy rapid build system.
Stars: ✭ 24 (-77.78%)
Mutual labels:  build-tool, build-automation, build-system
Mmake
Mmake is a small program which wraps make to provide additional functionality, such as user-friendly help output, remote includes, and eventually more. It otherwise acts as a pass-through to standard make.
Stars: ✭ 1,593 (+1375%)
Mutual labels:  build-tool, build-system, make
Phing
PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant.
Stars: ✭ 1,085 (+904.63%)
Mutual labels:  build-tool, build-automation, make
Build Harness
🤖Collection of Makefiles to facilitate building Golang projects, Dockerfiles, Helm charts, and more
Stars: ✭ 236 (+118.52%)
Mutual labels:  build-tool, build-automation, build-system
build
Build system scripts based on GENie (https://github.com/bkaradzic/genie) project generator
Stars: ✭ 30 (-72.22%)
Mutual labels:  build-automation, build-tool, build-system
jagen
A software engineer's workspace manager and build systems wrapper
Stars: ✭ 32 (-70.37%)
Mutual labels:  build-automation, build-tool, build-system
obs-docu
Official Open Build Service Documentation. Content gets reviewed and edited. Generated books are available at http://www.openbuildservice.org
Stars: ✭ 26 (-75.93%)
Mutual labels:  build-automation, build-tool, build-system
Cargo Make
Rust task runner and build tool.
Stars: ✭ 895 (+728.7%)
Mutual labels:  build-tool, build-automation, make
Earthly
Repeatable builds
Stars: ✭ 5,805 (+5275%)
Mutual labels:  build-automation, build-tool, build-system
Arduino Cmake Ng
CMake-Based framework for Arduino platforms
Stars: ✭ 123 (+13.89%)
Mutual labels:  build-tool, build-system, make
make
The Ultimate Makefile to compile all your C, C++, Assembly and Fortran projects
Stars: ✭ 41 (-62.04%)
Mutual labels:  build-tool, make, build-system
Cbt
CBT - fun, fast, intuitive, compositional, statically checked builds written in Scala
Stars: ✭ 489 (+352.78%)
Mutual labels:  build-tool, build-automation, build-system
Buildpipeline
AWS-powered serverless build, test and deploy pipeline ft. multiple environments
Stars: ✭ 105 (-2.78%)
Mutual labels:  build-tool, build-automation, infrastructure
Swift Llbuild
A low-level build system, used by Xcode and the Swift Package Manager
Stars: ✭ 836 (+674.07%)
Mutual labels:  build-tool, build-system
Pi Builder
Extensible tool to build Arch Linux ARM for Raspberry Pi on x86_64 host using Docker
Stars: ✭ 31 (-71.3%)
Mutual labels:  build-tool, build-system
Toast
Containerize your development and continuous integration environments. 🥂
Stars: ✭ 748 (+592.59%)
Mutual labels:  build-tool, build-system

Walk

Build Status Go Report Card Latest Version

walk is a fast, general purpose, graph based build and task execution utility.

Heavily inspired by make and redo.

Features

  • Fast parallel execution.
  • Graph based dependency management.
  • Maximum composability with existing UNIX tooling.
  • Describe targets and their dependencies as simple executables.
  • Universal execution; execute walk from any directory.

Installation

Using Go 1.7+:

$ go get -u github.com/ejholmes/walk

Or grab the latest release from https://github.com/ejholmes/walk/releases.

Usage

walk is built on top of a very simple concept; when you want to build a target, walk executes a file called Walkfile to determine:

  1. What other targets the given target depends on.
  2. How to build the target.

For example, if you wanted to build a program called prog from main.c and parse.c, you might write a Walkfile like this:

#!/bin/bash

# The first argument is the "phase", which will either be `deps` or `exec`. In
# the `deps` phase, the Walkfile should print the name of the targets that this
# target depends on.
phase=$1

# The second argument is the name of the target, like `prog`, `parse.o`, etc.
target=$2

case $target in
  prog)
    case $phase in
      # Prog depends on the object files we'll build from source. We simply
      # print each dependency on a single line.
      deps)
        echo main.o
        echo parse.o
        ;;
      exec) exec gcc -Wall -o $target $($0 deps $target) ;;
    esac ;;

  # A generic recipe for building a .o file from a corresponding .c file.
  *.o)
    case $phase in
      deps) echo ${target//.o/.c} ;;
      exec) exec gcc -Wall -o $target -c $($0 deps $target) ;;
    esac ;;

  # When invoking walk(1) without any arguments, it defaults to a target called
  # `all`.
  all)
    case $phase in
      deps) echo prog ;;
    esac ;;

  # In general, it's good practice to include a fallback rule like this, in
  # case someone tries to build a target that we don't know how to build (or
  # someone makes a typo).
  *.c|*.h) ;; # static files
  *) >&2 echo "No rule for target \"$target\"" && exit 1 ;;
esac

When you execute walk all, the following happens internally:

  1. walk resolves all of the dependencies, and builds a graph:

    $ Walkfile deps all
    prog
    $ Walkfile deps prog
    parse.o
    main.o
    $ Walkfile deps parse.o
    parse.c
    $ Walkfile deps main.o
    main.c
    $ Walkfile deps parse.c
    $ Walkfile deps main.c
    
  2. walk executes all of the targets, starting with dependencies:

    $ Walkfile exec parse.c
    $ Walkfile exec main.c
    $ Walkfile exec main.o
    $ Walkfile exec parse.o
    $ Walkfile exec prog
    $ Walkfile exec all
    

Ultimately, all of our targets end up getting invoked, and prog is built:

$ walk
ok	main.c
ok	parse.c
ok	parse.o
ok	main.o
ok	prog
ok	all

We can print the dependency graph to verify that our dependency chain is what we expect:

$ walk -p dot
digraph {
  "(root)" -> "all"
  "all" -> "prog"
  "prog" -> "main.o"
  "prog" -> "parse.o"
  "parse.o" -> "parse.c"
  "main.o" -> "main.c"
}

And that's it. Wait, that's it? That's it. walk is quite simply, just syntactic sugar over executing a binary as a graph.

See also man walk.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].