Skip to content

WIP: [travis] Try splitting two tasks to remove duplicated tasks. #2987

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

Merged
merged 3 commits into from
Jan 14, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,17 @@ before_script:
- ccache --zero-stats --max-size=3G

env:
- CI_TARGETS="all ext" # Job1: Build everything.
- CI_TARGETS="test" # Job2: Test libraries. #### ext_test? adds 5min compile, runs 1 test.
- CI_TARGETS="all" # Job1: Build everything.
- CI_TARGETS="ext" # Job2: Build everything.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be surprised if that were the issue, because surely 'make -j' would know that two identical tasks generated from different top-level targets were identical. I thought it was smart. But I guess we'll see.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sense.

all:
    $(MAKE) checkversion
    $(MAKE) kaldi.mk
    $(MAKE) mklibdir
    $(MAKE) subdirs
    $(MAKE) -C matrix test
    -echo Done
ext: ext_depend $(SUBDIRS) $(EXT_SUBDIRS)
    -echo Done

ext depends explicitly on SUBDIRS in its Makefile targets, while all launches a new make subprocess to $(MAKE) subdirs to fulfill that target.

The subprocess has no idea about the ext target being run by the parent process, so that's why we have cases where optimization.o (for example)is created twice.

I'm not sure why all is defined the way that it is, but I am fairly certain that this change will fix our Travis CI problems.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's because of PR #1409. We need to run the checkversion and kaldi.mk targets before everything else for correctness. The ordering wouldn't be captured if we just did:

all: checkversion kaldi.mk mklibdir subdirs

Because -j can begin running those targets in any order.

- CI_TARGETS="test" # Job3: Test libraries. #### ext_test? adds 5min compile, runs 1 test.

script:
# See http://petereisentraut.blogspot.com/2011/05/ccache-and-clang.html and
# http://peter.eisentraut.org/blog/2014/12/01/ccache-and-clang-part-3/
# for the explanation why extra switches needed for clang with ccache.
- CXX="ccache clang++-3.8 -Qunused-arguments -fcolor-diagnostics -Wno-tautological-compare"
CFLAGS=""
LDFLAGS="-llapack"
LDFLAGS="-llapack -Wl,-fuse-ld=gold"
INCDIRS="$XROOT/usr/include"
LIBDIRS="$XROOT/usr/lib"
tools/extras/travis_script.sh
Expand Down