-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.appveyor.yml
39 lines (33 loc) · 1.3 KB
/
.appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
image: ubuntu1804
services:
- docker
branches:
only:
- master
environment:
access_token:
secure: 1Ep5ZXTk0f1AbqY1xVTGnHWDEEBnSm2RnlExqhH0AsAPS1cRYl9aJRHDonSioUOD
before_build:
- docker run -di --name emscripten -v $(pwd):/src trzeci/emscripten:sdk-incoming-64bit bash
build_script:
# Pre-build tests
- mkdir ../out
- clang -std=c11 -Weverything -Werror -Wno-language-extension-token -DDEBUG -o ../out/tour src/tour.c test/tour_tb.c
- ../out/tour
# Build script
- docker exec -i emscripten emcc -std=c11 -Weverything -Werror -Wno-unused-function -Wno-language-extension-token -O2 -s ASSERTIONS=1 -s EXPORTED_FUNCTIONS='["_getNextPointSerialize"]' -s EXTRA_EXPORTED_RUNTIME_METHODS='["ccall","cwrap"]' -o tour.js src/tour.c
- mv -f tour.js tour.wasm ../out
on_success:
- git config --global credential.helper store
- echo "https://${access_token}:[email protected]" >> ~/.git-credentials
- git config --global user.email "[email protected]"
- git config --global user.name "sgalal"
- git checkout gh-pages
- git checkout master -- index.html index.js index.css forkme_right_red_aa0000.png
- mv -f ../out/tour.js ../out/tour.wasm .
- git add .
- |
if [ -n "$(git status --porcelain)" ]; then
git commit -m "Deploy $APPVEYOR_REPO_COMMIT by AppVeyor"
git push origin gh-pages
fi