Skip to content

Instantly share code, notes, and snippets.

@MariadeAnton
Last active September 20, 2017 16:19
Show Gist options
  • Save MariadeAnton/182ac2a8d30a75470439632a3e9b0e64 to your computer and use it in GitHub Desktop.
Save MariadeAnton/182ac2a8d30a75470439632a3e9b0e64 to your computer and use it in GitHub Desktop.
Hola Adalabers!!

Adalab - fork and go!

Forkea, activa y empieza a compilar! 🎉

Puedes forkear cualquiera de los :octocat: repositorios debajo, ir a tu perfil en Travis,activarlo y empezar a committear en GitHub para que Travis testee los cambios y ver tus builds correr.

Build Stages -

📖 Puedes encontrar más información en Build Stages Docu.

Compilando una release multi-plataforma con Travis CI y Docker

Este ejemplo testea un binario de Rust en diferentes entornos usando Docker, y si los tests pasan, lo publica en GitHub Releases. Demo credit para el genial @joecorcoran - gracias!

  • :octocat: https://github.com/joecorcoran/travis-docker-demo

  • Build Status

    .travis.yml file used:

    language: rust
    
    services: docker
    
    branches:
      only:
        - master
    
    # Install tools for running tests
    install:
      - cargo install cross
    
    # Setup jobs per platform
    jobs:
      include:
        # 64-bit tests
        - &test
          stage: test
          script: cross test --target $TARGET
          env: TARGET=x86_64-unknown-linux-gnu
        # 32-bit tests
        - <<: *test
          env: TARGET=i686-unknown-linux-gnu
        # 64-bit release
        - &deploy
          stage: deploy
          env: TARGET=x86_64-unknown-linux-gnu
          script: skip
          before_deploy:
            - cross build --release --target $TARGET
            - cp target/$TARGET/release/travis-docker-demo .
            - tar czf travis-docker-demo-$TARGET-$TRAVIS_BUILD_NUMBER.tar.gz travis-docker-demo
            - TRAVIS_TAG=build-$TRAVIS_BUILD_NUMBER
          deploy:
            api_key:
              secure: "..."
            file: travis-docker-demo-$TARGET-$TRAVIS_BUILD_NUMBER.tar.gz
            provider: releases
            skip_cleanup: true
        # 32-bit release
        - <<: *deploy
          env: TARGET=i686-unknown-linux-gnu
    
  • 🎥 Video de Ejemplo disponible aquí

DEMO 🍕 TIME

Creditos a la fantástica @lislis, thank you!

Web de Pizza (App Ember Application - construida sobre el servidor de pizza)

Servidor de Pizza (Crystal, disponible en NPM)

.travis.yml usado

```
language: crystal

jobs:
  include:
    - stage: build
      script: crystal build --release src/pizza-server.cr
    - stage: deploy
      script: skip
      deploy: &heroku
        provider: heroku
        app: berlin-pizza
        api_key: $HEROKU_AUTH_TOKEN
        on:
          branch: master
    - stage: npm publish
      script: skip
      deploy:
        provider: npm
        api_key: $NPM_API_KEY
        email: $EMAIL
        on:
          branch: master
          tags: true
```

Compilando y releseando una página web estática con Jekyll

Cron jobs

You can schedule builds in Travis CI:

Demo credit es para la maravillosa @aakritigupta, gracias

¿Qué más?

Edita, testea, compila, releasea!

📖 Aprende más con la docu: Travis CI Docs

📰 No te pierdas nuevas features/noticias, visita Travis CI Blog

🐦 @travisci en Twitter

Preguntas? Comenta aquí!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment