Skip to content

Commit

Permalink
deps for server
Browse files Browse the repository at this point in the history
  • Loading branch information
wakaba committed Nov 3, 2015
1 parent 46265a6 commit 0e82b9f
Show file tree
Hide file tree
Showing 17 changed files with 185 additions and 7 deletions.
9 changes: 8 additions & 1 deletion .gitignore
Expand Up @@ -4,4 +4,11 @@
.*.BAK
pod2htmi.tmp
pod2htmd.tmp
/html/parsing/html5lib/tmp
/html/parsing/html5lib/tmp
/local/
/perl
/prove
/plackup
/Makefile.setupenv
/cin
/config/perl/libs.txt
35 changes: 32 additions & 3 deletions .gitmodules
@@ -1,3 +1,32 @@
[submodule "modules/manakai"]
path = modules/manakai
url = git://github.com/wakaba/manakai.git
[submodule "modules/wanage"]
path = modules/wanage
url = git://github.com/wakaba/wanage
track = master
[submodule "modules/charclass"]
path = modules/charclass
url = git://github.com/wakaba/perl-charclass
track = master
[submodule "modules/ooutils"]
path = modules/ooutils
url = git://github.com/wakaba/perl-ooutils
track = master
[submodule "modules/web-encodings"]
path = modules/web-encodings
url = git://github.com/manakai/perl-web-encodings
track = master
[submodule "modules/web-url"]
path = modules/web-url
url = git://github.com/manakai/perl-web-url
track = master
[submodule "modules/promised-command"]
path = modules/promised-command
url = git://github.com/wakaba/perl-promised-command
track = master
[submodule "modules/promise"]
path = modules/promise
url = git://github.com/wakaba/perl-promise
track = master
[submodule "modules/twiggy-packed"]
path = modules/twiggy-packed
url = git://github.com/wakaba/perl-twiggy-packed
track = master
64 changes: 62 additions & 2 deletions Makefile
@@ -1,5 +1,65 @@

all:
cd html && $(MAKE) all

WGET = wget
CURL = curl
GIT = git

updatenightly: local/bin/pmbp.pl
$(CURL) -s -S -L https://gist.githubusercontent.com/wakaba/34a71d3137a52abb562d/raw/gistfile1.txt | sh
$(GIT) add modules
perl local/bin/pmbp.pl --update
$(GIT) add config

## ------ Setup ------

deps: always
true # dummy for make -q
ifdef PMBP_HEROKU_BUILDPACK
else
$(MAKE) git-submodules
endif
$(MAKE) pmbp-install

git-submodules:
$(GIT) submodule update --init

PMBP_OPTIONS=

local/bin/pmbp.pl:
mkdir -p local/bin
$(CURL) -s -S -L https://raw.githubusercontent.com/wakaba/perl-setupenv/master/bin/pmbp.pl > $@
pmbp-upgrade: local/bin/pmbp.pl
perl local/bin/pmbp.pl $(PMBP_OPTIONS) --update-pmbp-pl
pmbp-update: git-submodules pmbp-upgrade
perl local/bin/pmbp.pl $(PMBP_OPTIONS) --update
pmbp-install: pmbp-upgrade
perl local/bin/pmbp.pl $(PMBP_OPTIONS) --install \
--create-perl-command-shortcut @perl \
--create-perl-command-shortcut @prove \
--create-perl-command-shortcut @plackup=perl\ modules/twiggy-packed/script/plackup

create-commit-for-heroku:
git remote rm origin
rm -fr deps/pmtar/.git deps/pmpp/.git modules/*/.git
git add -f deps/pmtar/* #deps/pmpp/*
#rm -fr ./t_deps/modules
#git rm -r t_deps/modules
git rm .gitmodules
git rm modules/* --cached
git add -f modules/*/*
git commit -m "for heroku"

## ------ Tests ------

PROVE = ./prove

test: test-deps test-main

test-deps: deps

test-main:
#$(PROVE) t/*.t

always:

