Browse Source

Enable Travis

Lars-Magnus Skog 1 year ago
parent
commit
614b881891
2 changed files with 50 additions and 0 deletions
  1. 29
    0
      .travis.yml
  2. 21
    0
      scripts/travis-before-install.sh

+ 29
- 0
.travis.yml View File

@@ -0,0 +1,29 @@
1
+sudo: required
2
+
3
+language: node_js
4
+
5
+addons:
6
+  apt:
7
+    sources:
8
+    - ubuntu-toolchain-r-test
9
+    packages:
10
+    - python3-pip
11
+    - python3.5
12
+    - g++-7
13
+
14
+before_install:
15
+  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CC=gcc-7; fi
16
+  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CXX=g++-7; fi
17
+  - ./scripts/travis-before-install.sh
18
+
19
+node_js:
20
+  - 10
21
+
22
+install:
23
+  - npm install
24
+
25
+script:
26
+  - npm test
27
+
28
+notifications:
29
+  email: false

+ 21
- 0
scripts/travis-before-install.sh View File

@@ -0,0 +1,21 @@
1
+#!/bin/bash
2
+
3
+set -e
4
+
5
+# Set python 3.5 as preferred python3 interpreter (needed for pip3)
6
+sudo ln -sf /usr/bin/python3.5 /usr/bin/python3
7
+python3 --version
8
+
9
+# Install meson
10
+sudo pip3 install meson
11
+
12
+# Compile and install libsasl2-dev
13
+wget http://http.debian.net/debian/pool/main/c/cyrus-sasl2/cyrus-sasl2_2.1.27~101-g0780600+dfsg.orig.tar.xz
14
+tar xfv cyrus-sasl2_2.1.27~101-g0780600+dfsg.orig.tar.xz
15
+pushd cyrus-sasl2-2.1.27~101-g0780600+dfsg.orig && ./autogen.sh && make && sudo make install && popd
16
+rm -rf cyrus-sasl2-2.1.27~101-g0780600+dfsg.orig
17
+
18
+# Install ninja-build
19
+wget https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip
20
+unzip ninja-linux.zip
21
+sudo cp ninja /usr/bin