-
-
Notifications
You must be signed in to change notification settings - Fork 817
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4764 from xmake-io/pkgrule
add package rule test
- Loading branch information
Showing
6 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
tests/projects/package/package_rule/repo/packages/f/foo/rules/markdown.lua
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,11 @@ | ||
rule("markdown") | ||
set_extensions(".md") | ||
on_config(function (target) | ||
print("test: config %s", target:name()) | ||
end) | ||
on_build_file(function(target, sourcefile) | ||
print("test: build %s", sourcefile) | ||
end) | ||
after_clean(function (target) | ||
print("test: clean") | ||
end) |
3 changes: 3 additions & 0 deletions
3
tests/projects/package/package_rule/repo/packages/f/foo/xmake.lua
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,3 @@ | ||
package("foo") | ||
on_install(function() | ||
end) |
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,6 @@ | ||
#include <stdio.h> | ||
|
||
int main(int argc, char** argv) { | ||
printf("hello world!\n"); | ||
return 0; | ||
} |
Empty file.
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,12 @@ | ||
function main(t) | ||
|
||
-- freebsd ci is slower | ||
if is_host("bsd") then | ||
return | ||
end | ||
|
||
-- only for x86/x64, because it will take too long time on ci with arm/mips | ||
if os.subarch():startswith("x") or os.subarch() == "i386" then | ||
t:build() | ||
end | ||
end |
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,11 @@ | ||
add_rules("mode.debug", "mode.release") | ||
|
||
add_requires("foo") | ||
add_repositories("myrepo ./repo") | ||
|
||
target("console") | ||
set_kind("binary") | ||
add_files("src/main.cpp", "src/*.md") | ||
add_packages("foo") | ||
add_rules("@foo/markdown") | ||
|