From 83c23acc4724acd421403b2e0d9053c58067a83d Mon Sep 17 00:00:00 2001 From: Benedikt Radtke Date: Tue, 29 Sep 2020 00:46:07 +0200 Subject: [PATCH] Check sail-arm and sail-riscv in CI, use matrix instead of separate files --- .github/workflows/build.yaml | 39 +++++++++++++++++++ .github/workflows/macOS_build.yml | 16 -------- .github/workflows/ubuntu_18_04_build.yml | 18 --------- .github/workflows/ubuntu_20_04_build.yml | 16 -------- .../workflows/ubuntu_20_04_build_latest.yml | 16 -------- etc/ci_opam_build.sh | 12 ------ etc/ci_opam_latest_build.sh | 12 ------ 7 files changed, 39 insertions(+), 90 deletions(-) create mode 100644 .github/workflows/build.yaml delete mode 100644 .github/workflows/macOS_build.yml delete mode 100644 .github/workflows/ubuntu_18_04_build.yml delete mode 100644 .github/workflows/ubuntu_20_04_build.yml delete mode 100644 .github/workflows/ubuntu_20_04_build_latest.yml delete mode 100755 etc/ci_opam_build.sh delete mode 100755 etc/ci_opam_latest_build.sh diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 000000000..c5c78df06 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,39 @@ +name: Sail CI Build + +on: + push: + pull_request: + schedule: + - cron: "0 0 * * *" + +jobs: + full-test: + strategy: + matrix: + os: [ubuntu-20.04, macOS-latest] + ocaml: [4.06.1, 4.10.0] + runs-on: ${{ matrix.os }} + + steps: + - name: Check out repo + uses: actions/checkout@v2 + - name: Install deps (linux) + if: matrix.os == 'ubuntu-20.04' + run: sudo apt-get install -y --no-install-recommends build-essential libgmp-dev z3 libz3-dev opam + - name: Install deps (macOS) + if: matrix.os == 'macOS-latest' + run: brew install gpatch gmp z3 pkg-config opam + - name: init opam + run: opam init -y --no-setup --compiler=${{ matrix.ocaml }} --shell=sh + - name: opam config env + run: eval `opam config env` + - name: pin and install sail from git + run: opam pin -y add sail $PWD + - name: test sail installation + run: eval $(opam env) && sail -v + + - name: make sail-arm + run: git clone https://github.com/rems-project/sail-arm.git && cd sail-arm/arm-v8.5-a && eval $(opam env) && make + + - name: make sail-riscv + run: git clone https://github.com/rems-project/sail-riscv.git && cd sail-riscv && eval $(opam env) && make diff --git a/.github/workflows/macOS_build.yml b/.github/workflows/macOS_build.yml deleted file mode 100644 index ebc97a632..000000000 --- a/.github/workflows/macOS_build.yml +++ /dev/null @@ -1,16 +0,0 @@ -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_18_04_build.yml b/.github/workflows/ubuntu_18_04_build.yml deleted file mode 100644 index ada366b42..000000000 --- a/.github/workflows/ubuntu_18_04_build.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: CI ubuntu-18.04 - -on: [push] - -jobs: - build: - - runs-on: ubuntu-18.04 - - steps: - - uses: actions/checkout@v1 - - name: Build on ubuntu - run: | - sudo add-apt-repository ppa:avsm/ppa - sudo apt update - sudo apt install build-essential libgmp-dev z3 m4 - sudo apt install opam - etc/ci_opam_build.sh diff --git a/.github/workflows/ubuntu_20_04_build.yml b/.github/workflows/ubuntu_20_04_build.yml deleted file mode 100644 index 097b56bff..000000000 --- a/.github/workflows/ubuntu_20_04_build.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: CI ubuntu-20.04 - -on: [push] - -jobs: - build: - - runs-on: ubuntu-20.04 - - 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/.github/workflows/ubuntu_20_04_build_latest.yml b/.github/workflows/ubuntu_20_04_build_latest.yml deleted file mode 100644 index 4e9158d75..000000000 --- a/.github/workflows/ubuntu_20_04_build_latest.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: CI ubuntu-20.04 (ocaml latest) - -on: [push] - -jobs: - build: - - runs-on: ubuntu-20.04 - - steps: - - uses: actions/checkout@v1 - - name: Build on ubuntu (ocaml latest) - run: | - sudo apt install build-essential libgmp-dev z3 - sudo apt install opam - etc/ci_opam_latest_build.sh diff --git a/etc/ci_opam_build.sh b/etc/ci_opam_build.sh deleted file mode 100755 index 10af3e3c2..000000000 --- a/etc/ci_opam_build.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/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 diff --git a/etc/ci_opam_latest_build.sh b/etc/ci_opam_latest_build.sh deleted file mode 100755 index 9e994b229..000000000 --- a/etc/ci_opam_latest_build.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -set -eu - -opam init -y --no-setup --compiler=4.10.0 --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