Skip to content

Commit

Permalink
merge master with a lot of conflicts fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
gfngfn committed Aug 10, 2024
2 parents c1fae25 + 4d27f13 commit 30a184e
Show file tree
Hide file tree
Showing 25 changed files with 505 additions and 373 deletions.
15 changes: 4 additions & 11 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
# See editorconfig.org for details

root = true

[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8

[*.{ml,mli,mll,mly}]
indent_style = space
indent_size = 2

[*.{saty,satyh}]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[Makefile]
indent_style = tab
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
64 changes: 0 additions & 64 deletions .github/workflows/ci.yml

This file was deleted.

97 changes: 97 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: Builds, tests & co

on:
push:
pull_request:
schedule:
- cron: 0 1 * * MON

jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
# - windows-latest
ocaml-compiler:
- 4

runs-on: ${{ matrix.os }}

steps:
- name: Checkout tree
uses: actions/checkout@v4

# - name: Set SHELLOPTS=igncr on Windows
# if: runner.os == 'Windows'
# run: echo "SHELLOPTS=igncr" >>"$GITHUB_ENV"

- name: Restore fonts cache
uses: actions/cache@v4
id: fonts-cache
with:
path: lib-satysfi/dist/fonts
key: cache-dist-fonts-${{ hashFiles('download-fonts.sh') }}

- name: Set-up OCaml
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
dune-cache: true
opam-repositories: |
satysfi-external: git+https://github.com/gfngfn/satysfi-external-repo.git
default: git+https://github.com/ocaml/opam-repository.git
- name: Install SATySFi dependencies
run: opam install . --deps-only

- name: Build SATySFi
run: opam exec -- make all

- name: Run tests
run: opam exec -- dune runtest

- name: Download fonts
if: steps.fonts-cache.outputs.cache-hit != 'true'
run: ./download-fonts.sh

- name: Install SATySFi
run: |
opam install .
./install-libs.sh ~/.satysfi
- name: Build demo docs
run: |
(cd demo; opam exec -- make)
(cd doc; opam exec -- make)
(cd tests; opam exec -- make)
lint-fmt:
runs-on: ubuntu-latest
steps:
- name: Checkout tree
uses: actions/checkout@v4
- name: Set-up OCaml
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: 4
opam-repositories: |
satysfi-external: git+https://github.com/gfngfn/satysfi-external-repo.git
default: git+https://github.com/ocaml/opam-repository.git
- uses: ocaml/setup-ocaml/lint-fmt@v3

lint-opam:
runs-on: ubuntu-latest
steps:
- name: Checkout tree
uses: actions/checkout@v4
- name: Set-up OCaml
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: 4
opam-repositories: |
satysfi-external: git+https://github.com/gfngfn/satysfi-external-repo.git
default: git+https://github.com/ocaml/opam-repository.git
- uses: ocaml/setup-ocaml/lint-opam@v3
29 changes: 29 additions & 0 deletions .github/workflows/opam-dependency-submission.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Opam Dependency Submission

on:
push:
branches:
- master

concurrency:
group: opam-dependency-submission
cancel-in-progress: true

permissions: read-all

jobs:
opam-dependency-submission:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout tree
uses: actions/checkout@v4
- name: Set-up OCaml
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: 4
opam-repositories: |
satysfi-external: git+https://github.com/gfngfn/satysfi-external-repo.git
default: git+https://github.com/ocaml/opam-repository.git
- uses: ocaml/setup-ocaml/analysis@v3
81 changes: 6 additions & 75 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,75 +1,6 @@
.DS_Store
\#*
.\#*
*~
*.exe
*.tex
*.log
*.aux
*.dvi
*.fdb_latexmk
*.fls
*.synctex.gz
*.pdf
*.out
*.html
obsolete/*.txt
old/
*.png
satysfi
*.ttf
*.otf
*.ttc
*.dfont
*.afm
*.t1a
*.svg
!/logo/macrodown.svg
*.dat
*.ttx
*.jpg
!/demo/satysfi-logo.jpg
!/tests/images/satysfi-logo-cmyk.jpg
!/tests/images/satysfi-logo-gray.jpg
!/tests/images/satysfi-logo-rgb.jpg
!/tests/images/peppers-cmyk.jpg
!/tests/images/peppers-gray.jpg
!/tests/images/peppers-rgb.jpg
*.satysfi-aux
external/

# Created by https://www.toptal.com/developers/gitignore/api/ocaml
# Edit at https://www.toptal.com/developers/gitignore?templates=ocaml

### OCaml ###
*.annot
*.cmo
*.cma
*.cmi
*.a
*.o
*.cmx
*.cmxs
*.cmxa

# ocamlbuild working directory
_build/

# ocamlbuild targets
*.byte
*.native

# oasis generated files
setup.data
setup.log

# Merlin configuring file for Vim and Emacs
.merlin

# Dune generated files
*.install

# Local OPAM switch
_opam

# End of https://www.toptal.com/developers/gitignore/api/ocaml
/_build/
/_opam/
/lib-satysfi/dist/fonts/
/temp/IPAexfont00401/
/temp/latinmodern-math-1959/
/temp/*.zip
24 changes: 7 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,27 +1,17 @@
PREFIX=/usr/local
LIBDIR=$(PREFIX)/share/satysfi
TARGET=satysfi
BINDIR=$(PREFIX)/bin
RM=rm -f
DUNE=dune

.PHONY: all install lib uninstall clean
.PHONY: all clean install uninstall

all:
$(DUNE) build --root .
cp _build/install/default/bin/$(TARGET) .
dune build

install: $(TARGET)
mkdir -p $(BINDIR)
install $(TARGET) $(BINDIR)
clean:
dune clean

#preliminary:
# [ -d .git ] && git submodule update -i || echo "Skip git submodule update -i"
install:
dune install --bindir=$(BINDIR)

uninstall:
rm -rf $(BINDIR)/$(TARGET)
rm -rf $(LIBDIR)

clean:
$(DUNE) clean
$(RM) satysfi
dune uninstall --bindir=$(BINDIR)
7 changes: 3 additions & 4 deletions bin/dune
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
(name satysfi)
(public_name satysfi)
(libraries
main
cmdliner)
(preprocess no_preprocessing)
)
main
cmdliner)
(preprocess no_preprocessing))
Loading

0 comments on commit 30a184e

Please sign in to comment.