Skip to content

Commit eb0bc4d

Browse files
andreypoppdavesnx
authored andcommitted
ocamlformat-mlx
1 parent 354bd47 commit eb0bc4d

38 files changed

+708
-265
lines changed

.github/workflows/build-linux.yml

Lines changed: 65 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -36,81 +36,82 @@ jobs:
3636
- name: Opam dependencies
3737
run: opam install --deps-only -t .
3838

39-
- name: Format
40-
run: opam exec -- dune fmt
39+
# - name: Format
40+
# run: opam exec -- dune fmt
4141

4242
- name: Build
4343
run: |
4444
opam exec -- dune subst
45-
opam exec -- dune build -p ocamlformat-lib,ocamlformat
45+
opam exec -- dune build -p ocamlformat-mlx-lib,ocamlformat-mlx
4646
4747
- name: Runtest
4848
run: opam exec -- dune runtest
4949

50-
- name: Check manpages
51-
run: opam exec -- dune build @gen_manpage --auto-promote
50+
# - name: Check manpages
51+
# run: opam exec -- dune build @gen_manpage --auto-promote
5252

5353
- name: Upload binary
5454
# Using a specific version because of https://github.com/actions/upload-artifact/issues/590
5555
uses: actions/[email protected]
5656
with:
5757
name: ocamlformat-${{ runner.os }}-${{ runner.arch }}
58-
path: _build/install/default/bin/ocamlformat
59-
60-
test-branch:
61-
if: ${{ github.ref != 'refs/heads/main' }}
62-
needs: build-linux
63-
runs-on: ubuntu-latest
64-
strategy:
65-
matrix:
66-
profile:
67-
- conventional
68-
- ocamlformat
69-
- janestreet
70-
# To enable comparing with ocp-indent:
71-
# include:
72-
# - ocp_indent: true
73-
# ocp_indent_config: JaneStreet
74-
# profile: janestreet
75-
76-
steps:
77-
- name: Install ocp-indent
78-
if: ${{ matrix.ocp_indent }}
79-
run: |
80-
sudo apt install -y ocp-indent
81-
sudo touch /etc/ocamlfind.conf
82-
83-
# Clone the project
84-
- uses: actions/checkout@v3
85-
with:
86-
fetch-depth: 0
87-
88-
- uses: actions/cache@v3
89-
with:
90-
path: test-extra/code
91-
key: test-extra-code
92-
93-
- name: Fetch main build of ocamlformat
94-
uses: dawidd6/action-download-artifact@v6
95-
with:
96-
workflow: build-linux.yml
97-
workflow_conclusion: ""
98-
check_artifacts: true
99-
branch: main
100-
name: ocamlformat-${{ runner.os }}-${{ runner.arch }}
101-
path: ocamlformat-a
102-
103-
- name: Fetch new build of ocamlformat
104-
uses: actions/[email protected]
105-
with:
106-
name: ocamlformat-${{ runner.os }}-${{ runner.arch }}
107-
path: ocamlformat-b
108-
109-
- name: Test ${{ matrix.profile }} profile
110-
run: |
111-
chmod +x ocamlformat-a/ocamlformat ocamlformat-b/ocamlformat
112-
./tools/test_branch.sh $TEST_BRANCH_ARGS -n -a ocamlformat-a/ocamlformat -b ocamlformat-b/ocamlformat 'profile=${{ matrix.profile }}'
113-
shell: bash
114-
env:
115-
OCP_INDENT_CONFIG: ${{ matrix.ocp_indent_config }}
116-
TEST_BRANCH_ARGS: ${{ matrix.ocp_indent && '-o -s' || '' }}
58+
path: _build/install/default/bin/ocamlformat-mlx
59+
60+
# test-branch:
61+
# if: ${{ github.ref != 'refs/heads/main' }}
62+
# needs: build-linux
63+
# runs-on: ubuntu-latest
64+
# strategy:
65+
# matrix:
66+
# profile:
67+
# - conventional
68+
# - ocamlformat
69+
# - janestreet
70+
# # To enable comparing with ocp-indent:
71+
# # include:
72+
# # - ocp_indent: true
73+
# # ocp_indent_config: JaneStreet
74+
# # profile: janestreet
75+
#
76+
# steps:
77+
# - name: Install ocp-indent
78+
# if: ${{ matrix.ocp_indent }}
79+
# run: |
80+
# sudo apt install -y ocp-indent
81+
# sudo touch /etc/ocamlfind.conf
82+
#
83+
# # Clone the project
84+
# - uses: actions/checkout@v3
85+
# with:
86+
# fetch-depth: 0
87+
#
88+
# - uses: actions/cache@v3
89+
# with:
90+
# path: test-extra/code
91+
# key: test-extra-code
92+
#
93+
# - name: Fetch main build of ocamlformat
94+
# uses: dawidd6/action-download-artifact@v6
95+
# with:
96+
# workflow: build-linux.yml
97+
# workflow_conclusion: ""
98+
# check_artifacts: true
99+
# branch: main
100+
# name: ocamlformat-${{ runner.os }}-${{ runner.arch }}
101+
# path: ocamlformat-a
102+
# allow_forks: true
103+
#
104+
# - name: Fetch new build of ocamlformat
105+
# uses: actions/[email protected]
106+
# with:
107+
# name: ocamlformat-${{ runner.os }}-${{ runner.arch }}
108+
# path: ocamlformat-b
109+
#
110+
# - name: Test ${{ matrix.profile }} profile
111+
# run: |
112+
# chmod +x ocamlformat-a/ocamlformat ocamlformat-b/ocamlformat
113+
#./tools/test_branch.sh $TEST_BRANCH_ARGS -n -a ocamlformat-a/ocamlformat -b ocamlformat-b/ocamlformat 'profile=${{ matrix.profile }}'
114+
# shell: bash
115+
# env:
116+
# OCP_INDENT_CONFIG: ${{ matrix.ocp_indent_config }}
117+
# TEST_BRANCH_ARGS: ${{ matrix.ocp_indent && '-o -s' || '' }}

