Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complete the new Build System #85

Merged
merged 9 commits into from
Feb 12, 2018
Merged

Complete the new Build System #85

merged 9 commits into from
Feb 12, 2018

Conversation

josephlr
Copy link
Member

@josephlr josephlr commented Feb 11, 2018

@josephlr josephlr force-pushed the depfix branch 2 times, most recently from a5c10a2 to 9bbbdbc Compare February 12, 2018 04:06
Our current build tags set off the linter. We will later add in more
comprehensive build tags that will be properly formatted.
The tests added in this change are trivial, but they make sure that
every package has a non-zero number of tests. This is important for
eventually increasing test coverage.
fscrypt directly depends on 5 repositories (8 packages). This change
adds those dependancies to Gopkg.toml, so that they can be properly
versioned. Note that the golang.org/x repositories do not use semver.
This change updates dependancies to be consistent with Gopkg.toml.
This change was generated by running "dep ensure".
This change ot Gopkg.toml will make it easier to build the linting and
formatting tools. Vendoring their source also makes sure that updates to
these tools do not break the build.
This change vendors the source for all our build, formatting, and
linting tools. Generated by running "dep ensure".
Ideally, we would just use "golint ./..." to check all our our source
files for lint error. However, this does not work because it will
include all packages in the vendor directory. The pull request at:
	golang/lint#325
fixes this issue, so we will use it until the PR has been merged.
This change is a complete rewrite of fscrypt's Makefile.

The new build rules can be roughly divided into secions:
  Build   - bin/fscrypt and bin/pam_fscrypt
  Linting - gen (for .proto files), format, lint
  Test    - test, test-{setup|teardown}, coverage.out
  Install - install, uninstall, install-{bin|pam}
  Tools   - tools and other bin/* needed for the other rules

As before, "make" builds the binary and pam_module, while "make all"
builds and tests everything (except for integration tests), and "make
clean" removes any generated files.

Also note that this new build system:
  - Doesn't require input_fail.py
  - Properly falis on linter errors
  - Builds everything into the bin/ directory (customizable)
  - Builds all the vendored tools
This change rewrites .travis.yml to use many build stages/jobs. This
allows our build to run faster, as almost all jobs run in containers.

Stage 1: Run on all pushes to all branches
  - Job Build: just runs "make" to make sure everything is OK

Stage 2: Run on all PRs and pushes to master
  - Job Lint: Makes sure dep, "make gen", "make format", and "make lint"
              are all happy.
  - Job Build 1: Make sure "go get" and "make" will work. This job will
                 later run unit tests.
  - Job Build 2: Same as Job Build 1, except with another go version.
  - Job Integeration: Run integration tests (needs sudo, so needs VM)

Stage 3: Run on releases (if other stages pass)
  - Job Deploy: Publishes amd64 binaries to GitHub.
@josephlr josephlr merged commit 8b6cbfc into master Feb 12, 2018
@josephlr josephlr deleted the depfix branch February 12, 2018 05:43
josephlr added a commit that referenced this pull request Feb 12, 2018
PR #85 failed to update the documentation. This is now fixed with some
additional cleanup.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant