melezhik / RakuDist

Test Raku modules against different OS, Rakudo versions
8 stars 0 forks source link

Create configs for Travis-CI and Appveyor #2

Closed MARTIMM closed 4 years ago

MARTIMM commented 4 years ago

I am not really sure if this is possible but would you be able to show how a rakudist could be made on the Travis and Appveyor test servers. I think this would be a great relief in setting up a test environment on those servers. One of my projects uses a MongoDB server and another uses native GTK libraries. Also when that is accomplished, I could deliver this as information on how to install things before using the modules in the project.

Anyway, this project sounds great Marcel

melezhik commented 4 years ago

Hi! First of all thank you for your interest in the project.

Let me clarify this.

Do you want a hosted solution when RakuDist and docker is deployed on Travis virtual machine.

Or you're going just make calls to RakuDist public API from your Travis scripts?

On Feb 4, 2020 6:53 AM, "Marcel Timmerman" notifications@github.com wrote:

I am not really sure if this is possible but would you be able to show how a rakudist could be made on the Travis and Appveyor test servers. I think this would be a great relief in setting up a test environment on those servers. One of my projects uses a MongoDB server and another uses native GTK libraries. Also when that is accomplished, I could deliver this as information on how to install things before using the modules in the project.

Anyway, this project sounds great Marcel

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/melezhik/RakuDist/issues/2?email_source=notifications&email_token=AAHRHSIO2JQQQN4JLFWWPCLRBFQM7A5CNFSM4KPWNJR2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IK4LKSQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHRHSNZSVU3PSUK67CLZZTRBFQM7ANCNFSM4KPWNJRQ .

melezhik commented 4 years ago

I've just added job statuses feature, so from Travis side scenario would be look like:

token=$(curl -s -d os=debian http://repo.westus.cloudapp.azure.com/rakudist/api/run/Kind)
while true; do
  status=$(curl -s -d token=$token http://repo.westus.cloudapp.azure.com/rakudist/job/status)
  if test $status != "running"; then
    break
  fi
done
echo "test: $status"
curl -s -d token=$token http://repo.westus.cloudapp.azure.com/rakudist/job/report
MARTIMM commented 4 years ago

Thanks for your answer Alexey

I do not have any experience with your project yet so I couldn't say what is good for me, but I think I would make calls to RakuDist public API from my Travis scripts. I have to work with it to ask proper questions. I've also seen that Windows isn't supported yet so the Appveyor server is not yet usable with this package I believe.

I also had a faulty brain twist in that you could install Rakudo with it, but it needs Raku to run it right? Chicken and egg problem... ;-)

Marcel

melezhik commented 4 years ago

Hi Marcel. Yes Windows is not supported now. If I find how to run windows in docker hosted in Linux host the support becomes trivial.

Yes. You could start using API by doing http requests.

I also had a faulty brain twist in that you could install Rakudo with it, but it needs Raku to run it right? Chicken and egg problem... ;-)

I am not sure if I quite follow you here, but yes RakuDist service uses some default Rakudo version but it could test your Raku distribution against any Rakudo version.

The doc explains how. There could be some sharp edges but you still could give it a try and I'd glad to assist you.

MARTIMM commented 4 years ago

Ok, I'll try some and see where it goes... Thanks again, Marcel

melezhik commented 4 years ago

correct example:

token=$(curl -s -d os=debian http://repo.westus.cloudapp.azure.com/rakudist/api/run/Kind)
echo $token
while true; do
  status=$(curl -s -d token=$token http://repo.westus.cloudapp.azure.com/rakudist/api/job/status)
  sleep 5
  echo $status
  if [ $status != "running" ]; then
    break
  fi
done
echo "test: $status"
curl -L -s -d token=$token http://repo.westus.cloudapp.azure.com/rakudist/api/job/report
melezhik commented 4 years ago

Travis example - https://github.com/melezhik/sparrowdo/blob/master/.travis.yml

melezhik commented 4 years ago

Or even simpler - https://github.com/melezhik/RakuDist/blob/master/docs/api.md#travis-integration-example

language: minimal

script:
  - curl -d thing=https://github.com/melezhik/sparrowdo http://rakudist.raku.org/ci -s | bash