.github/workflows/build-mingw64.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,21 @@ jobs:
4343

4444
- name: Install dependencies
4545
run: |
46-
opam pin add -yn ocamlformat-lib.dev .
47-
opam pin add -yn ocamlformat.dev .
48-
opam install -y --deps-only ocamlformat
46+
opam pin add -yn ocamlformat-mlx-lib.dev .
47+
opam pin add -yn ocamlformat-mlx.dev .
48+
opam install -y --deps-only ocamlformat-mlx
4949
5050
- name: Build
5151
run: |
5252
opam exec -- dune subst
53-
opam exec -- dune build -p ocamlformat-lib,ocamlformat @install
54-
opam exec -- dune install --prefix=install ocamlformat
55-
Copy-Item ${{ github.workspace }}\\install\\bin\\ocamlformat.exe -Destination .\${{ env.artifact_name }}
53+
opam exec -- dune build -p ocamlformat-mlx-lib,ocamlformat-mlx @install
54+
opam exec -- dune install --prefix=install ocamlformat-mlx
55+
Copy-Item ${{ github.workspace }}\\install\\bin\\ocamlformat-mlx.exe -Destination .\${{ env.artifact_name }}
5656
5757
- name: Version check
5858
run: |
5959
echo "Version check:"
60-
install/bin/ocamlformat.exe --version
60+
install/bin/ocamlformat-mlx.exe --version
6161
6262
- name: Upload Artifact
6363
uses: actions/upload-artifact@v4

.github/workflows/build-others.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ jobs:
3737
- name: Opam dependencies
3838
run: opam install --deps-only -t .
3939

40-
- name: Format
41-
run: opam exec -- dune fmt
40+
# - name: Format
41+
# run: opam exec -- dune fmt
4242

4343
- name: Runtest
4444
run: opam exec -- dune runtest

.github/workflows/changelog-check.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ jobs:
99
Changelog-Entry-Check:
1010
name: Check Changelog Action
1111
runs-on: ubuntu-latest
12-
steps:
13-
- uses: tarides/changelog-check-action@v1
12+
# We don't push changelog entries
13+
# steps:
14+
# - uses: tarides/changelog-check-action@v1

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ default: exe
1414

1515
.PHONY: exe
1616
exe:
17-
@dune build bin/ocamlformat/main.exe bin/ocamlformat-rpc/main.exe
17+
@dune build bin/ocamlformat/main.exe
1818

1919
.PHONY: clean
2020
clean:

bin/dune

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
(data_only_dirs ocamlformat-rpc)

bin/ocamlformat/dune

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@
1111

1212
(executable
1313
(name main)
14-
(public_name ocamlformat)
15-
(package ocamlformat)
14+
(public_name ocamlformat-mlx)
15+
(package ocamlformat-mlx)
1616
(modules main)
1717
(flags
1818
(:standard -open Ocamlformat_stdlib))
1919
(instrumentation
2020
(backend bisect_ppx))
21-
(libraries ocamlformat-lib bin_conf))
21+
(libraries ocamlformat-mlx-lib bin_conf))
2222

2323
(rule
2424
(with-stdout-to
2525
ocamlformat.1
2626
(run ./main.exe --help=groff)))
2727

28-
(install
29-
(section man)
30-
(files ocamlformat.1)
31-
(package ocamlformat))
28+
; (install
29+
; (section man)
30+
; (files ocamlformat.1)
31+
; (package ocamlformat))

dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
(flags
1515
(:standard -noassert))))
1616

17-
(data_only_dirs test-extra)
17+
(data_only_dirs test-extra mlx lib-rpc lib-rpc-server emacs doc bench tools)
1818

1919
(rule
2020
(with-stdout-to

0 commit comments

Comments
 (0)