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

docker container based infrastructure #130

Open
zchee opened this issue Sep 13, 2016 · 7 comments
Open

docker container based infrastructure #130

zchee opened this issue Sep 13, 2016 · 7 comments
Assignees

Comments

@zchee
Copy link
Member

zchee commented Sep 13, 2016

I created this issue from @zimmski reply.
#117 (comment)

I don't know go-clang dev's actual developing flow. That is write code on the local environment, and test using Vagrant? or all works on the local environment?
Anyway, v3.9 can not CI test... So I have slightly fixed the Dockerfile that was for my personal. based by sbinet's PR.
Very roughly.

It can build the LLVM version 3.8 ~ 4.0, also with the -msan testing.
Here the travis results and sample repository.

It can test on clean Linux environment (now use ubuntu/xenial. sorry, not trusty) with the make docker-test or make ci.
Can CI testing with the no limit, related apt package whitelist.
Needs to maintain them is the only goclang/base image. The each version automatically setup by $LLVM_VERSION env using ONBUILD.
It might be a good idea with use the hub.docker.com web hook.
Each repo has Dockerfile.base because I can not upload docker image to the hub.docker.com.

But maybe not corresponding to the switching version scripts. And little hacky and confusing (travis cache, use ONBUILD, etc)

This was my hobby of through today from yesterday ;) I want to always the same test results because I use macOS. That is little different the Linux.

If you don't like it, no problem. Please closing this issue. but if you interested it, I will rewrite along your request.
Thanks for great Clang interface.

@zimmski
Copy link
Member

zimmski commented Sep 14, 2016

There is an open PR of @sbinet #103 which is of the go-clang items I want to finish this week. It would be good if we can combine both efforts. Have you taken a look at that PR?

The development process is described in the README of the gen repository starting from here https://github.com/go-clang/gen#how-to-contribute Basically we are using a Vagrant based VM to compile and test, but git commands should be executed outside of Vagrant. It would be ideal if we could switch to Docker for both developement and the CI.

@zchee
Copy link
Member Author

zchee commented Sep 16, 2016

@zimmski

There is an open PR of @sbinet #103 which is of the go-clang items I want to finish this week. It would be good if we can combine both efforts. Have you taken a look at that PR?

Yes, I know that PR. My Dockerfile based it. and same approach.
But it seems needs the maintain two(or more) Dockerfile because of separate Dockerfile that install Go(goclang/base) and install LLVM(goclang/build).
So, I did merge to one Dockerfile with ONBUILD and --build-arg LLVM_VERSION=$LLVM_VERSION.

The development process is described in the README of the gen repository starting from here https://github.com/go-clang/gen#how-to-contribute Basically we are using a Vagrant based VM to compile and test, but git commands should be executed outside of Vagrant. It would be ideal if we could switch to Docker for both developement and the CI.

Ah, go-clang already explain the developer flow.
I overlooked. Sorry...

What should I do? Create new PR(with some fix)? or comment #103?

@zimmski
Copy link
Member

zimmski commented Sep 29, 2016

@zchee I took a look at your changes, and it looks pretty cool. Some remarks:
a.) I am not really sure if you should do a new PR, I leave this up to @sbinet since he did put a lo of effort into his PR. I do not want that to go to waste.
b.) travis.yml: The docker start/stop look rather hackish. According to https://docs.travis-ci.com/user/docker/ they are not needed.
c.) Changing to a newer Ubuntu version is fine with me as long as we support Clang 3.4 to 3.9 with it.
d.) Sadly the -msan flag does not make much sense at this point see #123 (comment) maybe we should also switch to a manually built version of LLVM/Clang? @sbinet @marxriedl would do you think?
e.) Would it make sense to just use one Dockerfile and simply add the LLVM/Clang version via the build argument, and pushing the different versions using a corresponding docker image tag? However, I do not know if Docker hub allows building the same image with different arguments.

@zchee
Copy link
Member Author

zchee commented Oct 8, 2016

@zimmski I almost understand. Of curse, I'm not going to waste @sbinet PR.
I will reply later. Thanks for checking my changes.

@sbinet
Copy link
Member

sbinet commented Oct 12, 2016

@zchee feel free to steal parts or all of my initial PR as you deem necessary.
I have very few cycles for go-clang these days, unfortunately...

@zchee
Copy link
Member Author

zchee commented Dec 18, 2016

@zimmski I'll rewrite some Dockerfile to more easy maintenance for go-clang dev. sorry for a delay.

@sbinet I understand. I'll create a new pull request with reference to it. Thanks for a good "base" image :)

@zimmski
Copy link
Member

zimmski commented Dec 19, 2016

Cool!

@zchee zchee self-assigned this Sep 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants