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

Using travis as build tool? #139

Closed
gossi opened this issue Aug 14, 2015 · 23 comments
Closed

Using travis as build tool? #139

gossi opened this issue Aug 14, 2015 · 23 comments

Comments

@gossi
Copy link
Member

gossi commented Aug 14, 2015

At the moment, felix little script runs on the IUF server to build the rulebook-pdf on-the-fly. I did a little reasearch, it should be possible to use travis-ci.org as build tool for latex. I just want to throw it in, as an alternative (search for 'travis latex' on google, gives some results). With #138 and multi-lingual versions, this might be worth looking into as it wouldn't anybody to change the build-script on the server... it can stay with the repo.

@scotthue
Copy link
Member

scotthue commented Sep 3, 2015

A quick google of travis latex did not provide any straight-forward answers.

@fdietze
Copy link
Member

fdietze commented Sep 3, 2015

Travis will work very well in our case. I know how to set it up and can give advice.

@scotthue
Copy link
Member

scotthue commented Sep 6, 2015

I have started setting up travis. Currently it only uses one branch (2015_prelim) and only releases one file (iuf-rulebook.pdf) made from make. Next step is make diff and include that file in the release too. Also, I disabled the gitinfo package to get it to work. Baby steps. Here is the compiled file: https://github.com/iuf/rulebook/releases/tag/build-2015.09.07-00.23

@gossi
Copy link
Member Author

gossi commented Sep 7, 2015

👍

@gossi
Copy link
Member Author

gossi commented Sep 7, 2015

Instead of creating a release every time this built is run. It can be "uploaded" to the iuf's github website. The pdfs would then be available at iuf.github.io/<whatever-filename-you-choose-here>.pdf so could be sth like latest.pdf, diff2013-2015.pdf, version-2013.pdf, version-2015.pdf, ... well you get the idea. We can even create a rewrite rule on the iuf-server so https://unicycling.org/publications/iuf-rulebook-latest.pdf links to the github page's pdf.

I have a deploy script ready that I use here: https://github.com/gossi/php-code-generator can just be copied and modified for usage here.

What you think?

@scotthue
Copy link
Member

scotthue commented Sep 7, 2015

That sounds good to me.

@scotthue
Copy link
Member

scotthue commented Sep 7, 2015

How can we set this up exactly? (Skype me if you want.)

@gossi
Copy link
Member Author

gossi commented Sep 7, 2015

@fdietze
Copy link
Member

fdietze commented Sep 7, 2015

Do you have time to skype tomorrow at 13:30 CET?
On Sep 7, 2015 5:50 PM, "Thomas Gossmann" [email protected] wrote:

I used this tutorial here:
http://www.steveklabnik.com/automatically_update_github_pages_with_travis_example/


Reply to this email directly or view it on GitHub
#139 (comment).

@scotthue
Copy link
Member

scotthue commented Sep 8, 2015

Potentially. My class officially goes until 2:30 but we're often done
early. I won't know until around 13:00 though most likely.

On Mon, Sep 7, 2015 at 18:56 Felix Dietze [email protected] wrote:

Do you have time to skype tomorrow at 13:30 CET?
On Sep 7, 2015 5:50 PM, "Thomas Gossmann" [email protected]
wrote:

I used this tutorial here:

http://www.steveklabnik.com/automatically_update_github_pages_with_travis_example/


Reply to this email directly or view it on GitHub
#139 (comment).


Reply to this email directly or view it on GitHub
#139 (comment).

@scotthue
Copy link
Member

scotthue commented Sep 8, 2015

I will be available today.
On Tue, Sep 8, 2015 at 08:14 Scott Wilton [email protected] wrote:

Potentially. My class officially goes until 2:30 but we're often done
early. I won't know until around 13:00 though most likely.

On Mon, Sep 7, 2015 at 18:56 Felix Dietze [email protected]
wrote:

Do you have time to skype tomorrow at 13:30 CET?
On Sep 7, 2015 5:50 PM, "Thomas Gossmann" [email protected]
wrote:

I used this tutorial here:

http://www.steveklabnik.com/automatically_update_github_pages_with_travis_example/


Reply to this email directly or view it on GitHub
#139 (comment).


Reply to this email directly or view it on GitHub
#139 (comment).

@scotthue
Copy link
Member

scotthue commented Sep 8, 2015

Status update:

I have rebased the travis branch with all of the commits we currently have. It is now only one commit. I force pushed that commit to github so pull again before continuing work.

I have reset the 2015_prelim branch to remove all of the travis work. I forced push that. Pull again if you need to change the actual rulebook at all.

Travis still creates the weird first page. It's likely the result of the gitinfo2 package but I haven't tested that theory.

