diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 00000000..a8a642c8 --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,17 @@ +name: format + +on: + push: + branches: + - main + pull_request: + +jobs: + format: + name: format + runs-on: ubuntu-latest + container: ghcr.io/c-cube/c-cube-commmon/ci-4.14:latest + + steps: + - uses: actions/checkout@v6 + - run: opam exec -- make format-check diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index bb3f943d..539047a5 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -8,18 +8,13 @@ on: jobs: deploy: runs-on: ubuntu-latest + container: ghcr.io/c-cube/c-cube-commmon/ci-doc-5.3:latest + steps: - - uses: actions/checkout@main - with: - submodules: 'recursive' - - uses: ocaml/setup-ocaml@v3 - with: - ocaml-compiler: '5.2' - dune-cache: true - allow-prerelease-opam: true + - uses: actions/checkout@v6 - name: Deps - run: opam install odig linol linol-lwt + run: opam install linol linol-lwt - name: Build run: opam exec -- odig odoc --cache-dir=_doc/ linol linol-lwt || (odig log -e ; exit 1) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 20ad873d..f1c9c00f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,52 +6,27 @@ on: pull_request: jobs: build4: - strategy: - matrix: - os: - - ubuntu-latest - ocaml-compiler: - - 4.14.x - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest + container: ghcr.io/c-cube/c-cube-commmon/ci-4.14:latest steps: - - uses: actions/checkout@main + - uses: actions/checkout@v6 with: submodules: 'recursive' - - uses: ocaml/setup-ocaml@v3 - with: - ocaml-compiler: ${{ matrix.ocaml-compiler }} - dune-cache: true - allow-prerelease-opam: true - run: opam pin -n . - run: opam depext -yt linol linol-lwt - run: opam install linol linol-lwt --deps-only -t - run: opam exec -- dune build -p linol,linol-lwt - run: opam exec -- dune runtest -p linol,linol-lwt - if: ${{ matrix.os == 'ubuntu-latest' }} + build5: - strategy: - matrix: - os: - - ubuntu-latest - #- macos-latest - #- windows-latest - ocaml-compiler: - - 5.1.x - - 5.2.x - - 5.3.x - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest + container: ghcr.io/c-cube/c-cube-commmon/ci-5.4:latest steps: - - uses: actions/checkout@main + - uses: actions/checkout@v6 with: - submodules: 'recursive' - - uses: ocaml/setup-ocaml@v3 - with: - ocaml-compiler: ${{ matrix.ocaml-compiler }} - dune-cache: true - allow-prerelease-opam: true + submodules: 'recursive' - run: opam pin -n . - run: opam depext -yt linol linol-lwt linol-eio - run: opam install -t . --deps-only - run: opam exec -- dune build - run: opam exec -- dune runtest - if: ${{ matrix.os == 'ubuntu-latest' }} diff --git a/Makefile b/Makefile index 7c1430d9..00e2f5d9 100644 --- a/Makefile +++ b/Makefile @@ -13,9 +13,12 @@ clean: doc: @dune build @doc -fmt: +format: @dune build @fmt --auto-promote +format-check: + @dune build $(DUNE_OPTS) @fmt --display=quiet + update-submodules: @git submodule update --init