diff --git a/.travis.yml b/.travis.yml index c49ba44..d677df0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,53 +7,40 @@ install: - sudo apt-get install -yqqq gcc-4.4 patch wget make git libc6-dev zlib1g zlib1g-dev libucl1 libucl-dev ## ps2dev +services: + - docker + before_script: -# setting environment -- export PS2DEV=${HOME}/ps2dev -- export PS2SDK=${PS2DEV}/ps2sdk -- export PATH=${PATH}:${PS2DEV}/bin:${PS2DEV}/ee/bin:${PS2DEV}/iop/bin:${PS2DEV}/dvp/bin:${PS2SDK}/bin -# installing ps2toolchain (without ps2sdk and ps2link) -- git clone https://github.com/ps2dev/ps2toolchain.git -- cd ps2toolchain/ -# scripts are silenced cause log will be enormous if we will see all output from toolchain setup -- bash ./toolchain.sh 1 > /tmp/PS2TOOLCHAIN1.log 2>&1 -- bash ./toolchain.sh 2 > /tmp/PS2TOOLCHAIN2.log 2>&1 -- bash ./toolchain.sh 3 > /tmp/PS2TOOLCHAIN3.log 2>&1 -- bash ./toolchain.sh 4 > /tmp/PS2TOOLCHAIN4.log 2>&1 -- cd $TRAVIS_BUILD_DIR -# installing ps2sdk at specific commit -- git clone https://github.com/ps2dev/ps2sdk.git -- cd ps2sdk -#- git checkout 9d1d184 -- make install --silent -- cd $TRAVIS_BUILD_DIR +# Get docker image + - docker pull akuhak/ps2toolchain:latest + - docker ps + +# Run DOCKER, run! + - docker run -d akuhak/ps2toolchain bash -c "while true; do sleep 5; done" > container_id + +# Configure ps2sdk + - docker exec -t $(cat container_id) bash -c "ls -l" + - docker exec -t $(cat container_id) bash -c "cd /; git clone https://github.com/ps2dev/ps2sdk" + - docker exec -t $(cat container_id) bash -c "cd /ps2sdk/; make --silent install" + # installing ports -- git clone https://github.com/ps2dev/ps2sdk-ports.git -# installing zlib -- cd ps2sdk-ports/zlib -- make install -- cd $TRAVIS_BUILD_DIR -# installing libjpeg -- cd ps2sdk-ports/libjpeg -- make install -- cd $TRAVIS_BUILD_DIR -# installing libpng -- cd ps2sdk-ports/libpng -- make install -- cd $TRAVIS_BUILD_DIR -# installing gsKit -- export GSKIT=${PS2DEV}/gsKit -- git clone https://github.com/ps2dev/gsKit.git -- cd gsKit/ -- bash ./setup.sh -- cd $TRAVIS_BUILD_DIR -# installing ps2-packer -- git clone https://github.com/ps2dev/ps2-packer.git -- cd ps2-packer -- make install + - docker exec -t $(cat container_id) bash -c "cd /; git clone https://github.com/ps2dev/ps2sdk-ports" + - docker exec -t $(cat container_id) bash -c "cd /ps2sdk-ports/zlib/; make install" + - docker exec -t $(cat container_id) bash -c "cd /ps2sdk-ports/libpng/; make install" + - docker exec -t $(cat container_id) bash -c "cd /ps2sdk-ports/libjpeg/; make install" + +# Set up the gsKit + - docker exec -t $(cat container_id) bash -c "cd /; git clone https://github.com/ps2dev/gsKit /gsKit/" + - docker exec -t $(cat container_id) bash -c "cd /gsKit/; make install" + +# Set up the ps2packer + - docker exec -t $(cat container_id) bash -c "cd /; git clone https://github.com/ps2dev/ps2-packer" + - docker exec -t $(cat container_id) bash -c "cd /ps2-packer/; make; make install" script: -- cd $TRAVIS_BUILD_DIR -- make -f Makefile.ps2 -- zip Fceumm-ps2_$TRAVIS_COMMIT.zip fceu-packed.elf -- curl --upload-file Fceumm-ps2_$TRAVIS_COMMIT.zip https://transfer.sh/Fceumm-ps2.zip | grep transfer + - cd $TRAVIS_BUILD_DIR + - docker exec -t $(cat container_id) bash -c "cd /ps2-packer/; make; make install" + - docker cp $TRAVIS_BUILD_DIR $(cat container_id):/ + - docker exec -t $(cat container_id) bash -c "cd /Fceumm-PS2/; make -f Makefile.ps2" +#- zip Fceumm-ps2_$TRAVIS_COMMIT.zip fceu-packed.elf +#- curl --upload-file Fceumm-ps2_$TRAVIS_COMMIT.zip https://transfer.sh/Fceumm-ps2.zip | grep transfer