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
43 changes: 43 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Builds, tests & co

on:
- push
- pull_request

permissions: read-all

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

strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
fail-fast: false

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

- name: Set-up OCaml
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: 5

- run: opam install . --deps-only --with-test

- run: opam exec -- dune build

- run: opam exec -- dune runtest

lint-fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: 5
- uses: ocaml/setup-ocaml/lint-fmt@v3 # Check ocamlformat
3 changes: 3 additions & 0 deletions .ocamlformat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
profile = default
version = 0.29.0
version-check = false
51 changes: 49 additions & 2 deletions dune-project
Original file line number Diff line number Diff line change
@@ -1,3 +1,50 @@
(lang dune 1.0)
(lang dune 2.9)
(name plotkicadsch)
(version 0.4.0)
(generate_opam_files true)

(package
(name plotkicadsch)
(synopsis "A command line tool to plot and compare KiCad schematics")
(description "plotkicadsch lets you export Kicad schematics to SVG, up to version 9, while plotgitsch lets you compare git revisions of the schematic pages")
(authors "Jean-Noël Avila <jn.avila@free.fr>")
(maintainers "Jean-Noël Avila <jn.avila@free.fr>")
(bug_reports "https://github.com/jnavila/plotkicadsch/issues")
(version 0.4.0)
(source (uri "git+https://github.com/jnavila/plotkicadsch"))
(homepage "https://github.com/jnavila/plotkicadsch")
(license GPL-2.0-or-later)
(depends
ocaml
base64
kicadsch
digestif
dune
cmdliner
lwt_ppx
ppx_deriving
tyxml
git-unix
sha
)
)
(package
(name kicadsch)
(synopsis "A library to parse KiCad schematics")
(description "kicadsch is a library to parse KiCad schematics, up to version 9")
(authors "Jean-Noël Avila <jn.avila@free.fr>")
(maintainers "Jean-Noël Avila <jn.avila@free.fr>")
(bug_reports "https://github.com/jnavila/plotkicadsch/issues")
(version 0.4.0)
(source (uri "git+https://github.com/jnavila/plotkicadsch"))
(homepage "https://github.com/jnavila/plotkicadsch")
(license GPL-2.0-or-later)
(depends
ocaml
uuidm
dune
csexp
ppx_deriving
ppx_inline_test
parsexp
ounit2
))
55 changes: 33 additions & 22 deletions kicadsch.opam
Original file line number Diff line number Diff line change
@@ -1,28 +1,39 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
maintainer: "Jean-Noël Avila <jn.avila@free.fr>"
authors: "Jean-Noël Avila <jn.avila@free.fr>"
homepage: "https://jnavila.github.io/plotkicadsch/"
doc: "https://jnavila.github.io/plotkicadsch/index"
synopsis: "Library to read and convert Kicad Sch files"
description: """
Library able to read Kicad libraries and sch file and
drive a painter to paint the schematics.
"""
version: "0.4.0"
synopsis: "A library to parse KiCad schematics"
description:
"kicadsch is a library to parse KiCad schematics, up to version 9"
maintainer: ["Jean-Noël Avila <jn.avila@free.fr>"]
authors: ["Jean-Noël Avila <jn.avila@free.fr>"]
license: "GPL-2.0-or-later"
homepage: "https://github.com/jnavila/plotkicadsch"
bug-reports: "https://github.com/jnavila/plotkicadsch/issues"
license: "ISC"
dev-repo: "git+https://github.com/jnavila/plotkicadsch.git"
build: [
[ "dune" "subst" ] {dev}
[ "dune" "build" "-p" name "-j" jobs ]
["dune" "runtest" "-p" name "-j" jobs] {with-test}
]
depends: [
"ppx_inline_test" {with-test}
"ocaml"
"uuidm"
"parsexp"
"dune" {>= "2.9"}
"csexp"
"ppx_deriving"
"dune" {>= "1.0"}
"ounit" {with-test}
"ocaml" {>="4.07"}
"ppx_inline_test"
"parsexp"
"ounit2"
"odoc" {with-doc}
]
build: [
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"--promote-install-files=false"
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
["dune" "install" "-p" name "--create-install-files" name]
]
available: arch != "arm32" & arch != "x86_32"
dev-repo: "git+https://github.com/jnavila/plotkicadsch"
23 changes: 9 additions & 14 deletions kicadsch/src/dune
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
(library
(preprocess (pps ppx_deriving.show ppx_deriving.ord))
(name kicadsch)
(public_name kicadsch)
(modules_without_implementation kicadSch_sigs kicadDefs)
(synopsis "Library to plotting KiCAD schematics")
(libraries
angstrom
uuidm
sexp_decode
parsexp
base64
)
(flags (:standard -w -3 -safe-string))
)
(preprocess
(pps ppx_deriving.show ppx_deriving.ord))
(name kicadsch)
(public_name kicadsch)
(modules_without_implementation kicadSch_sigs kicadDefs)
(synopsis "Library to plotting KiCAD schematics")
(libraries angstrom uuidm sexp_decode parsexp base64)
(flags
(:standard -w -3 -safe-string)))
Loading
Loading