From 2264ce72c7130fbb0e76053bb0264d3e98383a6d Mon Sep 17 00:00:00 2001 From: Nicolas Peugnet Date: Wed, 4 Oct 2023 17:41:16 +0200 Subject: [PATCH] Update mapnik + port CI build to GH actions (n-peugnet/tilelive-mapnik#1) * Port CI build to GitHub actions As travis is not free for opensource project anymore and the appveyor build seems to be down also. Updated node to more current version. * Disable setup-node cache as package-lock.json is not commited in git * Upgrade node-mapnik to 4.5 as previous versions do not support node >= 10 * Really build on Windows and include really old Nodejs version only for Ubuntu * Nodejs 8 is too old for the Universal build of mapnik * Consider Nodejs 14.x as an old version + add 20.x Nodejs 14 it is not supported anymore, and 20.x is current LTS * We don't care about Windows, try on MacOs though * Remove travis build (doesn't seem to run anymore) + replace badges with GH actions --- .github/workflows/build.yml | 39 +++++++++++++++++++++++++++++++++++++ .travis.yml | 20 ------------------- README.md | 3 +-- package.json | 2 +- 4 files changed, 41 insertions(+), 23 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..371fd95 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,39 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: build + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + node-version: [16.x, 18.x, 20.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + include: + - os: ubuntu-latest + node-version: 14.x + - os: ubuntu-latest + node-version: 12.x + - os: ubuntu-latest + node-version: 10.x + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + # Can not use cache as package-lock.json is not commited in Git + # cache: 'npm' + - run: npm install --fallback-to-build=false + - run: npm test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index bceec47..0000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -language: node_js - -node_js: - - "0.10" - - "4" - -addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - libstdc++6 # upgrade libstdc++ on linux to support C++11 - -sudo: false - -install: - - npm install --fallback-to-build=false - -script: - - npm test diff --git a/README.md b/README.md index c756dc3..5663f4a 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,7 @@ uses [node-mapnik](http://github.com/mapnik/node-mapnik) to render tiles and grids from a Mapnik XML file. `tilelive-mapnik` implements the [Tilesource API](https://github.com/mapbox/tilelive.js/blob/master/API.md). -[![Build Status](https://travis-ci.com/mapbox/tilelive-mapnik.svg?branch=master)](http://travis-ci.com/mapbox/tilelive-mapnik) -[![Build status](https://ci.appveyor.com/api/projects/status/6am7la0hiaei8qop)](https://ci.appveyor.com/project/Mapbox/tilelive-mapnik) +[![build status](https://github.com/mapbox/tilelive-mapnik/actions/workflows/build.yml/badge.svg)](https://github.com/mapbox/tilelive-mapnik/actions/workflows/build.yml) ## Installation diff --git a/package.json b/package.json index afd8ecb..3270132 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "dependencies": { "step": "~0.0.5", "generic-pool": "~2.4.0", - "mapnik": "~3.7.0", + "mapnik": "~4.5", "mime": "~1.3.4" }, "devDependencies": {