diff mbox series

[ovs-dev,RFC] github-ci: Enable github actions.

Message ID 1584476833-103272-1-git-send-email-u9012063@gmail.com
State RFC
Headers show
Series [ovs-dev,RFC] github-ci: Enable github actions. | expand

Commit Message

William Tu March 17, 2020, 8:27 p.m. UTC
So far we only use travis to do run 'make check' per commit.
This enables per-commit check for 'make check-system-userspace' test.
We can think about what others to add using github actions.

Example run:
https://github.com/williamtu/ovs-travis/runs/514822181?check_suite_focus=true

Signed-off-by: William Tu <u9012063@gmail.com>
---
 .github/workflows/ovs.yml | 25 +++++++++++++++++++++++++
 Makefile.am               |  1 +
 2 files changed, 26 insertions(+)
 create mode 100644 .github/workflows/ovs.yml

Comments

Aaron Conole March 19, 2020, 1:09 p.m. UTC | #1
William Tu <u9012063@gmail.com> writes:

> So far we only use travis to do run 'make check' per commit.
> This enables per-commit check for 'make check-system-userspace' test.
> We can think about what others to add using github actions.
>
> Example run:
> https://github.com/williamtu/ovs-travis/runs/514822181?check_suite_focus=true
>
> Signed-off-by: William Tu <u9012063@gmail.com>
> ---

This is a cool feature - thanks for proposing it.

I've only done a little bit of looking at it - I think I may need to
explicitly enable it for the bot repositories (but I still don't quite
understand the settings in 'Action permissions').  I'll spend more time
digging into it.

Are there any thoughts to using the scripts in .travis and maybe
consolidating it to something more generic?

>  .github/workflows/ovs.yml | 25 +++++++++++++++++++++++++
>  Makefile.am               |  1 +
>  2 files changed, 26 insertions(+)
>  create mode 100644 .github/workflows/ovs.yml
>
> diff --git a/.github/workflows/ovs.yml b/.github/workflows/ovs.yml
> new file mode 100644
> index 000000000000..1e056aceed2c
> --- /dev/null
> +++ b/.github/workflows/ovs.yml
> @@ -0,0 +1,25 @@
> +name: OVS CI
> +
> +on:
> +  push:
> +    branches: [ master ]
> +  pull_request:
> +    branches: [ master ]
> +
> +jobs:
> +  build:
> +    runs-on: ubuntu-latest
> +    steps:
> +    - uses: actions/checkout@v2
> +    - name: configure
> +      run: ./boot.sh; ./configure
> +    - name: make
> +      run: make -j2
> +    - name: check-system-userspace
> +      run: sudo make check-system-userspace TESTSUITEFLAGS='1-30' RECHECK=yes
> +    - name: Upload artifact
> +      uses: actions/upload-artifact@v1.0.0
> +      if: failure()
> +      with:
> +        name: system-userspace
> +        path: tests/system-userspace-testsuite.dir/
> diff --git a/Makefile.am b/Makefile.am
> index b279303d186c..80448d0c31c1 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -92,6 +92,7 @@ EXTRA_DIST = \
>  	$(MAN_ROOTS) \
>  	Vagrantfile \
>  	Vagrantfile-FreeBSD \
> +	.github/workflows/ovs.yml \
>  	.mailmap
>  bin_PROGRAMS =
>  sbin_PROGRAMS =
William Tu March 19, 2020, 2:24 p.m. UTC | #2
On Thu, Mar 19, 2020 at 6:09 AM Aaron Conole <aconole@redhat.com> wrote:
>
> William Tu <u9012063@gmail.com> writes:
>
> > So far we only use travis to do run 'make check' per commit.
> > This enables per-commit check for 'make check-system-userspace' test.
> > We can think about what others to add using github actions.
> >
> > Example run:
> > https://github.com/williamtu/ovs-travis/runs/514822181?check_suite_focus=true
> >
> > Signed-off-by: William Tu <u9012063@gmail.com>
> > ---
>
> This is a cool feature - thanks for proposing it.
>
> I've only done a little bit of looking at it - I think I may need to
> explicitly enable it for the bot repositories (but I still don't quite
> understand the settings in 'Action permissions').  I'll spend more time
> digging into it.
>
> Are there any thoughts to using the scripts in .travis and maybe
> consolidating it to something more generic?
>

Thanks.

This is independent of travis CI so I don't think we need to change .travis.
As soon as you push this .github/workflows/ovs.yml to your own github
master branch, the CI runner will kick off.
Currently travis takes about 1 hour to finish our tests, so I'm thinking
about moving or adding tests here at github actions.

William

