Hello,
here I wrote about how I configured my love builds to be done automatically by Travis CI. Maybe it helps somebody too.
It builds .love file, windows .exe and web version from source automatically.
https://medium.com/@premek/autobuild-lo ... .goui8inui
Autobuild LÖVE games on Travis CI
-
- Prole
- Posts: 5
- Joined: Mon Dec 26, 2016 12:44 am
- Contact:
Re: Autobuild LÖVE games on Travis CI
Awesome, was planning on looking into this at some point as well. How do you get the .exe's back out again? S3?
Re: Autobuild LÖVE games on Travis CI
Travis creates .love file, downloads love binary, joins the love.exe with game.love together (which creates the game.exe) and uploads it back to github. You can check it here https://github.com/premek/enjoyhypnoscope wrote:Awesome, was planning on looking into this at some point as well. How do you get the .exe's back out again? S3?
- Positive07
- Party member
- Posts: 1014
- Joined: Sun Aug 12, 2012 4:34 pm
- Location: Argentina
Re: Autobuild LÖVE games on Travis CI
Read the article, it deploys to Github Releases!hypnoscope wrote:Awesome, was planning on looking into this at some point as well. How do you get the .exe's back out again? S3?
I have a very similar script somewhere (if I can't find it I'll write it again) for AppVeyor, but I had intentions to make one for TravisCI in order to deploy to Linux and Mac OSX, the script was something like this:
I first have an environment variable that determines the architecture, that means the script runs twice, once for 32bits and once for 64bits.
It basically downloads LÖVE for the specified architecture, unzipped it, and saved it in cache, downloaded and compiled LuaJIT 2.0.4 (for the specified architecture) and saved it in cache.
Then the script compiled binaries (for said architectures), after that static checks are made to all the .lua files using luacheck, and busted runs the tests (with coverage) on the spec, using the compiled LuaJIT executable.
After tests and checks succeed it creates a .love file with 7z, which gets combined with LÖVE's .exe. After that, rcedit changes the icon and metadata for said .exe.
Then the script creates a .zip file using 7z with: the .exe, all of the .dlls required by LÖVE, and any extra .dlls for the compiled binary modules, that .zip is then deployed to Github Releases
It was a really long script that did many things, yet it was lacking support for LuaRocks/LÖVE-rocks and even if ported to TravisCI I still need to create something that can create .apk's for Android and do something about iOS which I don't think would be an easy thing to deploy to CI tools
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Re: Autobuild LÖVE games on Travis CI
I didn't know rcedit. Thanks! Also I didn't yet explored the android builds of love...Positive07 wrote:...
-
- Prole
- Posts: 5
- Joined: Mon Dec 26, 2016 12:44 am
- Contact:
Re: Autobuild LÖVE games on Travis CI
Cool, sorry I missed that bit in the article! Thought you were just pushing the .js back up, clearly not. Nice one!premek wrote:Travis creates .love file, downloads love binary, joins the love.exe with game.love together (which creates the game.exe) and uploads it back to github. You can check it here https://github.com/premek/enjoyhypnoscope wrote:Awesome, was planning on looking into this at some point as well. How do you get the .exe's back out again? S3?
-
- Party member
- Posts: 234
- Joined: Mon Aug 29, 2016 8:51 am
Re: Autobuild LÖVE games on Travis CI
Any idea on how to write something similar but for gitlab's built in CI?
Re: Autobuild LÖVE games on Travis CI
I don't know gitlab and never used it. But maybe it will be very similar? If they don't have Releases equivalent you can commit the binariesKayleMaster wrote: ↑Sun Apr 01, 2018 8:11 am Any idea on how to write something similar but for gitlab's built in CI?
Re: Autobuild LÖVE games on Travis CI
Please do not commit the binaries. Having to download hundreds of megabytes just to get a ~10MB binary file is awful.
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
-
- Party member
- Posts: 234
- Joined: Mon Aug 29, 2016 8:51 am
Re: Autobuild LÖVE games on Travis CI
This is how a gitlab-ci.yml looks:
I only need CI, no CD. (build and test)
It's naive to expect you to learn gitlab CI's now, but I posted this just in case it's super similar.
EDIT:I found this, I think might be able to make something out of it
https://docs.gitlab.com/ee/ci/yaml/
Code: Select all
image: node:6
build:
stage: build
script:
- npm i gulp -g
- npm i
- gulp
- gulp build-test
cache:
policy: push
paths:
- node_modules/
artifacts:
paths:
- built/
test:
stage: test
script:
- npm i gulp -g
- npm i
- gulp run-test
cache:
policy: pull
paths:
- node_modules/
artifacts:
paths:
- built/
It's naive to expect you to learn gitlab CI's now, but I posted this just in case it's super similar.
EDIT:I found this, I think might be able to make something out of it
https://docs.gitlab.com/ee/ci/yaml/
Who is online
Users browsing this forum: Bing [Bot] and 4 guests