Webinar: ARM DevSummit 2020

Header

These are the exact examples I used for the ARM DevSummit, integrating Travis CI in real world solutions with ARM and AWS.

ARM DevSummit Webinar (ARM64, AWS Graviton2)

This example is within the 7 minute time frame given. In short it will be showing the speed of builds with and without ARM64 & AWS Graviton, using simple Hello World scripts that I’ve created. In the .travis.yml file, I’ll layout a .travis.yml file that looks similar to this, give or take a couple of languages/scripts:

os: linux
dist: focal
arch: arm64-graviton2
group: edge
virt: lxd

jobs:
  include:
  - language: cpp
    compiler: clang
    script:
      - g++ -nostartfiles main.cpp

  - language: node_js
    node_js:
      - node
    script:
      - node hello.js
      
  - language: python
    python:
      - "3.6"
    script:
      - python hello.py
      
  - language: ruby
    script:
      - return 0
  
  - language: go
    script:
      - go build hello.go
      - go test hello.go

Then go through step by step on what the new arm64-graviton2 flag does and how to invoke it:

os: linux
dist: focal
arch: arm64-graviton2 # redirects to aws graviton2
group: edge           # required for now (for Ubuntu 20.04 Focal Fossa)
virt: lxd 

Now virt you can also use:

virt: vm              # redirects to 'full-vm' instance

Concurrenetly full-vm can have 8 jobs. The scripts are straight forward, for example here’s the NodeJS script I’ve created:


/**
 * Greet someone according to the given name.
 *
 * @param  {String} name
 * @return {String}
 */
module.exports = {
  greet: function(name="World") {
    return String(`Hello, ${name}!`);
  }
};

We can theoretically add as many languages as we want, which is the beauty of this example. Another .travis.yml I’ve setup is the speedtests of Go, which looks something like this:

arch: arm64-graviton2
language: go
jobs:
  include:
    - os: linux
      dist: trusty
    - os: linux
      dist: xenial
    - os: linux
      dist: precise
    - os: linux
      dist: focal
    - os: linux
      dist: bionic

script:
  - go run hello.go
  - go build hello.go

In the above example, it built C++ and Node, but again we can do more languages to further show speed, and as far as setup – that is explained above. If you have any questions, please email me back and I’ll be glad to help!

Happy building!