Bladeren bron

fixed: This is an unnecessary inheritance.

Baozhu Zuo 5 jaren geleden
bovenliggende
commit
3071459ff9
3 gewijzigde bestanden met toevoegingen van 26 en 43 verwijderingen
  1. 8 0
      .gitlab-ci.yml
  2. 17 42
      .travis.yml
  3. 1 1
      HP20x_dev.h

+ 8 - 0
.gitlab-ci.yml

@@ -0,0 +1,8 @@
+build:
+  tags:
+    - nas
+  script:
+    - wget -c https://files.seeedstudio.com/arduino/seeed-arduino-ci.sh
+    - chmod +x seeed-arduino-ci.sh
+    - bash $PWD/seeed-arduino-ci.sh test
+

+ 17 - 42
.travis.yml

@@ -1,46 +1,21 @@
+
 language: generic
-matrix:
-  include:
-    - env:
-        - BOARD="arduino:avr:uno"
-    - env:
-        - BOARD="Seeeduino:samd:seeed_XIAO_m0"
-# default phases
+dist: bionic
+sudo: false
+cache:
+  directories:
+    - ~/arduino_ide
+    - ~/.arduino15/packages/
+
 before_install:
-  - mkdir -p "$HOME/bin"
-  - curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR="$HOME/bin" sh
-  - export PATH="$PATH:$HOME/bin"
-  - arduino-cli core update-index --additional-urls https://downloads.arduino.cc/packages/package_index.json
-  - arduino-cli core update-index --additional-urls https://raw.githubusercontent.com/Seeed-Studio/Seeed_Platform/master/package_seeeduino_boards_index.json
-  - arduino-cli  core install arduino:avr --additional-urls https://downloads.arduino.cc/packages/package_index.json
-  - arduino-cli  core install Seeeduino:samd --additional-urls https://raw.githubusercontent.com/Seeed-Studio/Seeed_Platform/master/package_seeeduino_boards_index.json
-  - |
-    installLibrary() {
-      local -r repositoryFullName="$1"
-      local -r repositoryName="${repositoryFullName##*/}"
-      # clone repository to the libraries folder of the sketchbook
-      git clone https://github.com/${repositoryFullName} "${HOME}/Arduino/libraries/${repositoryName}"
-      cd "${HOME}/Arduino/libraries/${repositoryName}"
-      cd "${TRAVIS_BUILD_DIR}"
-    }
-  - installLibrary Seeed-Studio/Grove_Barometer_HP20x
-  - buildExampleSketch() { arduino-cli compile  --warnings all --fqbn $BOARD $PWD/examples/$1 --verbose; }
-  - buildExampleUtilitySketch() { arduino-cli compile --warnings all --fqbn $BOARD $PWD/examples/utility/$1 --verbose; }
-install:
-  - mkdir -p $HOME/Arduino/libraries
+   - wget -c https://files.seeedstudio.com/arduino/seeed-arduino-ci.sh
+
 script:
-    - |
-      if [ "$BOARD" == "arduino:avr:uno" ]; then
-        buildExampleSketch HP20x_demo;
-      fi
-    - |
-      if [ "$BOARD" == "Seeeduino:samd:seeed_XIAO_m0" ]; then
-        buildExampleSketch HP20x_demo;
-      fi
-notifications:
-  webhooks:
-    urls:
-      - https://www.travisbuddy.com/
-    on_success: never
-    on_failure: always
+   - chmod +x seeed-arduino-ci.sh
+   - cat $PWD/seeed-arduino-ci.sh
+   - bash $PWD/seeed-arduino-ci.sh test
 
+notifications:
+  email:
+    on_success: change
+    on_failure: change

+ 1 - 1
HP20x_dev.h

@@ -77,7 +77,7 @@ typedef unsigned long   ulong;
 /****************************************************************************/
 /***        Class Definitions                                             ***/
 /****************************************************************************/
-class HP20x_dev : public TwoWire {
+class HP20x_dev  {
     /* Public variables and functions */
   public:
     uchar OSR_CFG;