From 52c5bd221f7b0b8e93c0dc308a8457755c144124 Mon Sep 17 00:00:00 2001 From: Tim Hutt Date: Thu, 8 Aug 2024 10:28:21 +0100 Subject: [PATCH] Install Sail from binary in CI This should be a lot faster. It also means the version is pinned properly which wasn't the case before. I also recommended users to do the same in the README do they don't have to deal with OPAM. --- .github/workflows/compile.yml | 10 ++++------ README.md | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index 865c748a5..edfd2e766 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -7,19 +7,17 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Install packages - run: sudo apt install -y opam zlib1g-dev pkg-config libgmp-dev z3 device-tree-compiler + run: sudo apt install -y opam zlib1g-dev pkg-config libgmp-dev device-tree-compiler curl - name: Check out repository code uses: actions/checkout@HEAD with: submodules: true - name: Ensure pre-commit checks pass run: pip install pre-commit && pre-commit run --all-files --show-diff-on-failure --color=always - - name: Init opam - run: opam init --disable-sandboxing -y - - name: Install sail - run: opam install -y sail + - name: Install sail from binary + run: mkdir -p /usr/local && curl --location https://github.com/rems-project/sail/releases/download/0.18-linux-binary/sail.tar.gz | tar xvz --directory=/usr/local - name: Build and test simulators - run: eval $(opam env) && test/run_tests.sh + run: test/run_tests.sh - name: Upload test results if: always() uses: actions/upload-artifact@v4 diff --git a/README.md b/README.md index 25057078d..11ee98575 100644 --- a/README.md +++ b/README.md @@ -275,7 +275,7 @@ Getting started ### Building the model -Install [Sail](https://github.com/rems-project/sail/) [using opam](https://github.com/rems-project/sail/blob/sail2/INSTALL.md) then: +Install [Sail](https://github.com/rems-project/sail/). On Linux you can download a [binary release](https://github.com/rems-project/sail/releases) (strongly recommended), or you can install from source [using opam](https://github.com/rems-project/sail/blob/sail2/INSTALL.md). Then: ``` $ make