This repository has been archived by the owner on Jun 23, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: migrate ci from travis to github actions
- Loading branch information
1 parent
bf94cbd
commit 3e3ac54
Showing
6 changed files
with
514 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# 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 | ||
|
||
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 | ||
- name: clang-format | ||
run: ./scripts/linux/run-clang-format.py --clang-format-executable=clang-format-3.9 -r src include | ||
|
||
test: | ||
name: Test | ||
needs: lint | ||
runs-on: self-hosted | ||
if: contains(github.event.pull_request.labels.*.name, 'ready-for-testing') | ||
container: | ||
image: apachepegasus/ci-env | ||
env: | ||
CCACHE_DIR: /tmp/ccache/pegasus | ||
CCACHE_MAXSIZE: 10G | ||
volumes: | ||
# Place ccache compilation intermediate results in host memory, that's shared among containers. | ||
- /tmp/ccache/pegasus:/tmp/ccache/pegasus | ||
# Read docs at https://docs.docker.com/storage/tmpfs/ for more details of using tmpfs in docker. | ||
options: --mount type=tmpfs,destination=/tmp/pegasus,tmpfs-size=10737418240 --cap-add=SYS_PTRACE | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
- name: Unpack prebuilt third-parties | ||
if: contains(github.event.pull_request.labels.*.name, 'thirdparty-modified') == false | ||
run: unzip /root/pegasus-thirdparty-output.zip -d ./thirdparty | ||
- name: Rebuild third-parties | ||
if: contains(github.event.pull_request.labels.*.name, 'thirdparty-modified') | ||
working-directory: thirdparty | ||
run: | | ||
mkdir build | ||
cmake -DCMAKE_BUILD_TYPE=Release -B build/ | ||
cmake --build build/ -j $(($(nproc)/2+1)) | ||
- name: Compilation | ||
run: ./run.sh build --skip_thirdparty | ||
- name: Unit Testing | ||
run: ./run.sh test --skip_thirdparty |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.