Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/binary-nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ jobs:
- os: ubuntu-22.04
name: x86_64-unknown-linux-musl
installable: .#dune-static
- os: ubuntu-22.04-arm
name: aarch64-unknown-linux-musl
installable: .#dune-static

# If the latest commit is the same as latest run, don't re-run.
if: ${{ needs.check_build.outputs.action == 'BUILD' || github.event_name == 'workflow_dispatch' }}
Expand All @@ -68,8 +71,8 @@ jobs:

- uses: actions/checkout@v6
with:
repository: ocaml/dune
ref: main
repository: Leonidas-from-XIV/dune
ref: aarch64-cross-nix
fetch-depth: 0 # for git describe

- name: Checkout
Expand Down Expand Up @@ -124,6 +127,8 @@ jobs:
name: aarch64-apple-darwin
- os: ubuntu-22.04
name: x86_64-unknown-linux-musl
- os: ubuntu-22.04-arm
name: aarch64-unknown-linux-musl

runs-on: ${{ matrix.os }}
needs: binary
Expand All @@ -148,7 +153,11 @@ jobs:

- name: Check dune is working
run: |
export PATH="$HOME/.local/bin:$PATH"
local_bin="$HOME/.local/bin"
export PATH="$local_bin:$PATH"
file "$local_bin/dune"
ldd "$local_bin/dune"
which dune
cd binary-distribution/test
dune --version
dune pkg lock --root .
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/binary-stable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ jobs:
- os: ubuntu-22.04
name: x86_64-unknown-linux-musl
installable: .#dune-static
- os: ubuntu-22.04-arm
name: aarch64-unknown-linux-musl
installable: .#dune-static

# if we have nothing new to build, skip
if: ${{ needs.check_build.outputs.action == 'BUILD' }}
Expand Down Expand Up @@ -147,6 +150,8 @@ jobs:
name: aarch64-apple-darwin
- os: ubuntu-22.04
name: x86_64-unknown-linux-musl
- os: ubuntu-22.04-arm
name: aarch64-unknown-linux-musl

runs-on: ${{ matrix.os }}
needs: [check_build, binary]
Expand Down
14 changes: 13 additions & 1 deletion lib/metadata.ml
Original file line number Diff line number Diff line change
@@ -1,42 +1,54 @@
module Target = struct
type t =
| Aarch64_apple_darwin
| Aarch64_unknown_linux_musl
| X86_64_apple_darwin
| X86_64_unknown_linux_musl
[@@deriving yojson]

let to_string = function
| Aarch64_apple_darwin -> "aarch64-apple-darwin"
| Aarch64_unknown_linux_musl -> "aarch64-unknown-linux-musl"
| X86_64_apple_darwin -> "x86_64-apple-darwin"
| X86_64_unknown_linux_musl -> "x86_64-unknown-linux-musl"
;;

let of_string = function
| "aarch64-apple-darwin" -> Some Aarch64_apple_darwin
| "aarch64-unknown-linux-musl" -> Some Aarch64_unknown_linux_musl
| "x86_64-apple-darwin" -> Some X86_64_apple_darwin
| "x86_64-unknown-linux-musl" -> Some X86_64_unknown_linux_musl
| _ -> None
;;

let to_human_readable_string = function
| Aarch64_apple_darwin -> "Apple macOS (ARM64)"
| Aarch64_unknown_linux_musl -> "Linux (ARM64, musl)"
| X86_64_apple_darwin -> "Apple macOS (x86-64)"
| X86_64_unknown_linux_musl -> "Linux (x86-64, musl)"
;;

let to_description = function
| Aarch64_apple_darwin -> "macOS 11 or later for Apple silicon processors"
| Aarch64_unknown_linux_musl -> "Linux for ARM 64-bit processors"
| X86_64_apple_darwin -> "macOS 11 or later for Intel processors"
| X86_64_unknown_linux_musl -> "Linux for Intel 64-bit processors"
;;

let to_triple = function
| Aarch64_apple_darwin -> "aarch64", "apple", "macOS"
| Aarch64_unknown_linux_musl -> "aarch64", "unknown", "Linux"
| X86_64_apple_darwin -> "x86-64", "apple", "macOS"
| X86_64_unknown_linux_musl -> "x86-64", "unknown", "Linux"
;;

let defaults = [ Aarch64_apple_darwin; X86_64_apple_darwin; X86_64_unknown_linux_musl ]
let defaults =
[ Aarch64_apple_darwin
; Aarch64_unknown_linux_musl
; X86_64_apple_darwin
; X86_64_unknown_linux_musl
]
;;
end

module Pdate = struct
Expand Down
Loading