Skip to content

Commit 4c74280

Browse files
authored
CI build update (Travis & GitHub action) (#245)
1 parent f72e9fe commit 4c74280

File tree

5 files changed

+151
-120
lines changed

5 files changed

+151
-120
lines changed

.github/workflows/build-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ jobs:
8383
$sdkprefix = "${{github.workspace}}\sdk\release-1928-x64"
8484
Set-Location -Path "$sdkprefix\bin"
8585
$env:GDAL_DATA = "$sdkprefix\bin\gdal-data"
86-
$env:PROJ_LIB = "$sdkprefix\bin\proj7\share"
86+
$env:PROJ_LIB = "$sdkprefix\bin\proj9\share"
8787
.\mapcache_seed.exe -c "${{github.workspace}}\build\mapcache.xml" -t global --force -z 0,1
8888
Copy-Item -Path "${{github.workspace}}\build\global\GoogleMapsCompatible\00\000\000\000\000\000\000.jpg" -Destination "${{github.workspace}}\seed.jpg"
8989
$match = (.\gdal\apps\gdalinfo.exe -checksum "${{github.workspace}}\seed.jpg" | Select-String -CaseSensitive -Pattern "Checksum=21336" -Quiet)

.github/workflows/check-crlf.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# check for Windows CRLF in files
2+
# homepage: https://github.com/marketplace/actions/check-crlf
3+
4+
name: Check CRLF
5+
6+
on: [push, pull_request]
7+
8+
jobs:
9+
Check-CRLF:
10+
name: verify that only LF linefeeds are used
11+
runs-on: ubuntu-18.04
12+
13+
steps:
14+
- name: Checkout repository contents
15+
uses: actions/checkout@v1
16+
17+
- name: Use action to check for CRLF endings
18+
uses: erclu/[email protected]
19+
with: # ignore directories below, space-delimited
20+
exclude:

.travis.yml

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,38 @@
1+
branches:
2+
except:
3+
- /^(cherry-pick-)?backport-\d+-to-/
4+
15
matrix:
26
fast_finish: true
37
include:
48
- os: linux
5-
dist: xenial
9+
dist: focal
610
language: c
711
sudo: required
812
env:
9-
- DISTRO=xenial
13+
- DISTRO=focal
1014
- BUILD_TYPE=maximum
1115

1216
- os: linux
13-
dist: xenial
17+
dist: focal
1418
language: c
1519
sudo: required
1620
env:
17-
- DISTRO=xenial
21+
- DISTRO=focal
1822
- BUILD_TYPE=minimum
1923

2024
- os: linux
25+
dist: bionic
2126
language: c
2227
sudo: required
2328
env:
24-
- DISTRO=precise
29+
- DISTRO=bionic
2530
- BUILD_TYPE=maximum
2631

2732
language: c
2833

2934
before_install:
30-
- sudo mv /etc/apt/sources.list.d/pgdg* /tmp
35+
- if test "$DISTRO" = "bionic"; then sudo mv /etc/apt/sources.list.d/pgdg* /tmp; fi
3136
- sudo apt-get purge -y libgdal* libgeos* libspatialite*
3237
- sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable
3338
- sudo apt-get update
@@ -42,15 +47,18 @@ script:
4247
- make -j3
4348
- sudo make install
4449
# Only test with Apache 2.4
45-
- if test "$DISTRO" = "xenial" -a "$BUILD_TYPE" = "maximum"; then cd ../tests; sh ./travis_setup.sh; sh ./run_tests.sh; fi
46-
50+
- if [ "$BUILD_TYPE" = "maximum" ]; then
51+
cd ../tests;
52+
sh ./travis_setup.sh;
53+
sh ./run_tests.sh;
54+
sudo systemctl -l status apache2.service;
55+
cat /tmp/mc/mapcache.xml;
56+
ls -lah /tmp/mc/mapcache.xml;
57+
fi
4758

48-
#notifications:
49-
# email:
50-
# recipients:
51-
52-
# irc:
53-
# channels:
54-
# - "irc.freenode.org#mapserver"
55-
# use_notice: true
59+
notifications:
60+
irc:
61+
channels:
62+
- "irc.libera.chat#mapcache"
63+
use_notice: true
5664

Makefile.vc

Lines changed: 103 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,103 @@
1-
#
2-
# makefile.vc - Main mapcache makefile for MSVC++
3-
#
4-
#
5-
# To use the makefile:
6-
# - Open a DOS prompt window
7-
# - Run the VCVARS32.BAT script to initialize the VC++ environment variables
8-
# - Start the build with: nmake /f makefile.vc
9-
#
10-
# $Id: $
11-
#
12-
13-
!INCLUDE nmake.opt
14-
15-
BASE_CFLAGS = $(OPTFLAGS)
16-
17-
CFLAGS=$(BASE_CFLAGS) $(MAPCACHE_CFLAGS)
18-
CC= cl
19-
LINK= link
20-
21-
#
22-
# Main mapcache library.
23-
#
24-
25-
MAPCACHE_OBJS = lib\axisorder.obj lib\dimension.obj lib\imageio_mixed.obj lib\service_wms.obj \
26-
lib\buffer.obj lib\ezxml.obj lib\imageio_png.obj lib\service_wmts.obj \
27-
lib\cache_disk.obj lib\lock.obj lib\services.obj lib\cache_bdb.obj \
28-
lib\cache_memcache.obj lib\grid.obj lib\source.obj \
29-
lib\cache_sqlite.obj lib\http.obj lib\source_gdal.obj lib\source_dummy.obj \
30-
lib\cache_tiff.obj lib\image.obj lib\service_demo.obj lib\source_mapserver.obj \
31-
lib\configuration.obj lib\image_error.obj lib\service_kml.obj lib\source_wms.obj \
32-
lib\configuration_xml.obj lib\imageio.obj lib\service_tms.obj lib\tileset.obj \
33-
lib\core.obj lib\imageio_jpeg.obj lib\service_ve.obj lib\util.obj lib\strptime.obj \
34-
$(REGEX_OBJ)
35-
36-
37-
MAPCACHE_FCGI = mapcache.exe
38-
MAPCACHE_APACHE = mod_mapcache.dll
39-
MAPCACHE_SEED = mapcache_seed.exe
40-
41-
#
42-
#
43-
#
44-
default: all
45-
46-
all: $(MAPCACHE_LIB) $(MAPCACHE_FCGI) $(MAPCACHE_APACHE) $(MAPCACHE_SEED)
47-
48-
49-
$(MAPCACHE_LIB): $(MAPCACHE_OBJS)
50-
lib /debug /out:$(MAPCACHE_LIB) $(MAPCACHE_OBJS)
51-
52-
53-
$(MAPCACHE_FCGI): $(MAPCACHE_LIB)
54-
$(CC) $(CFLAGS) cgi\mapcache.c /Fecgi\mapcache.exe $(LIBS)
55-
if exist cgi\$(MAPCACHE_FCGI).manifest mt -manifest cgi\$(MAPCACHE_FCGI).manifest -outputresource:cgi\$(MAPCACHE_FCGI);1
56-
57-
$(MAPCACHE_APACHE): $(MAPCACHE_LIB)
58-
$(CC) $(CFLAGS) apache\mod_mapcache.c /link /DLL /out:apache\mod_mapcache.dll $(LIBS)
59-
if exist apache\$(MAPCACHE_APACHE).manifest mt -manifest apache\$(MAPCACHE_APACHE).manifest -outputresource:apache\$(MAPCACHE_APACHE);2
60-
61-
$(MAPCACHE_SEED): $(MAPCACHE_LIB)
62-
$(CC) $(CFLAGS) util\mapcache_seed.c /Feutil\mapcache_seed.exe $(LIBS)
63-
if exist util\$(MAPCACHE_SEED).manifest mt -manifest util\$(MAPCACHE_SEED).manifest -outputresource:util\$(MAPCACHE_SEED);1
64-
65-
.c.obj:
66-
$(CC) $(CFLAGS) /c $*.c /Fo$*.obj
67-
68-
.cpp.obj:
69-
$(CC) $(CFLAGS) /c $*.cpp /Fo$*.obj
70-
71-
72-
clean:
73-
del lib\*.obj
74-
del *.obj
75-
del *.exp
76-
del apache\$(MAPCACHE_APACHE)
77-
del apache\*.manifest
78-
del apache\*.exp
79-
del apache\*.lib
80-
del apache\*.pdb
81-
del apache\*.ilk
82-
del cgi\$(MAPCACHE_FCGI)
83-
del cgi\*.manifest
84-
del cgi\*.exp
85-
del cgi\*.lib
86-
del cgi\*.pdb
87-
del cgi\*.ilk
88-
del util\$(MAPCACHE_SEED)
89-
del util\*.manifest
90-
del util\*.exp
91-
del util\*.lib
92-
del util\*.pdb
93-
del util\*.ilk
94-
del *.lib
95-
del *.manifest
96-
97-
98-
install: $(MAPCACHE_EXE)
99-
-mkdir $(BINDIR)
100-
copy *.exe $(BINDIR)
101-
102-
103-
1+
#
2+
# makefile.vc - Main mapcache makefile for MSVC++
3+
#
4+
#
5+
# To use the makefile:
6+
# - Open a DOS prompt window
7+
# - Run the VCVARS32.BAT script to initialize the VC++ environment variables
8+
# - Start the build with: nmake /f makefile.vc
9+
#
10+
# $Id: $
11+
#
12+
13+
!INCLUDE nmake.opt
14+
15+
BASE_CFLAGS = $(OPTFLAGS)
16+
17+
CFLAGS=$(BASE_CFLAGS) $(MAPCACHE_CFLAGS)
18+
CC= cl
19+
LINK= link
20+
21+
#
22+
# Main mapcache library.
23+
#
24+
25+
MAPCACHE_OBJS = lib\axisorder.obj lib\dimension.obj lib\imageio_mixed.obj lib\service_wms.obj \
26+
lib\buffer.obj lib\ezxml.obj lib\imageio_png.obj lib\service_wmts.obj \
27+
lib\cache_disk.obj lib\lock.obj lib\services.obj lib\cache_bdb.obj \
28+
lib\cache_memcache.obj lib\grid.obj lib\source.obj \
29+
lib\cache_sqlite.obj lib\http.obj lib\source_gdal.obj lib\source_dummy.obj \
30+
lib\cache_tiff.obj lib\image.obj lib\service_demo.obj lib\source_mapserver.obj \
31+
lib\configuration.obj lib\image_error.obj lib\service_kml.obj lib\source_wms.obj \
32+
lib\configuration_xml.obj lib\imageio.obj lib\service_tms.obj lib\tileset.obj \
33+
lib\core.obj lib\imageio_jpeg.obj lib\service_ve.obj lib\util.obj lib\strptime.obj \
34+
$(REGEX_OBJ)
35+
36+
37+
MAPCACHE_FCGI = mapcache.exe
38+
MAPCACHE_APACHE = mod_mapcache.dll
39+
MAPCACHE_SEED = mapcache_seed.exe
40+
41+
#
42+
#
43+
#
44+
default: all
45+
46+
all: $(MAPCACHE_LIB) $(MAPCACHE_FCGI) $(MAPCACHE_APACHE) $(MAPCACHE_SEED)
47+
48+
49+
$(MAPCACHE_LIB): $(MAPCACHE_OBJS)
50+
lib /debug /out:$(MAPCACHE_LIB) $(MAPCACHE_OBJS)
51+
52+
53+
$(MAPCACHE_FCGI): $(MAPCACHE_LIB)
54+
$(CC) $(CFLAGS) cgi\mapcache.c /Fecgi\mapcache.exe $(LIBS)
55+
if exist cgi\$(MAPCACHE_FCGI).manifest mt -manifest cgi\$(MAPCACHE_FCGI).manifest -outputresource:cgi\$(MAPCACHE_FCGI);1
56+
57+
$(MAPCACHE_APACHE): $(MAPCACHE_LIB)
58+
$(CC) $(CFLAGS) apache\mod_mapcache.c /link /DLL /out:apache\mod_mapcache.dll $(LIBS)
59+
if exist apache\$(MAPCACHE_APACHE).manifest mt -manifest apache\$(MAPCACHE_APACHE).manifest -outputresource:apache\$(MAPCACHE_APACHE);2
60+
61+
$(MAPCACHE_SEED): $(MAPCACHE_LIB)
62+
$(CC) $(CFLAGS) util\mapcache_seed.c /Feutil\mapcache_seed.exe $(LIBS)
63+
if exist util\$(MAPCACHE_SEED).manifest mt -manifest util\$(MAPCACHE_SEED).manifest -outputresource:util\$(MAPCACHE_SEED);1
64+
65+
.c.obj:
66+
$(CC) $(CFLAGS) /c $*.c /Fo$*.obj
67+
68+
.cpp.obj:
69+
$(CC) $(CFLAGS) /c $*.cpp /Fo$*.obj
70+
71+
72+
clean:
73+
del lib\*.obj
74+
del *.obj
75+
del *.exp
76+
del apache\$(MAPCACHE_APACHE)
77+
del apache\*.manifest
78+
del apache\*.exp
79+
del apache\*.lib
80+
del apache\*.pdb
81+
del apache\*.ilk
82+
del cgi\$(MAPCACHE_FCGI)
83+
del cgi\*.manifest
84+
del cgi\*.exp
85+
del cgi\*.lib
86+
del cgi\*.pdb
87+
del cgi\*.ilk
88+
del util\$(MAPCACHE_SEED)
89+
del util\*.manifest
90+
del util\*.exp
91+
del util\*.lib
92+
del util\*.pdb
93+
del util\*.ilk
94+
del *.lib
95+
del *.manifest
96+
97+
98+
install: $(MAPCACHE_EXE)
99+
-mkdir $(BINDIR)
100+
copy *.exe $(BINDIR)
101+
102+
103+

tests/travis_setup.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ echo ' <service type="wms" enabled="true"/>' >> $MAPCACHE_CONF
5252
echo ' <log_level>debug</log_level>' >> $MAPCACHE_CONF
5353
echo '</mapcache>' >> $MAPCACHE_CONF
5454

55+
sudo chown -R www-data:www-data /tmp/mc/
56+
sudo chmod -R 777 /tmp/mc/
57+
5558
cp data/world.tif /tmp/mc
5659

5760
sudo su -c "echo 'LoadModule mapcache_module /usr/lib/apache2/modules/mod_mapcache.so' >> /etc/apache2/apache2.conf"

0 commit comments

Comments
 (0)