Dune-binaries #3
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: Dune-binaries | |
on: | |
workflow_dispatch: | |
jobs: | |
binary: | |
name: Create | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: macos-13 | |
name: dune-macos-x86_64 | |
ocaml-compiler: 4.14.2 | |
- os: macos-14 | |
name: dune-macos-arm64 | |
ocaml-compiler: 4.14.2 | |
- os: ubuntu-22.04 | |
name: dune-x86_64-linux | |
ocaml-compiler: 4.14.2 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Use OCaml ${{ matrix.os.ocaml-compiler }} | |
uses: ocaml/setup-ocaml@v2 | |
with: | |
ocaml-compiler: ${{ matrix.os.ocaml-compiler }} | |
opam-depext: false | |
- name: Install system deps on macOS | |
run: brew install coreutils pkg-config file | |
if: ${{ matrix.os == 'macos-14' || matrix.os == 'macos-13' }} | |
- name: Install deps on Unix | |
run: | | |
opam install . --deps-only | |
# Ensure Dune can build itself | |
- run: opam exec -- make bootstrap | |
# Add the version | |
- name: Add Dune version | |
run: echo "(version \"Dune Developer Preview $(date +%Y-%m-%dT%T)\")" >> dune-project | |
- name: Build & Install | |
run: | | |
opam exec -- ./dune.exe build | |
opam exec -- ./dune.exe install --prefix fake_root | |
- uses: actions/upload-artifact@v4 | |
with: | |
path: fake_root/bin/dune | |
name: dune-${{ matrix.name }} | |
combine: | |
runs-on: ubuntu-latest | |
needs: binary | |
steps: | |
- uses: actions/upload-artifact/merge@v4 | |
with: | |
separate-directories: true |