Browse Source

Fix travis build

Ask Bjørn Hansen 5 years ago
parent
commit
b9443b0ba1
1 changed files with 12 additions and 11 deletions
  1. 12 11
      .travis.yml

+ 12 - 11
.travis.yml

@@ -1,24 +1,25 @@
+dist: bionic
 language: go
+go_import_path: github.com/abh/geodns
+
 go:
-  - "1.11.8"
   - "1.12.3"
   - "1.13.4"
   - tip
 
 before_install:
-  # because travis-ci is running an older ubuntu, we add the maxmind repository
-  # to get geoipupdate
-  - sudo apt-get -y update
-  - sudo apt-get -y install software-properties-common python-software-properties
-  - sudo add-apt-repository -y ppa:maxmind/ppa
-  - sudo apt-get -y update && sudo apt-get -y install libgeoip-dev geoipupdate curl
+  - sudo apt-get -y update && sudo apt-get -y install curl
+  # we add the maxmind repository to get geoipupdate
+  #- sudo apt-get -y install  software-properties-common
+  #- sudo add-apt-repository -y ppa:maxmind/ppa && sudo apt-get -y update
+  #- sudo apt-get -y install geoipupdate geoip-database geoip-bin curl
 
 install:
-# - curl -fso /tmp/GeoIP.conf http://geodns.bitnames.com/geoip/GeoIP.conf
-# - sudo mv /tmp/GeoIP.conf /etc/
-  - sudo geoipupdate
+  - sudo mkdir -p /usr/share/GeoIP/
+  - sudo curl -fso /usr/share/GeoIP/GeoLite2-ASN.mmdb     https://geodns.bitnames.com/geoip/GeoLite2-ASN.mmdb
+  - sudo curl -fso /usr/share/GeoIP/GeoLite2-City.mmdb    https://geodns.bitnames.com/geoip/GeoLite2-City.mmdb
+  - sudo curl -fso /usr/share/GeoIP/GeoLite2-Country.mmdb https://geodns.bitnames.com/geoip/GeoLite2-Country.mmdb
 # - sudo ln -s /usr/share/GeoIP $TRAVIS_BUILD_DIR/db
-# - sudo ln -s /usr/share/GeoIP/GeoLite2-Country.mmdb /usr/share/GeoIP/GeoIP2-Country.mmdb
 # - echo [geodns] >> dns/geodns.conf
 # - echo Directory=/usr/share/GeoIP/ >> dns/geodns.conf
   - go build -v