Skip to content

Commit

Permalink
chore: update nix flakes, add OCaml 5.2 to CI (#201)
Browse files Browse the repository at this point in the history
* chore: update nix flakes, add OCaml 5.2 to CI

* revert some changes

* add concurrency

* no dev

* no dev ssl
  • Loading branch information
anmonteiro authored Jun 25, 2024
1 parent bc57d00 commit 1217ea2
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/opam-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ jobs:
# - macos-latest
- ubuntu-latest
ocaml-compiler:
- 5.x
- 5.1
- 5.2

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

Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"concurrency": {
"cancel-in-progress": true,
"group": "${{ github.workflow }}-${{ github.ref }}"
},
"jobs": {
"macos-latest": {
"runs-on": "macos-latest",
Expand All @@ -24,7 +28,6 @@
"fail-fast": false,
"matrix": {
"ocamlVersion": [
"5_1",
"5_2"
]
}
Expand Down
8 changes: 4 additions & 4 deletions dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@
"Piaf is an HTTP library and webserver written entirely in OCaml.")
(depends
(ocaml
(>= "5.0"))
(>= "5.1"))
logs
(eio-ssl :dev)
magic-mime
(ssl :dev)
ssl
uri
ipaddr
httpun-eio
gluten-eio
(h2-eio :dev)
(httpun-ws :dev)
h2-eio
httpun-ws
(multipart_form :dev)
(eio_main
(>= "1.0"))
Expand Down
2 changes: 1 addition & 1 deletion nix/ci/test.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let
pkgs = import src {
extraOverlays = [
(self: super: {
ocamlPackages = super.ocaml-ng."ocamlPackages_${ocamlVersion}".overrideScope'
ocamlPackages = super.ocaml-ng."ocamlPackages_${ocamlVersion}".overrideScope
(oself: osuper: {
eio_main = osuper.eio_main.overrideAttrs (_: {
# Use eio_posix until the kernel version for GH Actions gets rolled
Expand Down
6 changes: 5 additions & 1 deletion nix/gh-actions.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ let
cachedBuild = { name, branches ? [ "master" ], os }:
lib.generators.toYAML { } {
inherit name;
concurrency = {
group = "\${{ github.workflow }}-\${{ github.ref }}";
cancel-in-progress = true;
};
on = {
pull_request = null;
push = {
Expand All @@ -65,7 +69,7 @@ gh-actions.cachedBuild {
os = {
macos-latest = {
name = "Run nix-build";
ocamlVersions = [ "5_1" "5_2" ];
ocamlVersions = [ "5_2" ];
run = "nix-build ./nix/ci/test.nix -A native --argstr ocamlVersion \${{ matrix.ocamlVersion }}";
};
ubuntu-latest = {
Expand Down
8 changes: 4 additions & 4 deletions piaf.opam
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ homepage: "https://github.com/anmonteiro/piaf"
bug-reports: "https://github.com/anmonteiro/piaf/issues"
depends: [
"dune" {>= "2.8"}
"ocaml" {>= "5.0"}
"ocaml" {>= "5.1"}
"logs"
"eio-ssl" {dev}
"magic-mime"
"ssl" {dev}
"ssl"
"uri"
"ipaddr"
"httpun-eio"
"gluten-eio"
"h2-eio" {dev}
"httpun-ws" {dev}
"h2-eio"
"httpun-ws"
"multipart_form" {dev}
"eio_main" {>= "1.0"}
"dune-site" {with-test}
Expand Down

0 comments on commit 1217ea2

Please sign in to comment.