Merge pull request #56 from petercolberg/master
Fix Travis build and improve build reproducibility
This commit is contained in:
commit
1e411777c5
16
.travis.yml
16
.travis.yml
@ -1,17 +1,21 @@
|
|||||||
language: c
|
language: c
|
||||||
compiler:
|
compiler:
|
||||||
- gcc
|
- gcc
|
||||||
- clang
|
- clang
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
before_install:
|
before_install:
|
||||||
- sudo add-apt-repository ppa:staticfloat/julia-deps -y
|
- sudo add-apt-repository ppa:staticfloat/julia-deps -y
|
||||||
- sudo add-apt-repository ppa:staticfloat/juliareleases -y
|
- sudo add-apt-repository ppa:staticfloat/juliareleases -y
|
||||||
- sudo apt-get update -qq -y
|
- sudo apt-get update -qq -y
|
||||||
- sudo apt-get install libpcre3-dev julia fontforge -y
|
- sudo apt-get install libpcre3-dev julia fontforge -y
|
||||||
script:
|
script:
|
||||||
- make prefix=`pwd`/local install
|
- make prefix=`pwd`/local install
|
||||||
- make check
|
- make check
|
||||||
- make data && diff data/utf8proc_data.c.new utf8proc_data.c
|
- make data && diff data/utf8proc_data.c.new utf8proc_data.c
|
||||||
- (mkdir build_static && cd build_static && cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON && make)
|
- (mkdir build_static && cd build_static && cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON && make)
|
||||||
- (mkdir build_shared && cd build_shared && cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DBUILD_SHARED_LIBS=ON && make)
|
- (mkdir build_shared && cd build_shared && cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DBUILD_SHARED_LIBS=ON && make)
|
||||||
|
env:
|
||||||
|
# use JuliaLang caching (https://github.com/staticfloat/cache.julialang.org)
|
||||||
|
# so that Travis builds do not depend on anyone's flaky servers but our own
|
||||||
|
- URLCACHE=https://cache.e.ip.saba.us/
|
||||||
|
|||||||
@ -9,12 +9,9 @@ RUBY=ruby
|
|||||||
PERL=perl
|
PERL=perl
|
||||||
MAKE=make
|
MAKE=make
|
||||||
JULIA=julia
|
JULIA=julia
|
||||||
|
FONTFORGE=fontforge
|
||||||
CURLFLAGS = --retry 5 --location
|
CURLFLAGS = --retry 5 --location
|
||||||
|
|
||||||
# use JuliaLang caching (https://github.com/staticfloat/cache.julialang.org)
|
|
||||||
# so that Travis builds do not depend on anyone's flaky servers but our own
|
|
||||||
URLCACHE=https://cache.e.ip.saba.us/
|
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
|
||||||
.DELETE_ON_ERROR:
|
.DELETE_ON_ERROR:
|
||||||
@ -25,14 +22,17 @@ utf8proc_data.c.new: data_generator.rb UnicodeData.txt GraphemeBreakProperty.txt
|
|||||||
# GNU Unifont version for font metric calculations:
|
# GNU Unifont version for font metric calculations:
|
||||||
UNIFONT_VERSION=8.0.01
|
UNIFONT_VERSION=8.0.01
|
||||||
|
|
||||||
unifont-$(UNIFONT_VERSION).ttf:
|
unifont.ttf:
|
||||||
$(CURL) $(CURLFLAGS) -o $@ $(URLCACHE)http://unifoundry.com/pub/unifont-$(UNIFONT_VERSION)/font-builds/unifont-$(UNIFONT_VERSION).ttf
|
$(CURL) $(CURLFLAGS) -o $@ $(URLCACHE)https://mirrors.kernel.org/gnu/unifont/unifont-$(UNIFONT_VERSION)/unifont-$(UNIFONT_VERSION).ttf
|
||||||
|
|
||||||
unifont_upper-$(UNIFONT_VERSION).ttf:
|
unifont_upper.ttf:
|
||||||
$(CURL) $(CURLFLAGS) -o $@ $(URLCACHE)http://unifoundry.com/pub/unifont-$(UNIFONT_VERSION)/font-builds/unifont_upper-$(UNIFONT_VERSION).ttf
|
$(CURL) $(CURLFLAGS) -o $@ $(URLCACHE)https://mirrors.kernel.org/gnu/unifont/unifont-$(UNIFONT_VERSION)/unifont_upper-$(UNIFONT_VERSION).ttf
|
||||||
|
|
||||||
CharWidths.txt: charwidths.jl unifont-$(UNIFONT_VERSION).ttf unifont_upper-$(UNIFONT_VERSION).ttf EastAsianWidth.txt
|
%.sfd: %.ttf
|
||||||
UNIFONT_VERSION=$(UNIFONT_VERSION) $(JULIA) charwidths.jl > $@
|
$(FONTFORGE) -lang=ff -c "Open(\"$<\");Save(\"$@\");Quit(0);"
|
||||||
|
|
||||||
|
CharWidths.txt: charwidths.jl unifont.sfd unifont_upper.sfd EastAsianWidth.txt
|
||||||
|
$(JULIA) charwidths.jl > $@
|
||||||
|
|
||||||
UnicodeData.txt:
|
UnicodeData.txt:
|
||||||
$(CURL) $(CURLFLAGS) -o $@ -O $(URLCACHE)http://www.unicode.org/Public/UNIDATA/UnicodeData.txt
|
$(CURL) $(CURLFLAGS) -o $@ -O $(URLCACHE)http://www.unicode.org/Public/UNIDATA/UnicodeData.txt
|
||||||
|
|||||||
@ -51,12 +51,6 @@ end
|
|||||||
#############################################################################
|
#############################################################################
|
||||||
# Widths from GNU Unifont
|
# Widths from GNU Unifont
|
||||||
|
|
||||||
universion=get(ENV, "UNIFONT_VERSION", "7.0.06")
|
|
||||||
for fontfile in ["unifont-$universion", "unifont_upper-$universion"]
|
|
||||||
isfile("$fontfile.ttf") || download("http://unifoundry.com/pub/unifont-$universion/font-builds/$fontfile.ttf", "$fontfile.ttf")
|
|
||||||
isfile("$fontfile.sfd") || run(`fontforge -lang=ff -c "Open(\"$fontfile.ttf\");Save(\"$fontfile.sfd\");Quit(0);"`)
|
|
||||||
end
|
|
||||||
|
|
||||||
#Read sfdfile for character widths
|
#Read sfdfile for character widths
|
||||||
function parsesfd(filename::String, CharWidths::Dict{Int,Int}=Dict{Int,Int}())
|
function parsesfd(filename::String, CharWidths::Dict{Int,Int}=Dict{Int,Int}())
|
||||||
state=:seekchar
|
state=:seekchar
|
||||||
@ -87,15 +81,14 @@ function parsesfd(filename::String, CharWidths::Dict{Int,Int}=Dict{Int,Int}())
|
|||||||
end
|
end
|
||||||
CharWidths
|
CharWidths
|
||||||
end
|
end
|
||||||
CharWidths=parsesfd("unifont-$universion.sfd", CharWidths)
|
CharWidths=parsesfd("unifont.sfd", CharWidths)
|
||||||
CharWidths=parsesfd("unifont_upper-$universion.sfd", CharWidths)
|
CharWidths=parsesfd("unifont_upper.sfd", CharWidths)
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
# Widths from UAX #11: East Asian Width
|
# Widths from UAX #11: East Asian Width
|
||||||
# .. these take precedence over the Unifont width for all codepoints
|
# .. these take precedence over the Unifont width for all codepoints
|
||||||
# listed explicitly as wide/full/narrow/half-width
|
# listed explicitly as wide/full/narrow/half-width
|
||||||
|
|
||||||
isfile("EastAsianWidth.txt") || download("http://www.unicode.org/Public/UNIDATA/EastAsianWidth.txt", "EastAsianWidth.txt")
|
|
||||||
for line in readlines(open("EastAsianWidth.txt"))
|
for line in readlines(open("EastAsianWidth.txt"))
|
||||||
#Strip comments
|
#Strip comments
|
||||||
line[1] == '#' && continue
|
line[1] == '#' && continue
|
||||||
|
|||||||
5092
utf8proc_data.c
5092
utf8proc_data.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user