Skip to content

0.9

0.9 #20

Workflow file for this run

# Release building
# ================
# Build binaries to atach to the releases
name: release
# Configure when to run the workflows.
on:
release:
types:
- created
jobs:
# Build & upload release binaries
# ================================
release:
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.0+options,ocaml-option-flambda
- os: macos-latest
dolmen_artifact: dolmen
dolmen_asset: dolmen-macos-amd64
dolmenls_artifact: dolmenls
dolmenls_asset: dolmenls-macos-amd64
ocaml-version: ocaml-variants.4.14.0+options,ocaml-option-flambda
- os: windows-latest
dolmen_artifact: dolmen.exe
dolmen_asset: dolmen-windows-amd64.exe
dolmenls_artifact: dolmenls.exe
dolmenls_asset: dolmenls-windows-amd64.exe
ocaml-version: ocaml-variants.4.14.0+flambda+mingw64c
# 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 the dolmen binary
- name: Upload Dolmen binary to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: _build/install/default/bin/${{ matrix.dolmen_artifact }}
asset_name: ${{ matrix.dolmen_asset }}
tag: ${{ github.ref }}
# Upload the dolmenls binary
- name: Upload Dolmenls binary to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: _build/install/default/bin/${{ matrix.dolmenls_artifact }}
asset_name: ${{ matrix.dolmenls_asset }}
tag: ${{ github.ref }}