# Testing on ARM with Drone CI

**URL:** https://discourse.julialang.org/t/testing-on-arm-with-drone-ci/25871
**Category:** Tooling
**Tags:** ci
**Created:** [June 30, 2019, 10:00pm UTC](https://discourse.julialang.org/t/testing-on-arm-with-drone-ci/25871 "2019-06-30T22:00:41Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)
#### Post date: [June 30, 2019, 10:00pm UTC](https://discourse.julialang.org/t/testing-on-arm-with-drone-ci/25871/1 "2019-06-30T22:00:41Z")

</div>

[Drone CI](https://drone.io/) is a free and open-source continuous integration platform and allows running tests for Julia packages on ARM architecture. You can install a local instance of Drone or use Drone Cloud at [https://cloud.drone.io/](https://cloud.drone.io/) Documentation of Drone is at [https://docs.drone.io/](https://docs.drone.io/).

The `.drone.yml` script to add to the top-directory of your repository to run tests looks like the following:

```yaml
---
kind: pipeline
name: linux - arm - Julia 1.0

platform:
  os: linux
  arch: arm

steps:
- name: build
  image: julia:1.0
  commands:
  - "julia --project=. --check-bounds=yes --color=yes -e 'using InteractiveUtils; versioninfo(verbose=true); using Pkg; Pkg.build(); Pkg.test(coverage=true)'"

---
kind: pipeline
name: linux - arm - Julia 1.1

platform:
  os: linux
  arch: arm

steps:
- name: build
  image: julia:1.1
  commands:
  - "julia --project=. --check-bounds=yes --color=yes -e 'using InteractiveUtils; versioninfo(verbose=true); using Pkg; Pkg.build(); Pkg.test(coverage=true)'"

---
kind: pipeline
name: linux - arm64 - Julia 1.0

platform:
  os: linux
  arch: arm64

steps:
- name: build
  image: julia:1.0
  commands:
  - "julia --project=. --check-bounds=yes --color=yes -e 'using InteractiveUtils; versioninfo(verbose=true); using Pkg; Pkg.build(); Pkg.test(coverage=true)'"

---
kind: pipeline
name: linux - arm64 - Julia 1.1

platform:
  os: linux
  arch: arm64

steps:
- name: build
  image: julia:1.1
  commands:
  - "julia --project=. --check-bounds=yes --color=yes -e 'using InteractiveUtils; versioninfo(verbose=true); using Pkg; Pkg.build(); Pkg.test(coverage=true)'"

...

```

The YAML script doesn’t support a matrix, like Travis does, to easily setup different jobs for different architectures and/or Julia versions, however it’s possible to write a simple [Jsonnet](https://jsonnet.org/) script from which the full YAML can be automatically generated. For example, I generated the above YAML script from this Jsonnet script:

```json
local Pipeline(os, arch, version) = {
    kind: "pipeline",
    name: os+" - "+arch+" - Julia "+version,
    platform: {
	os: os,
	arch: arch
    },
    steps: [
	{
	    name: "build",
	    image: "julia:"+version,
	    commands: [
		"julia --project=. --check-bounds=yes --color=yes -e 'using InteractiveUtils; versioninfo(verbose=true); using Pkg; Pkg.build(); Pkg.test(coverage=true)'"
	    ]
	}
    ]
};

[
    Pipeline("linux", "arm", "1.0"),
    Pipeline("linux", "arm", "1.1"),
    Pipeline("linux", "arm64", "1.0"),
    Pipeline("linux", "arm64", "1.1")
]

```

While it’s possible to directly use the Jsonnet script in a local instance of Drone (see, e.g., [Porting matrix builds to 1.0 multi-machine pipelines - FAQ - Drone](https://discourse.drone.io/t/porting-matrix-builds-to-1-0-multi-machine-pipelines/2966)), this feature is not supported by Drone Cloud (see [Drone Cloud and jsonnet? - Drone](https://discourse.drone.io/t/drone-cloud-and-jsonnet/4621)), so if you want to use this service you have to manually generate the YAML file and have it in your repository. See [here](https://docs.drone.io/cli/install/) how to download and install the [Drone command line utility](https://github.com/drone/drone-cli). Once you get it, you can generate the `.drone.yml` script with

```nohighlight
drone jsonnet --stream .drone.jsonnet

```

---

<div class="post-metadata">

### Author: ![ianshmean](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ianshmean/32/216042_2.png) [@ianshmean](https://discourse.julialang.org/u/ianshmean)
#### Post date: [September 23, 2019, 5:30pm UTC](https://discourse.julialang.org/t/testing-on-arm-with-drone-ci/25871/2 "2019-09-23T17:30:47Z")

</div>

Just one additional note, that tags for pre-release ARM builds can be found over at [Docker Hub](https://hub.docker.com/_/julia?tab=tags)

---

<div class="post-metadata">

### Author: ![ianshmean](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ianshmean/32/216042_2.png) [@ianshmean](https://discourse.julialang.org/u/ianshmean)
#### Post date: [September 23, 2019, 7:43pm UTC](https://discourse.julialang.org/t/testing-on-arm-with-drone-ci/25871/3 "2019-09-23T19:43:59Z")

</div>

And another, [gcc/g++ aren’t installed in the arm images](https://github.com/docker-library/julia/issues/13), but can be added with:

```julia
kind: pipeline
name: linux-arm-1.3-RC2

platform:
 os: linux
 arch: arm

steps:
- name: build
  image: julia:1.3.0-rc2
  commands:
     - uname -a
     - apt-get update
     - apt-get install -y gcc g++
     - julia --project=. -e 'using Pkg; Pkg.build(); Pkg.test(coverage=true)'

```