## License: Public Domain.
1 change: 1 addition & 0 deletions Procfile
@@ -0,0 +1 @@
web: ./plackup -p $PORT -s Twiggy::Prefork support/server.psgi
7 changes: 7 additions & 0 deletions app.json
@@ -0,0 +1,7 @@
{
"name": "tests-web",
"website": "https://github.com/wakaba/tests-web",
"buildpacks": [
{"url": "https://github.com/wakaba/heroku-buildpack-perl-pmbp"}
]
}
29 changes: 29 additions & 0 deletions circle.yml
@@ -0,0 +1,29 @@
dependencies:
override:
- git config --global user.email "temp@circleci.test"
- git config --global user.name "CircleCI"
- make deps
test:
override:
- make test
- ./plackup -p 5114 -t Twiggy::Prefork bin/server.psgi :
background: true
- sleep 10
- curl http://localhost:5114
deployment:
staging:
branch: staging
commands:
- git rev-parse HEAD > head.txt
- curl -f -s -S --request POST --header "Authorization:token $GITHUB_ACCESS_TOKEN" --header "Content-Type:application/json" --data-binary "{\"base\":\"master\",\"head\":\"`cat head.txt`\",\"commit_message\":\"auto-merge staging into master\"}" "https://api.github.com/repos/wakaba/tests-web/merges"
nightly:
branch: nightly
commands:
- git rev-parse HEAD > head.txt
- curl -f -s -S --request POST --header "Authorization:token $GITHUB_ACCESS_TOKEN" --header "Content-Type:application/json" --data-binary "{\"base\":\"master\",\"head\":\"`cat head.txt`\",\"commit_message\":\"auto-merge nightly into master\"}" "https://api.github.com/repos/wakaba/tests-web/merges"
heroku:
branch: master
commands:
- "[[ ! -s \"$(git rev-parse --git-dir)/shallow\" ]] || git fetch --unshallow"
- make create-commit-for-heroku
- git push git@heroku.com:web-tests.git +`git rev-parse HEAD`:refs/heads/master
18 changes: 18 additions & 0 deletions config/perl/pmb-install.txt
@@ -0,0 +1,18 @@
Scalar::Util~1.42
Pod::Usage~1.67
IO::Handle~1.28
Test::NoWarnings~1.04
Unicode::Normalize~1.23
Encode~2.78
AnyEvent::Util
Time::Local~1.2300
parent~0.234
Exporter::Lite~0.06
Time::HiRes~1.9726
Exporter~5.72
Carp~1.36
Proc::Wait3~0.04
MIME::Base64~3.15
File::Temp~0.2304
Path::Class~0.35
Unicode::Stringprep~1.105
20 changes: 20 additions & 0 deletions config/perl/pmbp-exclusions.txt
@@ -0,0 +1,20 @@
- "../../modules/json-functions-xs" tests
- "../../modules/json-ps" tests
- "../../modules/web-encodings" tests build
- "../../modules/web-url" tests build
- "../../modules/web-dom" tests build
- "../../modules/web-css" tests build
- "../../modules/web-markup" tests build
- "../../modules/web-useragent-functions" tests lwp anyeventsocks oauth wsse cli testws curl
- "../../modules/wanage" tests build datetime mp
- "../../modules/temma" tests
- "../../modules/ooutils" tests classdiamondgenerator classregistry objectcachesmethod operationresponse test
- "../../modules/charclass" tests build
- "../../modules/web-utils" tests
- "../../modules/mediawiki-parser" tests web
- "../../modules/promise" tests
- "../../modules/promised-file" tests
- "../../modules/promised-command" tests
- "../../modules/twiggy-packed" tests
- "../../t_deps/modules/test-x1" tests
- "../../modules/promised-plackup" tests
1 change: 1 addition & 0 deletions modules/charclass
Submodule charclass added at 8d9dd5
1 change: 0 additions & 1 deletion modules/manakai
Submodule manakai deleted from 8487d3
1 change: 1 addition & 0 deletions modules/ooutils
Submodule ooutils added at de37e7
1 change: 1 addition & 0 deletions modules/promise
Submodule promise added at 536eb8
1 change: 1 addition & 0 deletions modules/promised-command
Submodule promised-command added at 6c3fee
1 change: 1 addition & 0 deletions modules/twiggy-packed
Submodule twiggy-packed added at 558687
1 change: 1 addition & 0 deletions modules/wanage
Submodule wanage added at 9b8c65
1 change: 1 addition & 0 deletions modules/web-encodings
Submodule web-encodings added at a5a354
1 change: 1 addition & 0 deletions modules/web-url
Submodule web-url added at ab05cd

0 comments on commit 0e82b9f

Please sign in to comment.