Skip to content

Commit 1c9f6f2

Browse files
authored
Travis-CI integration for building the core HTML spec (WebAssembly#638)
* Travis-CI integration for building the core HTML spec * Use sudo for installing sphinx :( * Use Makefile for CI build, including pdf TeX is installed with texlive-full package; maybe there is a smaller package that would be adequate. * Apply @rossberg's makefile code review advice
1 parent 5041628 commit 1c9f6f2

File tree

2 files changed

+15
-25
lines changed

2 files changed

+15
-25
lines changed

.travis.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
language: c++
22

3-
sudo: off
3+
sudo: on
44

5-
install: ./interpreter/meta/travis/install-ocaml.sh
5+
install:
6+
- ./interpreter/meta/travis/install-ocaml.sh
7+
- sudo pip install sphinx
8+
- sudo apt-get install texlive-full
69

710
script:
811
- ./interpreter/meta/travis/build-test.sh
912
- bash ./document/travis-deploy.sh
1013

11-
os:
12-
- linux
13-
- osx
14+
os: linux
1415

1516
env:
1617
global:

document/travis-deploy.sh

+9-20
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,12 @@ TARGET_BRANCH="gh-pages"
99

1010
function doCompile {
1111
# TODO(littledan): Integrate with document/deploy.sh
12-
cd document/js-api
13-
make
14-
cd ../web-api
15-
make
16-
cd ../../out
17-
if [[ ! -e js-api ]]; then mkdir js-api; fi
18-
mv ../document/js-api/_build/html/index.html js-api/index.html
19-
git add js-api/index.html
20-
if [[ ! -e web-api ]]; then mkdir web-api; fi
21-
mv ../document/web-api/_build/html/index.html web-api/index.html
22-
git add web-api/index.html
23-
cd ../
12+
(cd document; make)
2413
}
2514

2615
# Pull requests and commits to other branches shouldn't try to deploy, just build to verify
2716
if [[ "$TRAVIS_PULL_REQUEST" != "false" || "$TRAVIS_BRANCH" != "$SOURCE_BRANCH" ]]; then
2817
echo "Skipping deploy; just doing a build."
29-
mkdir out
3018
doCompile
3119
exit 0
3220
fi
@@ -48,19 +36,20 @@ ssh-add deploy_key || true
4836

4937
# Clone the existing gh-pages for this repo into out/
5038
# Create a new empty branch if gh-pages doesn't exist yet (should only happen on first deply)
51-
git clone $REPO out
52-
cd out
53-
git checkout $TARGET_BRANCH || git checkout --orphan $TARGET_BRANCH
39+
git clone $REPO document/_build
40+
(
41+
cd document/_build
42+
git checkout $TARGET_BRANCH || git checkout --orphan $TARGET_BRANCH
5443

55-
# Clean out existing contents
56-
git reset --hard
44+
# Clean out existing contents
45+
git reset --hard
46+
)
5747

5848
# Run our compile script
59-
cd ..
6049
doCompile
6150

6251
# Now let's go have some fun with the cloned repo
63-
cd out
52+
cd document/_build
6453
git config user.name "Travis CI"
6554
git config user.email "$COMMIT_AUTHOR_EMAIL"
6655

0 commit comments

Comments
 (0)