Add Github CI workflows #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Setup Oxenstored environment | |
description: Setup an Oxenstored environment for making opam calls. | |
runs: | |
using: "composite" | |
steps: | |
- name: Update Ubuntu repositories | |
shell: bash | |
run: sudo apt-get update | |
- name: Use disk with more space for TMPDIR and XDG_CACHE_HOME | |
shell: bash | |
run: | | |
df -h || true | |
export TMPDIR="/mnt/build/tmp" | |
export XDG_CACHE_HOME="/mnt/build/cache" | |
sudo mkdir -p "${TMPDIR}" "${XDG_CACHE_HOME}" | |
sudo chown "$(id -u):$(id -g)" "${TMPDIR}" "${XDG_CACHE_HOME}" | |
echo "TMPDIR=${TMPDIR}" >>"$GITHUB_ENV" | |
echo "XDG_CACHE_HOME=${XDG_CACHE_HOME}" >>"$GITHUB_ENV" | |
- name: Get runner OS info | |
uses: kenchan0130/actions-system-info@master | |
id: system-info | |
# We set DUNE_CACHE_STORAGE_MODE, it is required for dune cache to work inside opam for now, | |
# otherwise it gets EXDEV and considers it a cache miss | |
- name: Use ocaml | |
uses: ocaml/setup-ocaml@v3 | |
with: | |
ocaml-compiler: ${{ steps.dotenv.outputs.ocaml_version_full }} | |
opam-repositories: | | |
xs-opam: ${{ steps.dotenv.outputs.repository }} | |
dune-cache: true | |
opam-pin: false | |
cache-prefix: v3-${{ steps.system-info.outputs.name }}-${{ steps.system-info.outputs.release }} | |
env: | |
DUNE_CACHE_STORAGE_MODE: copy | |
- name: Install dependencies | |
shell: bash | |
run: opam install . --deps-only --with-test -v |