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

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

schedule:
# Prime the caches every Monday
- cron: 0 1 * * MON

jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
packages:
- "punycode.opam"
ocaml-compiler:
- "ocaml-variants.5.3.0+options,ocaml-option-afl"
- "5.3"
- "4.14"
- "4.08"

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

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

- name: Set-up OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}

- name: Install dependencies
run: |
opam install . --with-test --deps-only

- name: Build
run: |
opam exec -- dune build @all

- name: Tests
run: |
opam exec -- dune build @runtest

- name: Opam Lint
run: |
opam lint .
7 changes: 0 additions & 7 deletions .ocamlinit

This file was deleted.

29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion doc/api.odocl

This file was deleted.

22 changes: 21 additions & 1 deletion dune-project
Original file line number Diff line number Diff line change
@@ -1 +1,21 @@
(lang dune 1.9)
(lang dune 3.7)
(name punycode)
(generate_opam_files true)

(license AGPL-3.0-only)
(maintainers "cfcs")
(authors "cfcs")
(source (github cfcs/ocaml-punycode))

(package
(name punycode)
(synopsis "RFC 3492: IDNA Punycode library")
(depends
(ocaml (>= 4.08))
astring
uutf
rresult
(domain-name (>= 0.3))
(alcotest :with-test)
(crowbar :with-test)
(qcheck :with-test)))
49 changes: 27 additions & 22 deletions punycode.opam
Original file line number Diff line number Diff line change
@@ -1,30 +1,35 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
name: "punycode"
synopsis: "RFC 3492: IDNA Punycode library"
homepage: "https://github.com/cfcs/ocaml-punycode"
dev-repo: "git+https://github.com/cfcs/ocaml-punycode.git"
bug-reports: "https://github.com/cfcs/ocaml-punycode/issues"
doc: "https://cfcs.github.io/ocaml-punycode/doc"
author: ["cfcs"]
maintainer: ["cfcs"]
license: "AGPL"

build: [
["dune" "build" "-p" name "-j" jobs]
["dune" "build" "-p" name "runtest"] {with-test}
]

synopsis: "RFC 3492: IDNA Punycode library"
maintainer: ["cfcs"]
authors: ["cfcs"]
license: "AGPL-3.0-only"
homepage: "https://github.com/cfcs/ocaml-punycode"
bug-reports: "https://github.com/cfcs/ocaml-punycode/issues"
depends: [
"ocaml" { >= "4.02" }
"dune" { >= "1.9.3" & build }

"dune" {>= "3.7"}
"ocaml" {>= "4.08"}
"astring"
"domain-name" { >= "0.3" }
"uchar" # for ocaml 4.02 compat
"rresult"
"uutf"

"rresult"
"domain-name" {>= "0.3"}
"alcotest" {with-test}
"crowbar" {with-test}
"qcheck" {with-test}
"odoc" {with-doc}
]
build: [
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/cfcs/ocaml-punycode.git"
3 changes: 1 addition & 2 deletions src/dune
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
(public_name punycode)
(synopsis "Punycode IDNA library")
(modules :standard)
(libraries astring domain-name uchar uutf rresult)
)
(libraries astring domain-name uutf rresult))
2 changes: 1 addition & 1 deletion src/punycode.mli
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ val msg_of_decode_error : punycode_decode_error -> [> `Msg of string]
*)


(** {1:unicode2punycode Unicode -> Punycode}*)
(** {1:unicode2punycode Unicode -> Punycode} *)


val to_encoded_domain_name : string ->
Expand Down
1 change: 0 additions & 1 deletion src/punycode.mllib

This file was deleted.

18 changes: 5 additions & 13 deletions tests/dune
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
(executables
(names tests)
(public_names -)
(libraries punycode qcheck crowbar alcotest)
)
(alias
(name runtest)
(action
(progn
(run ./tests.exe)
)
)
)
(test
(name tests)
(package punycode)
(libraries punycode qcheck crowbar alcotest)
(modules tests))