| # 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, opened ] |
| branches: |
| - master |
| - 'v[0-9]+.*' # release branch |
| - ci-test # testing branch for github action |
| # 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 |
| steps: |
| - uses: actions/checkout@v2 |
| with: |
| fetch-depth: 1 |
| submodules: true |
| - 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: ghcr.io/pegasus-kv/thirdparties-bin:ubuntu1804 |
| defaults: |
| run: |
| shell: bash |
| steps: |
| - uses: actions/checkout@v2 |
| with: |
| submodules: recursive |
| - name: Unpack prebuilt third-parties |
| run: unzip /root/thirdparties-bin.zip -d ./rdsn/thirdparty |
| - name: Compilation |
| run: ./run.sh build -c --skip_thirdparty |
| - |
| name: Packaging Server |
| run: ./run.sh pack_server |
| - |
| name: Packaging Tools |
| run: ./run.sh pack_tools |
| - name: Unit Testing |
| run: | |
| source ./config_hdfs.sh |
| ./run.sh test --on_travis |