Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add github actions #334

Merged
merged 1 commit into from
Apr 15, 2021
Merged

Add github actions #334

merged 1 commit into from
Apr 15, 2021

Conversation

manuelbuil
Copy link
Contributor

Based on the github actions in the sriov-operator project, add the same kind of actions here.

We did not have a non-rhel Dockerfile in this project, so I added one

Signed-off-by: Manuel Buil mbuil@suse.com

@manuelbuil manuelbuil changed the title Add github actions and Dockerfile Add github actions Mar 18, 2021
@manuelbuil
Copy link
Contributor Author

There was a non-rhel Dockerfile in images, so we will use that one instead

- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.15
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does the '^' symbol accomplish?
Latest golang is 1.16.
Also, do you think there's value iterating over a number of golang versions?
I have caught a build error before when I have built on newer golang versions. I was hoping to keep a list of the last 4 minor golang versions e.g. 1.16.x, 1.15.x, etc to ensure any changes still build at least across different golang versions. The builds are in parallel so it doesn't effect the speed of the workflow.

jobs:
  build:
    strategy:
      matrix:
        go-version: [1.13.x, 1.14.x, 1.15.x, 1.16.x]
        os: [ubuntu-latest]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In theory ^ is regex for "Start with", i.e. ^1.15 should match 1.15.x.

Your idea is good! I saw it in https://github.com/k8snetworkplumbingwg/sriov-network-device-plugin/pull/332/files, I am just wondering if it works with the "x", can you please confirm it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure - See execution of multiple golang versions here: https://github.com/martinkennelly/network-resources-injector/actions/runs/627385214

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: fmt
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any need for this task when make all performs 'fmt' anyway?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, thanks. It makes sense to remove it

images: ${{ env.IMAGE_NAME }}
tag-latest: false

- name: Build and push sriov-network-operator
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sriov-network-operator -> sriov-network-device-plugin

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@adrianchiris
Copy link
Contributor

Hmm, i see #328 #329 #332 address build and test, so perhaps we should limit this to just the image push parts ?
@martinkennelly @manuelbuil WDYT?

About the PR labeler workflow, i think it may need additional inputs from @zshi-redhat @pliurh if they found it useful in network operator.

@manuelbuil
Copy link
Contributor Author

Hmm, i see #328 #329 #332 address build and test, so perhaps we should limit this to just the image push parts ?
@martinkennelly @manuelbuil WDYT?

About the PR labeler workflow, i think it may need additional inputs from @zshi-redhat @pliurh if they found it useful in network operator.

Ok! Let me just do the image push parts

Signed-off-by: Manuel Buil <mbuil@suse.com>
Copy link
Member

@martinkennelly martinkennelly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the changes!

@zshi-redhat
Copy link
Collaborator

/cc @pliurh

@pliurh
Copy link
Contributor

pliurh commented Apr 15, 2021

LGTM

@zshi-redhat zshi-redhat merged commit 7059a93 into k8snetworkplumbingwg:master Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants