blob: ee3c3fb76f6a3b5432f19fc023ddb86d006719ec [file] [log] [blame]
# Developer Notes:
#
# This config is for github actions. Before merging your changes of this file,
# it's recommended to create a PR against the ci-test branch to test if it works
# as expected.
name: pull_request
on:
# run on each pull request
pull_request:
types: [ synchronize, reopened, labeled ]
branches:
- master
- 'v[0-9]+.*' # release branch
- ci-test # testing branch for github action
paths:
- 'rdsn/**'
- 'src/**'
- '.github/workflows/ci-pull-request.yml'
push:
paths:
- '.github/workflows/ci-pull-request.yml'
# for manually triggering workflow
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
container:
image: apachepegasus/clang-format-3.9
defaults:
run:
working-directory: /root/incubator-pegasus
steps:
- name: Clone Apache Pegasus Source
working-directory: /root
run: |
git clone --recursive --depth=1 https://github.com/apache/incubator-pegasus.git
- name: clang-format
run: ./rdsn/scripts/linux/run-clang-format.py --clang-format-executable clang-format-3.9 -e ./src/shell/linenoise -e ./src/shell/sds -e ./rdsn -r ./src
test:
name: Test
needs: lint
runs-on: ubuntu-latest
container:
image: apachepegasus/ci-env
defaults:
run:
working-directory: /root/incubator-pegasus
steps:
- name: Clone Apache Pegasus Source
working-directory: /root
run: |
git clone --recursive --depth=1 https://github.com/apache/incubator-pegasus.git
- name: Unpack prebuilt third-parties
run: unzip /root/pegasus-thirdparty-output.zip -d ./rdsn/thirdparty
- name: Compilation
run: ./run.sh build -c --skip_thirdparty
- name: Unit Testing
run: ./run.sh test --on_travis