diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 1cd637af..5038cb66 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -19,18 +19,37 @@ jobs: with: submodules: recursive - - name: Install dependencies + - name: Install APT dependencies run: | sudo apt update - sudo apt-get install -y libgmp-dev opam pkg-config + sudo apt-get install -y libgmp-dev opam pkg-config lsb-release wget software-properties-common gnupg - # install clang-16 - sudo apt install -y lsb-release wget software-properties-common gnupg + - name: Install Clang 16 + run: | wget https://apt.llvm.org/llvm.sh chmod +x llvm.sh sudo ./llvm.sh 16 - python3 -m pip install --no-deps --require-hashes --requirement requirements.txt + - name: Install Python dependencies + uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 + with: + python-version: '3.10' + cache: 'pip' # caching pip dependencies + run: python3 -m pip install --no-deps --require-hashes --requirement requirements.txt + + # The Opam package manager used by ocaml recompiles everything from source + # Installing the z3 library is especially slow + # So we cache the binaries generated from the build + - name: Cache OCaml tools and libraries + id: cache-opam + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 + with: + path: ~/.opam + key: opam + + - name: Install OCaml tools and libraries + if: steps.cache-opam.outputs.cache-hit != 'true' + run: | opam init --no-setup --disable-sandboxing --compiler=4.14.2 opam install . --deps-only --with-test --with-doc --yes