From 047a965f9f0c42700ac782301b851a0ac30b2e2f Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Mon, 24 May 2021 16:31:29 +0300 Subject: [PATCH] CI: move Melodic build and editorconfig-lint to GitHub Actions (#331) * Create main.yml * Update main.yml * Disable native Melodic build in Travis * Run editorconfig-lint in Actions * Let wget be less verbose * Test * Test ok * Disable editorconfig-lint in Travis --- .github/workflows/main.yml | 42 ++++++++++++++++++++++++++++++++++++++ .travis.yml | 24 ++++++++-------------- 2 files changed, 50 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..10a05402 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,42 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events but only for the master branch + push: + branches: [ master ] + pull_request: + branches: [ master ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + # Runs a set of commands using the runners shell + - name: Native Melodic build + env: + NATIVE_DOCKER: ros:melodic-ros-base + run: | + docker run --rm -v $(pwd):/root/catkin_ws/src/clover ${NATIVE_DOCKER} /root/catkin_ws/src/clover/builder/standalone-install.sh + editorconfig: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: .editorconfig Linter + run: | + wget --no-verbose https://github.com/okalachev/editorconfig-checker/releases/download/1.2.1-disable-spaces-amount/ec-linux-amd64 + chmod +x ec-linux-amd64 + ./ec-linux-amd64 -spaces-after-tabs -e "roslib.js|ros3d.js|eventemitter2.js|draw.cpp|BinUtils.swift|\.idea|apps/android/app|blockly/|clover_blocks/programs/|highlight/|python.js|Assets.xcassets|test_parser_pass.txt|test_node_failure.txt|aruco_pose/vendor|\.stl|\.dxf|\.dae" diff --git a/.travis.yml b/.travis.yml index b69b6ee2..32b8f201 100644 --- a/.travis.yml +++ b/.travis.yml @@ -60,14 +60,14 @@ jobs: # - docker pull ${NATIVE_DOCKER} # script: # - docker run --rm -v $(pwd):/root/catkin_ws/src/clover ${NATIVE_DOCKER} /root/catkin_ws/src/clover/builder/standalone-install.sh - - stage: Build - name: "Native Melodic build" - env: - - NATIVE_DOCKER=ros:melodic-ros-base - before_script: - - docker pull ${NATIVE_DOCKER} - script: - - docker run --rm -v $(pwd):/root/catkin_ws/src/clover ${NATIVE_DOCKER} /root/catkin_ws/src/clover/builder/standalone-install.sh + # - stage: Build + # name: "Native Melodic build" + # env: + # - NATIVE_DOCKER=ros:melodic-ros-base + # before_script: + # - docker pull ${NATIVE_DOCKER} + # script: + # - docker run --rm -v $(pwd):/root/catkin_ws/src/clover ${NATIVE_DOCKER} /root/catkin_ws/src/clover/builder/standalone-install.sh - stage: Build name: "Documentation" language: node_js @@ -107,14 +107,6 @@ jobs: verbose: true on: branch: master - - stage: Build - name: Editorconfig-lint - language: generic - before_script: - - wget https://github.com/okalachev/editorconfig-checker/releases/download/1.2.1-disable-spaces-amount/ec-linux-amd64 - - chmod +x ec-linux-amd64 - script: - - ./ec-linux-amd64 -spaces-after-tabs -e "roslib.js|ros3d.js|eventemitter2.js|draw.cpp|BinUtils.swift|\.idea|apps/android/app|blockly/|clover_blocks/programs/|highlight/|python.js|Assets.xcassets|test_parser_pass.txt|test_node_failure.txt|aruco_pose/vendor|\.stl|\.dxf|\.dae" stages: - Build # More info there