Skip to content

Commit

Permalink
Update mapnik + port CI build to GH actions (n-peugnet#1)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
n-peugnet committed Oct 4, 2023
1 parent f6a5ec7 commit eeecafa
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 23 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down

0 comments on commit eeecafa

Please sign in to comment.