Closed starius closed 8 years ago
Not yet. I'll take a look at how it is done in batch and will try to reimplement it in Python.
It's workingpm master branch, at least when using visual studio, example appveyor.yml.
Things that lua-appveyor-example does that hererocks should also do:
Things that lua-appveyor-example does that hererocks can't do because they are appveyor specific:
Can you provide flag (e.g., --mode appveyor
) which would apply appveyor-specific customizations, please?
I think hererocks should just detect existing visual studio version just like luarocks installer does it. Luarocks will then configure itself to run corresponding paths setup script on start up. See https://ci.appveyor.com/project/mpeterv/hererocks/build/1.0.52.
So Appveyor provides all VS studios + Mingw already, regardless of configuration. Autodetection doesn't work then. I've implemented an ugly way for hererocks to run some path set-up command though, so an extra set_compiler_env.bat file like lua-appveyor-example uses shouldn't be necessary.
I still don't want to add an appveyor specific option reading toolchain configuration from %configuration% and %platform%, but we could have a generic option playing nicely with these environment variables. E.g.
hererocks lua_install --%LUA% --luarocks 2.3 --target %Configuration% --arch %platform%
I still don't want to add an appveyor specific option reading toolchain configuration from %configuration% and %platform%, but we could have a generic option playing nicely with these environment variables.
Looks good to me.
At this point on master branch this should work for Appveyor:
environment:
matrix:
- Lua: lua 5.1
- Lua: lua 5.2
- Lua: lua 5.3
- Lua: luajit 2.0
configuration:
- mingw
- vs08_32
- vs10_32
- vs12_32
- vs12_64
- vs13_32
- vs13_64
- vs15_32
- vs15_64
build_script:
- PATH %CD%\here\bin;C:\mingw\bin;%PATH%
- python hererocks.py here --%Lua% --luarocks ^^ --target=%Configuration%
Although for most projects testing all combinations like that is an overkill.
This is almost enough for use with Appveyor (need to configure cmake generator), so I'll close this and split remaining tasks into several issues.
I tried this new option for my repo, but it failed: https://ci.appveyor.com/project/starius/lua-npge/build/0.0.1.180-test
Problems:
gcc
despite target is set to vs
and configuration is passed to hererocks
by --target
flag.You are fetching from latest
branch which is an alias for 0.6.2, try master
Also format for target changed, try
configuration:
- mingw
- vs_32
- vs_64
and remove platform section
In https://ci.appveyor.com/project/starius/lua-npge/build/0.0.1.187-test one of jobs completed successfully.
LuaJIT on 32 bit used to crash before this as well (because of using C++ exceptions, I think) and was muted with allow_failures
.
Other errors seem to be connected to line ends on Windows. I'll try to isolate this problem in a branch of your repo.
Some errors were caused by the bug in Lua 5.3.2.
Other errors are bugs in lua-npge itself (I forgot about \r
).
MinGW jobs are green now. Visual Studio jobs are still failing, I'm investigating it.
I added debugging prints and found that io.lines() sometimes omits a newline!
An external tool (io.popen) produces lines separated by \n
. Two lines in the middle of the output are returned by io.lines() as one line.
Visual Studio (bug):
https://ci.appveyor.com/project/starius/lua-npge/build/0.0.1.193-test/job/ow2wr7veycmo2glw#L624
LINE Query 361 ATGCATGCATGCATGCATGCATGCATGCATGCATGCAT 398
LINE ||||||||||||||||||||||||||||||||||||||Sbjct 38 ATGCATGCATGCATGCATGCATGCATGCATGCATGCAT 1
LINE
LINE
LINE Score = 719 bits (796), Expect = 0.0
Line break before Sbjct
was omitted.
MinGW (no bug):
https://ci.appveyor.com/project/starius/lua-npge/build/0.0.1.193-test/job/g7h98l8oi93x2hx1#L527
LINE Query 361 ATGCATGCATGCATGCATGCATGCATGCATGCATGCAT 398
LINE ||||||||||||||||||||||||||||||||||||||
LINE Sbjct 38 ATGCATGCATGCATGCATGCATGCATGCATGCATGCAT 1
LINE
LINE
LINE Score = 719 bits (796), Expect = 0.0
The output in JSON: https://ci.appveyor.com/project/starius/lua-npge/build/job/nndy5q2yq2uh13f5
I'm adding "b" to popen flags.
Adding "b" to popen flags helps: https://ci.appveyor.com/project/starius/lua-npge/build/0.0.1.200-test It is important to add "b" to popen flags on Windows, but not to add it on other systems, because they can return "Invalid argument" error.
One job is broken (32bit, VS, LuaJIT). It was broken before. Probably I miss something when dealing with C++ exceptions and Lua erorrs. I'll try to isolate it. It is not related to hererocks.
Great work! I think, i'll replace bash scripts with hererocks in my projects. (They are based on lua-travis-example.) However I have not only Bash scripts but also Batch scripts to automate exactly the same thing on Windows (and on AppVeyor). Batch scripts are based on lua-appveyor-example. Can I use hererocks in AppVeyor?