diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3062461d..7c31c304 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -31,21 +31,21 @@ jobs: packages: write steps: - name: Checkout (GitHub) - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Login to GitHub Container Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} + password: ${{ github.token }} - name: Build and run Dev Container task uses: devcontainers/ci@v0.3 with: imageName: ghcr.io/mt-caret/polars-ocaml cacheFrom: ghcr.io/mt-caret/polars-ocaml - push: always + refFilterForPush: refs/heads/main runCmd: | opam exec -- dune build opam exec -- dune runtest @@ -57,21 +57,20 @@ jobs: packages: write steps: - name: Checkout (GitHub) - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Login to GitHub Container Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} + password: ${{ github.token }} - name: uses: devcontainers/ci@v0.3 with: imageName: ghcr.io/mt-caret/polars-ocaml cacheFrom: ghcr.io/mt-caret/polars-ocaml - push: always runCmd: | apt install --yes pkg-config libssl-dev cargo install cargo-msrv @@ -80,7 +79,7 @@ jobs: rust-checks: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # We need nightly, at least until # https://github.com/mt-caret/polars-ocaml/pull/30 is merged. @@ -118,10 +117,12 @@ jobs: ocaml-checks: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ocaml/setup-ocaml@v2 with: ocaml-compiler: 4.14.x + - uses: ocaml/setup-ocaml/lint-opam@v2 + - uses: ocaml/setup-ocaml/lint-fmt@v2 diff --git a/.github/workflows/odoc.yaml b/.github/workflows/odoc.yaml new file mode 100644 index 00000000..d4ff0316 --- /dev/null +++ b/.github/workflows/odoc.yaml @@ -0,0 +1,54 @@ +name: Deploy odoc to GitHub Pages + +on: + push: + branches: + - main + +permissions: read-all + +concurrency: + group: deploy-odoc + cancel-in-progress: true + +jobs: + deploy-odoc: + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + permissions: + contents: read + id-token: write + pages: write + + steps: + - name: Checkout (GitHub) + uses: actions/checkout@v4 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build documentation + uses: devcontainers/ci@v0.3 + with: + imageName: ghcr.io/mt-caret/polars-ocaml + cacheFrom: ghcr.io/mt-caret/polars-ocaml + runCmd: | + opam exec -- dune build @doc + + - name: Set-up Pages + uses: actions/configure-pages@v4 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + path: _build/default/_doc/_html + + - name: Deploy odoc to GitHub Pages + id: deployment + uses: actions/deploy-pages@v3 diff --git a/dune-project b/dune-project index 1ffac3bd..17fb7ce4 100644 --- a/dune-project +++ b/dune-project @@ -7,9 +7,9 @@ (source (github mt-caret/polars-ocaml)) -(authors "mtakeda") +(authors mtakeda) -(maintainers "mtakeda") +(maintainers mtakeda) (license MIT) @@ -25,6 +25,8 @@ (core_bench :with-test) (expect_test_helpers_core :with-test) (mdx :with-test) + (ocaml + (< 5.0.0)) (ocamlformat :dev) (odoc :with-doc) (re2 :with-test) @@ -35,8 +37,6 @@ core_unix dune ; ocaml-interop does not yet properly support OCaml 5 - (ocaml - (< 5.0.0)) ppx_jane ppx_typed_fields) (tags @@ -56,6 +56,7 @@ (shell :with-test) async core - polars) + polars + ppx_jane) (tags (data-science polars rust))) diff --git a/polars.opam b/polars.opam index 62b215a2..42b90823 100644 --- a/polars.opam +++ b/polars.opam @@ -13,6 +13,7 @@ depends: [ "core_bench" {with-test} "expect_test_helpers_core" {with-test} "mdx" {with-test} + "ocaml" {< "5.0.0"} "ocamlformat" {dev} "odoc" {with-doc} "re2" {with-test} @@ -22,7 +23,6 @@ depends: [ "core_kernel" "core_unix" "dune" {>= "3.8"} - "ocaml" {< "5.0.0"} "ppx_jane" "ppx_typed_fields" ] diff --git a/polars_async.opam b/polars_async.opam index 6a40cf1d..3c94c1f8 100644 --- a/polars_async.opam +++ b/polars_async.opam @@ -21,6 +21,7 @@ depends: [ "async" "core" "polars" + "ppx_jane" ] build: [ ["dune" "subst"] {dev}