> >  .github/workflows/ovs.yml | 25 +++++++++++++++++++++++++
> >  Makefile.am               |  1 +
> >  2 files changed, 26 insertions(+)
> >  create mode 100644 .github/workflows/ovs.yml
> >
> > diff --git a/.github/workflows/ovs.yml b/.github/workflows/ovs.yml
> > new file mode 100644
> > index 000000000000..1e056aceed2c
> > --- /dev/null
> > +++ b/.github/workflows/ovs.yml
> > @@ -0,0 +1,25 @@
> > +name: OVS CI
> > +
> > +on:
> > +  push:
> > +    branches: [ master ]
> > +  pull_request:
> > +    branches: [ master ]
> > +
> > +jobs:
> > +  build:
> > +    runs-on: ubuntu-latest
> > +    steps:
> > +    - uses: actions/checkout@v2
> > +    - name: configure
> > +      run: ./boot.sh; ./configure
> > +    - name: make
> > +      run: make -j2
> > +    - name: check-system-userspace
> > +      run: sudo make check-system-userspace TESTSUITEFLAGS='1-30' RECHECK=yes
> > +    - name: Upload artifact
> > +      uses: actions/upload-artifact@v1.0.0
> > +      if: failure()
> > +      with:
> > +        name: system-userspace
> > +        path: tests/system-userspace-testsuite.dir/
> > diff --git a/Makefile.am b/Makefile.am
> > index b279303d186c..80448d0c31c1 100644
> > --- a/Makefile.am
> > +++ b/Makefile.am
> > @@ -92,6 +92,7 @@ EXTRA_DIST = \
> >       $(MAN_ROOTS) \
> >       Vagrantfile \
> >       Vagrantfile-FreeBSD \
> > +     .github/workflows/ovs.yml \
> >       .mailmap
> >  bin_PROGRAMS =
> >  sbin_PROGRAMS =
>
Flavio Leitner March 19, 2020, 9:29 p.m. UTC | #3
On Tue, Mar 17, 2020 at 01:27:13PM -0700, William Tu wrote:
> So far we only use travis to do run 'make check' per commit.
> This enables per-commit check for 'make check-system-userspace' test.
> We can think about what others to add using github actions.
> 
> Example run:
> https://github.com/williamtu/ovs-travis/runs/514822181?check_suite_focus=true

I like the idea, but not sure if make check-system-userspace works
well in travis environment. I mean, first it should pass or it will
just create noise there. The second thing is to be stable, or we
will see random unrelated failures in new commits.

fbl


> 
> Signed-off-by: William Tu <u9012063@gmail.com>
> ---
>  .github/workflows/ovs.yml | 25 +++++++++++++++++++++++++
>  Makefile.am               |  1 +
>  2 files changed, 26 insertions(+)
>  create mode 100644 .github/workflows/ovs.yml
> 
> diff --git a/.github/workflows/ovs.yml b/.github/workflows/ovs.yml
> new file mode 100644
> index 000000000000..1e056aceed2c
> --- /dev/null
> +++ b/.github/workflows/ovs.yml
> @@ -0,0 +1,25 @@
> +name: OVS CI
> +
> +on:
> +  push:
> +    branches: [ master ]
> +  pull_request:
> +    branches: [ master ]
> +
> +jobs:
> +  build:
> +    runs-on: ubuntu-latest
> +    steps:
> +    - uses: actions/checkout@v2
> +    - name: configure
> +      run: ./boot.sh; ./configure
> +    - name: make
> +      run: make -j2
> +    - name: check-system-userspace
> +      run: sudo make check-system-userspace TESTSUITEFLAGS='1-30' RECHECK=yes
> +    - name: Upload artifact
> +      uses: actions/upload-artifact@v1.0.0
> +      if: failure()
> +      with:
> +        name: system-userspace
> +        path: tests/system-userspace-testsuite.dir/
> diff --git a/Makefile.am b/Makefile.am
> index b279303d186c..80448d0c31c1 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -92,6 +92,7 @@ EXTRA_DIST = \
>  	$(MAN_ROOTS) \
>  	Vagrantfile \
>  	Vagrantfile-FreeBSD \
> +	.github/workflows/ovs.yml \
>  	.mailmap
>  bin_PROGRAMS =
>  sbin_PROGRAMS =
> -- 
> 2.7.4
>
William Tu March 20, 2020, 2:26 p.m. UTC | #4
On Thu, Mar 19, 2020 at 2:29 PM Flavio Leitner <fbl@sysclose.org> wrote:
>
> On Tue, Mar 17, 2020 at 01:27:13PM -0700, William Tu wrote:
> > So far we only use travis to do run 'make check' per commit.
> > This enables per-commit check for 'make check-system-userspace' test.
> > We can think about what others to add using github actions.
> >
> > Example run:
> > https://github.com/williamtu/ovs-travis/runs/514822181?check_suite_focus=true
>
> I like the idea, but not sure if make check-system-userspace works
> well in travis environment. I mean, first it should pass or it will
> just create noise there. The second thing is to be stable, or we
> will see random unrelated failures in new commits.
>
> fbl
>
>
Thanks!
Currently the run failed due to iproute2 bug on ubuntu.
I will fix it and send another patch.
William
diff mbox series

Patch

diff --git a/.github/workflows/ovs.yml b/.github/workflows/ovs.yml
new file mode 100644
index 000000000000..1e056aceed2c
--- /dev/null
+++ b/.github/workflows/ovs.yml
@@ -0,0 +1,25 @@ 
+name: OVS CI
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v2
+    - name: configure
+      run: ./boot.sh; ./configure
+    - name: make
+      run: make -j2
+    - name: check-system-userspace
+      run: sudo make check-system-userspace TESTSUITEFLAGS='1-30' RECHECK=yes
+    - name: Upload artifact
+      uses: actions/upload-artifact@v1.0.0
+      if: failure()
+      with:
+        name: system-userspace
+        path: tests/system-userspace-testsuite.dir/
diff --git a/Makefile.am b/Makefile.am
index b279303d186c..80448d0c31c1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -92,6 +92,7 @@  EXTRA_DIST = \
 	$(MAN_ROOTS) \
 	Vagrantfile \
 	Vagrantfile-FreeBSD \
+	.github/workflows/ovs.yml \
 	.mailmap
 bin_PROGRAMS =
 sbin_PROGRAMS =