summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlasdair Armstrong2019-12-11 16:35:54 +0000
committerAlasdair Armstrong2019-12-11 18:19:56 +0000
commit0c3ae8f4beea29f524247eea27884b07e0ec238e (patch)
tree383ec6336de28cf6a31c38c905874af22ea278ea
parentb48403b1b91ac355e50e7ede8164c3045b440dc4 (diff)
Add github actions to build on macOS and ubuntu
This commit adds two github action to build Sail on macOS and ubuntu (both using the latest version of each for now). These just build and don't run any tests, as we run those on our own Jenkins server which is much faster than the github build runners. I also fixed INSTALL.md to include brew installing pkg-config on macOS as this seems to be required. From testing on a personal fork it seems quite email happy when it fails. Maybe that's what we want though. There's also a windows option but I leave that as future work...
-rw-r--r--.github/workflows/macOS_build.yml16
-rw-r--r--.github/workflows/ubuntu_build.yml16
-rw-r--r--INSTALL.md2
-rw-r--r--README.md3
-rwxr-xr-xetc/ci_opam_build.sh12
5 files changed, 48 insertions, 1 deletions
diff --git a/.github/workflows/macOS_build.yml b/.github/workflows/macOS_build.yml
new file mode 100644
index 00000000..ebc97a63
--- /dev/null
+++ b/.github/workflows/macOS_build.yml
@@ -0,0 +1,16 @@
+name: CI macOS-latest
+
+on: [push]
+
+jobs:
+ build:
+
+ runs-on: macOS-latest
+
+ steps:
+ - uses: actions/checkout@v1
+ - name: Build on macOS
+ run: |
+ brew install gpatch gmp z3 pkg-config
+ brew install opam
+ etc/ci_opam_build.sh
diff --git a/.github/workflows/ubuntu_build.yml b/.github/workflows/ubuntu_build.yml
new file mode 100644
index 00000000..bf517113
--- /dev/null
+++ b/.github/workflows/ubuntu_build.yml
@@ -0,0 +1,16 @@
+name: CI ubuntu-latest
+
+on: [push]
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v1
+ - name: Build on ubuntu
+ run: |
+ sudo apt install build-essential libgmp-dev z3
+ sudo apt install opam
+ etc/ci_opam_build.sh
diff --git a/INSTALL.md b/INSTALL.md
index e96c80b6..8707ecca 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -30,7 +30,7 @@ sudo apt-get install build-essential libgmp-dev z3
```
or MacOS homebrew:
```
-brew install gmp z3
+brew install gmp z3 pkg-config
```
Finally, install sail and its dependencies:
```
diff --git a/README.md b/README.md
index b079ba2a..c30ae501 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,9 @@
The Sail ISA specification language
===================================
+![](https://github.com/rems-project/sail/workflows/CI%20ubuntu-latest/badge.svg)
+![](https://github.com/rems-project/sail/workflows/CI%20macOS-latest/badge.svg)
+
Overview
========
diff --git a/etc/ci_opam_build.sh b/etc/ci_opam_build.sh
new file mode 100755
index 00000000..10af3e3c
--- /dev/null
+++ b/etc/ci_opam_build.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -eu
+
+opam init -y --no-setup --compiler=4.06.1 --shell=sh
+
+eval `opam config env`
+
+opam repository -y add rems https://github.com/rems-project/opam-repository.git
+opam pin -y add sail .
+opam install -y -v sail
+sail -v