-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
update Makefile for macosX installation about using luajit building deps #217
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
c0bf845
update Makefile for macosx installation about using luait building deps
idevz 2fb0a48
update .gitignore to exclude nginx's tmp dirs
idevz 90112de
update travis for macosx
idevz a79f646
update travis for macosx
idevz ad57125
Merge branch 'master' into idevz
idevz 0d3aa6c
update travis for macosx
idevz 4e78b61
Merge branch 'idevz' of https://github.com/iresty/apisix into idevz
idevz 29d07e9
update travis for macosx
idevz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,3 +47,8 @@ go | |
\.* | ||
conf/apisix.uid | ||
deps | ||
scgi_temp | ||
uwsgi_temp | ||
proxy_temp | ||
fastcgi_temp | ||
client_body_temp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
#!/usr/bin/env bash | ||
|
||
### BEGIN ### | ||
# Author: idevz | ||
# Since: 08:52:47 2019/07/08 | ||
# Description: travis_runnerz_linux.sh | ||
# travis_runner_linux ./travis_runner_linux.sh | ||
# | ||
# Environment variables that control this script: | ||
# | ||
### END ### | ||
|
||
set -ex | ||
|
||
export_or_prefix() { | ||
export OPENRESTY_PREFIX="/usr/local/openresty-debug" | ||
} | ||
|
||
before_install() { | ||
sudo cpanm --notest Test::Nginx IPC::Run >build.log 2>&1 || (cat build.log && exit 1) | ||
sudo luarocks install --lua-dir=/usr/local/openresty/luajit luacov-coveralls | ||
} | ||
|
||
do_install() { | ||
wget -qO - https://openresty.org/package/pubkey.gpg | sudo apt-key add - | ||
sudo apt-get -y install software-properties-common | ||
sudo add-apt-repository -y "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main" | ||
sudo apt-get update | ||
sudo apt-get install openresty-debug | ||
|
||
export_or_prefix | ||
|
||
sudo luarocks install --lua-dir=${OPENRESTY_PREFIX}luajit apisix-*.rockspec --only-deps | ||
|
||
git clone https://github.com/openresty/test-nginx.git test-nginx | ||
} | ||
|
||
script() { | ||
export_or_prefix | ||
export PATH=$OPENRESTY_PREFIX/nginx/sbin:$OPENRESTY_PREFIX/luajit/bin:$OPENRESTY_PREFIX/bin:$PATH | ||
sudo service etcd start | ||
./bin/apisix help | ||
./bin/apisix init | ||
./bin/apisix init_etcd | ||
./bin/apisix start | ||
mkdir -p logs | ||
sleep 1 | ||
./bin/apisix stop | ||
sleep 1 | ||
make check || exit 1 | ||
APISIX_ENABLE_LUACOV=1 prove -Itest-nginx/lib -r t | ||
} | ||
|
||
after_success() { | ||
luacov-coveralls | ||
} | ||
|
||
case_opt=$1 | ||
shift | ||
|
||
case ${case_opt} in | ||
before_install) | ||
before_install "$@" | ||
;; | ||
do_install) | ||
do_install "$@" | ||
;; | ||
script) | ||
script "$@" | ||
;; | ||
after_success) | ||
after_success "$@" | ||
;; | ||
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
#!/usr/bin/env bash | ||
|
||
### BEGIN ### | ||
# Author: idevz | ||
# Since: 08:52:47 2019/07/08 | ||
# Description: travis_runner_osx.sh | ||
# travis_runner_osx ./travis_runner_osx.sh | ||
# | ||
# Environment variables that control this script: | ||
# | ||
### END ### | ||
|
||
set -ex | ||
|
||
export_or_prefix() { | ||
export OPENRESTY_PREFIX=$(TMP='./v_tmp' && $(which openresty) -V &>${TMP} && | ||
cat ${TMP} | grep prefix | grep -Eo 'prefix=(.*?)/nginx' | | ||
grep -Eo '/.*/' && rm ${TMP}) | ||
} | ||
|
||
before_install() { | ||
HOMEBREW_NO_AUTO_UPDATE=1 brew install perl cpanminus etcd luarocks openresty/brew/openresty-debug tree | ||
sudo cpanm --notest Test::Nginx IPC::Run >build.log 2>&1 || (cat build.log && exit 1) | ||
export_or_prefix | ||
luarocks install --lua-dir=${OPENRESTY_PREFIX}luajit luacov-coveralls --local --tree=deps | ||
} | ||
|
||
do_install() { | ||
export_or_prefix | ||
|
||
make dev | ||
|
||
git clone https://github.com/openresty/test-nginx.git test-nginx | ||
} | ||
|
||
script() { | ||
export_or_prefix | ||
export PATH=$OPENRESTY_PREFIX/nginx/sbin:$OPENRESTY_PREFIX/luajit/bin:$OPENRESTY_PREFIX/bin:$PATH | ||
|
||
luarocks install luacheck | ||
brew services start etcd | ||
make help | ||
make init | ||
sudo make run | ||
mkdir -p logs | ||
sleep 1 | ||
sudo make stop | ||
|
||
sudo cpanm Test::Nginx | ||
|
||
sleep 1 | ||
make check || exit 1 | ||
|
||
ln -sf $PWD/deps/lib $PWD/deps/lib64 | ||
sudo mkdir -p /usr/local/var/log/nginx/ | ||
sudo touch /usr/local/var/log/nginx/error.log | ||
sudo chmod 777 /usr/local/var/log/nginx/error.log | ||
APISIX_ENABLE_LUACOV=1 prove -Itest-nginx/lib -I./ -r t | ||
# cat $PWD/t/servroot/conf/nginx.conf | ||
# cat /usr/local/var/log/nginx/error.log | ||
} | ||
|
||
after_success() { | ||
$PWD/deps/bin/luacov-coveralls | ||
} | ||
|
||
case_opt=$1 | ||
shift | ||
|
||
case ${case_opt} in | ||
before_install) | ||
before_install "$@" | ||
;; | ||
do_install) | ||
do_install "$@" | ||
;; | ||
script) | ||
script "$@" | ||
;; | ||
after_success) | ||
after_success "$@" | ||
;; | ||
esac |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'./v_tmp' -> '/tmp/v_tmp', how about this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it doesn't make any sense, the
v_tmp
file will been clean immediately at the end of this command.