add travis ci

pull/13/head
ruki 6 years ago
parent e58ad10604
commit 13afbeebd2
No known key found for this signature in database
GPG Key ID: 33341DF9719963FA
  1. 18
      .travis.yml
  2. 23
      scripts/test.lua
  3. 1
      xmake.lua

@ -0,0 +1,18 @@
sudo: false
language: C
os:
- linux
- osx
compiler:
- gcc
- clang
install:
- git clone --branch=repo https://github.com/xmake-io/xmake.git tboox/xmake --depth 1
- cd ./tboox/xmake
- ./scripts/get.sh __local__
- cd -
script:
- xmake l ./scripts/test.lua

@ -0,0 +1,23 @@
function main(...)
local packages = {...}
if #packages == 0 then
local files = os.iorun("git diff --name-only HEAD^")
for _, file in ipairs(files:split('\n'), string.trim) do
if file:find("packages", 1, true) and path.filename(file) == "xmake.lua" then
local package = path.filename(path.directory(file))
table.insert(packages, package)
end
end
table.insert(packages, "tbox")
end
if #packages > 0 then
local workdir = path.join(os.tmpdir(), "xmake-repo")
print(packages)
os.tryrm(workdir)
os.mkdir(workdir)
os.cd(workdir)
os.exec("xmake create test")
os.cd("test")
os.exec("xmake require -f -v -y %s", table.concat(packages, " "))
end
end

@ -4,3 +4,4 @@ set_xmakever("2.2.3")
-- set repository description
set_description("The official package repository of xmake")

Loading…
Cancel
Save