ps2dev / gsKit

gsKit is a C interface to the PS2 Graphics Synthesizer
Other
103 stars 27 forks source link

Now gsKit has auto check and compiles just fine in both toolchains #7

Closed AKuHAK closed 5 years ago

sp193 commented 7 years ago

I see references to your repository within the Travis file. Is there a reason why it cannot refer to the ps2dev repositories instead?

I'm not familiar with docker though.

AKuHAK commented 7 years ago

Docker images - it is precompiled environment with all necessary libraries inside. I prepared 2 images one with new and on with old toolchain. Docker images are placed in other site so if you want it to be more "official" you need to register ps2dev repository at docker com and build your own images (or move mines there) For example ps2sdk uses mlafedlt image which has some disadvantages. This is not all. Travis test system also is linked with my account. You cannot see it but its true. Of course will be better to reregister ps2dev project with "official" travis repository.

sp193 commented 7 years ago

Bump! @mlafeldt, would you like to use your docker images, or would it be okay to use this?

AKuHAK commented 7 years ago

@mlafeldt your image has PS2SDKSRC predefined which can lead to potential problems. And it is better to keep Image updated and not freeze it at specific ps2toolchain commit. I was planning to create tutorial for using docker and travis in ps2 repositories but forgot about it... I will try it today if I have time.

On вс, 20 авг. 2017 г., 13:00 Liu Woon Yung notifications@github.com wrote:

Bump! @mlafeldt https://github.com/mlafeldt, would you like to use your docker images, or would it be okay to use this?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ps2dev/gsKit/pull/7#issuecomment-323575308, or mute the thread https://github.com/notifications/unsubscribe-auth/AAl8SJ9n13guK6gLezNc9okN3yy-pLsHks5saAO1gaJpZM4MFbIh .

mlafeldt commented 7 years ago

My image does not set PS2SDKSRC at runtime:

$ docker run -it --rm mlafeldt/ps2dev env
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/ps2dev/bin:/ps2dev/ee/bin:/ps2dev/iop/bin:/ps2dev/dvp/bin:/ps2dev/ps2sdk/bin
HOSTNAME=148a2ce336ca
TERM=xterm
TOOLCHAIN_VERSION=f4bb9106e5fd3de3413002fabbeaa6ebdfd9f994
PS2DEV=/ps2dev
PS2SDK=/ps2dev/ps2sdk
DEBIAN_FRONTEND=noninteractive
HOME=/root

Also, the whole point of Docker is to provide stable (frozen) artifacts in the form of image tags. I understand, however, that the latest tag should be based on the master branch. I changed that in https://github.com/mlafeldt/docker-ps2dev/commit/26cdd3dfd80b1df9e7c7a4c23599a5b5f3d0dee1

Generally, if there's something missing in the image, the best approach is to create a per-project Dockerfile that is based on the upstream image (e.g. using FROM mlafeldt/ps2dev) rather than calling docker run/exec dozens of times at runtime. (Besides docker exec is meant for debugging only.)

mlafeldt commented 7 years ago

To be honest, I also don't see any advantages of your fork of my project: https://github.com/AKuHAK/docker-ps2dev/blob/master/Dockerfile

All you do is to invoke the toolchain scripts differently?

I doubt that this Dockerfile even builds as you removed the tag from ubuntu. I don't think that the toolchain compiles with the latest Ubuntu version, do you?

AKuHAK commented 7 years ago

There is seems not missing but too much in the image. I will explain: PS2Toolchain scripts are numbered, and there can be problems with 005-ps2sdk.sh cause this script compiles ps2sdk and sets up PS2SDKSRC. Why it is problem? PS2SDK are updating more frequently then docker image so there can be situation (and in fact it was - I will try to find failed travis build later) when ps2sdk inside docker image is older then actual ps2sdk, but when you try to compile newest ps2sdk inside that older docker image, PS2SDK firstly try to check PS2SDKSRC existence and if it is found PS2SDKSRC is used as header loacation and al changes in newest PS2SDK headers are just ignored. it can be easily fixed by not calling 005-ps2sdk.sh

AKuHAK commented 7 years ago

I also remove build folder after each script to make image smaller. Maybe enough to remove it after all scripts are called.

AKuHAK commented 7 years ago

And to my mind it is better to not add ps2-packer, ps2eth, 006-ps2link, gsKit, ps2sdk-ports and so on in docker image. I just dont know if it is possible to use docker image as mounted volume and make changes inside it without calling couple of this stupid long commands: - docker exec -t $(cat container_id) bash -c "cd /; git clone https://github.com/ps2dev/ps2sdk but smth like this:


mount docker\image
git clone https://github.com/ps2dev/ps2sdk
mlafeldt commented 7 years ago

As I said, just create a new Dockerfile for gsKit, something like this:

FROM mlafeldt/ps2dev

RUN ... # whatever you need to change

Then docker build and docker run. That's the Docker workflow.

AKuHAK commented 7 years ago

@mlafeldt So for every and each project I need to create another Dockerimage file and then connect it to new Docker repository and set up this repository? Its too difficult to my mind. I just thought that Dockerimage are used as precompiled virtaul image shich i can mount and work inside it. I still didnt found how it is possible to make via travis. To my mind the only advantage of dockerimage is speed. Ps2toolchain compiles for about 25 minutes - so wait 25 minutes for every project is too much. It is better to set up travis to use docker image and 2-3 minutes is enough to fetch docker image. Of course then I need to run these long commands... but speed is much faster.

AKuHAK commented 7 years ago

And one more moment - docker has public, automated builds. So image is automatically updated. Maybe it will be useful to move Dockerimage file inside ps2sdk/ps2toolchain project? Of course I hope that automated builds now are set up to automatically build when ps2toolchain project is updated, but im not pretty sure that it is really set up cause it is closed info.

AKuHAK commented 7 years ago

How this can be made in travis?

2017-08-20 14:46 GMT+03:00 Mathias Lafeldt notifications@github.com:

As I said, just create a new Dockerfile for gsKit, something like this:

FROM mlafeldt:ps2dev

RUN ... # whatever you need to change

Then docker build and docker run. That's the Docker workflow.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ps2dev/gsKit/pull/7#issuecomment-323580028, or mute the thread https://github.com/notifications/unsubscribe-auth/AAl8SLXL_fb4wZEuLhDUxhM64UaV0EIRks5saByugaJpZM4MFbIh .