Travis can now successfully install latexdiff and rcs-latexdiff. It then successfully make the rulebook and upload it.

It is now getting stuck on make diff. The problem is that travis is only checking out one branch of the git repo but latexdiff needs the other branches in order to run. @gossi and I attempted to pull in the other remote branches, but this does not seem successful. I have yet to find a solution to this. I am stopping for tonight.

@gossi
Copy link
Member Author

gossi commented Sep 8, 2015

after watching the .travis.yml again, we really should create a scripts folder and move the appropriate parts into their own scripts (install, run, after_success), because these commands look messy and unreadable in yml format.

@gossi
Copy link
Member Author

gossi commented Sep 9, 2015

Update:

The parts are now moved into their own script in scripts/ folder. Checking out the required branches for diff works. The $PATH needs to stay in .travis.yml because scripts run in their own encapsulated environment.

Problem now: The Makefile has too much variables... no really too much. That prohibits to find the correct target after the diff task is ran.

From travis:

make ./out/iuf-rulebook-diff-2013-travis.pdf
make[1]: Entering directory `/home/travis/build/iuf/rulebook'
make[1]: *** No rule to make target `out/iuf-rulebook-diff-2013-travis.pdf'.  Stop.
make[1]: Leaving directory `/home/travis/build/iuf/rulebook'
make: *** [diff] Error 2

@fdietze: Need help!

@fdietze
Copy link
Member

fdietze commented Dec 25, 2015

In theory it's working now, but the generated diff does not compile.
log: https://s3.amazonaws.com/archive.travis-ci.org/jobs/98687375/log.txt
generated diff-tex: https://unicycling.org/files/temp/upload/iuf-rulebook-travis-diff-2013.tex

The diff build ends with:

[...]
Missing character: There is no I in font nullfont!
./src/iuf-rulebook-travis-diff-2013.tex:3406: Dimension too large.
\UL@on ...hr@@ \dimen@ \advance \dimen@ -\ULdepth 
                                                  \setbox \UL@box \hbox {{#1...
l.3406 }
        \end{judging_items} &
(That makes 100 errors; please try again.) 
Here is how much of TeX's memory you used:
 9838 strings out of 495061
 144024 string characters out of 1182620
 425197 words of memory out of 3000000
 12349 multiletter control sequences out of 15000+50000
 61033 words of font info for 43 fonts, out of 3000000 for 9000
 28 hyphenation exceptions out of 8191
 45i,11n,43p,847b,722s stack positions out of 5000i,500n,10000p,200000b,50000s

./src/iuf-rulebook-travis-diff-2013.tex:3406:  ==> Fatal error occurred, no out
put PDF file produced!

My guess is that the latex code has some unclosed blocks, which somehow works in the normal build, but breaks the diff. @scotthue @gossi, please take a closer look at the tex code and build logs in the branches travis/2013 and the generated diff to identify and fix the issues.

@scotthue
Copy link
Member

I tried to look at the log briefly this evening and didn't get anywhere. The length of the log file makes it very difficult to find the problems. Way too many latex warnings and stuff. Maybe we can run things in a more "quiet" mode?

@scotthue
Copy link
Member

I'm confused. In the install.sh script it looks like we are installing latexdiff and not rcs-latexdiff. However, the diff file that @fdietze links to above is generated by rcs-latexdiff to the best I can tell. It's hard to figure out why the diff doesn't compile if I don't know which diff package we're using. Help?

@fdietze
Copy link
Member

fdietze commented Jan 18, 2016

By now, latexdiff can do everything we needed rcs-latexdiff for.

@scotthue
Copy link
Member

Fine, but why does rcs-latexdiff show up in the log then?

On Mon, Jan 18, 2016 at 7:11 PM Felix Dietze [email protected]
wrote:

By now, latexdiff can do everything we needed rcs-latexdiff for.


Reply to this email directly or view it on GitHub
#139 (comment).

@fdietze
Copy link
Member

fdietze commented Jan 18, 2016

Make is printing its contents. There is a commented line which contains rcs-latexdiff.

@fdietze
Copy link
Member

fdietze commented Jan 18, 2016

I put 6503abd (commit before gossis prelim commit) into diff-branches. Locally this produces a diff for me. But on travis it doesn't:
https://unicycling.org/files/temp/upload/iuf-rulebook-travis-diff-6503abd.log

@fdietze
Copy link
Member

fdietze commented Jan 18, 2016

It's a problem with gitinfo:

! LaTeX Error: File `gitinfo.sty' not found.

@scotthue
Copy link
Member

We are using travis now.

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

No branches or pull requests

3 participants