Skip to content

[TEST] Trying out to build static binaries in CI #1

[TEST] Trying out to build static binaries in CI

[TEST] Trying out to build static binaries in CI #1

Workflow file for this run

# Buildability check
# ==================
# Build dolmen using various version of the OCaml compiler
name: static
# Configure when to run the workflows. Currently only when
# it affects the `master` branch (either pushes to the branch,
# or pull request against it).
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
# Build & upload release binaries
# ================================
static:
runs-on: ${{ matrix.os }}
# Build Matrix
# --------------
strategy:
# Do not cancel other jobs when one fails
fail-fast: false
matrix:
# Specify bin/artefact names and ocaml versions for each OS
include:
- os: ubuntu-latest
dolmen_artifact: dolmen
dolmen_asset: dolmen-linux-amd64
dolmenls_artifact: dolmenls
dolmenls_asset: dolmenls-linux-amd64
ocaml-version: ocaml-variants.4.14.2+options,ocaml-option-flambda,ocaml-option-musl,ocaml-option-static
# Build ENV
# ---------
env:
# Ensure opam will not stop because it waits on some user input
OPAMYES: "true"
# Build/test steps
# ----------------
steps:
# checkout the repo
- name: Checkout the repo
uses: actions/checkout@v3
# Setup ocaml/opam
- name: Setup ocaml/opam
uses: avsm/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-version }}
# Run opam udpate to get an up-to-date repo
- name: Update opam repo
run: opam update
# Install deps
- name: Install deps
run: opam install . --deps-only --with-test --with-doc
# Build the package
- name: Build the package
run: opam exec -- dune build --profile=release @install
# Upload artefact for testing
- name: Upload test
uses: actions/upload-artifact@v4
with:
name: dolmen
path: _build/install/default/bin/dolmen