This repository has been archived by the owner on Aug 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 574
48 lines (46 loc) · 1.64 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Pull Request
on: [pull_request]
env:
PR_NUMBER: ${{ toJson(github.event.number) }}
jobs:
ubuntu-1804-build:
if: github.event.pull_request.base.repo.id != github.event.pull_request.head.repo.id
name: Ubuntu 18.04 | Build
runs-on: ubuntu-latest
steps:
- name: Checkout
run: |
git clone https://github.com/${GITHUB_REPOSITORY} .
git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge
git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge
git submodule sync --recursive
git submodule update --init --force --recursive
- name: Build
run: |
./.cicd/build.sh
tar -pczf build.tar.gz build
- name: Upload Build Artifact
uses: actions/upload-artifact@v1
with:
name: ubuntu-1804-build
path: build.tar.gz
ubuntu-1804-parallel-test:
name: Ubuntu 18.04 | Unit Test
runs-on: ubuntu-latest
needs: ubuntu-1804-build
steps:
- name: Checkout
run: |
git clone https://github.com/${GITHUB_REPOSITORY} .
git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge
git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge
git submodule sync --recursive
git submodule update --init --force --recursive
- name: Download Build Artifact
uses: actions/download-artifact@v1
with:
name: ubuntu-1804-build
- name: Parallel Test
run: |
tar -xzf ubuntu-1804-build/build.tar.gz
./.cicd/test.sh