forked from sparklemotion/nokogiri
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgumbo.rake
34 lines (26 loc) · 862 Bytes
/
gumbo.rake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# frozen_string_literal: true
namespace "gumbo" do
gtest_pkg = "gumbo-parser/googletest"
gtest_lib = File.join(gtest_pkg, "make/gtest_main.a")
file gtest_lib => gtest_pkg do
sh("make -C gumbo-parser/googletest/make gtest_main.a")
end
file gtest_pkg do
sh(<<~EOF)
curl -L https://github.com/google/googletest/archive/release-1.8.0.tar.gz | \
tar zxf - --strip-components 1 -C gumbo-parser googletest-release-1.8.0/googletest
EOF
end
desc "Run the gumbo parser test suite"
task "test" => gtest_lib do
sh("make -j2 -C gumbo-parser")
end
desc "Clean up after the gumbo parser test suite"
task "clean" do
sh("make -j2 -C gumbo-parser clean")
end
CLOBBER.add(gtest_pkg)
end
desc "Run the gumbo parser test suite"
task "gumbo" => "gumbo:test"
task "clean" => "gumbo:clean" # rubocop:disable Rake/Desc