From 327cd7ccdd99bc5b271ce8fa0a1dd83b8b5d5a52 Mon Sep 17 00:00:00 2001 From: Sora Morimoto Date: Tue, 24 Dec 2024 11:58:09 +0900 Subject: [PATCH] Update GitHub Actions workflow Signed-off-by: Sora Morimoto --- .github/workflows/workflow.yml | 46 +++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 9c8145ceb..b36711479 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -1,24 +1,26 @@ -name: Main workflow +name: Builds, tests & co on: - pull_request: push: + pull_request: schedule: # Prime the caches every Monday - cron: 0 1 * * MON +permissions: read-all + jobs: build: strategy: fail-fast: false matrix: os: - - macos-latest - ubuntu-latest + - macos-latest - windows-latest ocaml-compiler: - - "4.14" - - "5.2" + - 5 + - 4 include: - os: ubuntu-latest ocaml-compiler: "4.08" @@ -40,10 +42,42 @@ jobs: uses: ocaml/setup-ocaml@v3 with: ocaml-compiler: ${{ matrix.ocaml-compiler }} - opam-pin: false - run: opam install . --deps-only - run: opam exec -- bash ./configure - run: opam exec -- make all + + lint-doc: + runs-on: ubuntu-latest + steps: + - name: Checkout tree + uses: actions/checkout@v4 + - name: Set-up OCaml + uses: ocaml/setup-ocaml@v3 + with: + ocaml-compiler: 5 + - uses: ocaml/setup-ocaml/lint-doc@v3 + + lint-fmt: + runs-on: ubuntu-latest + steps: + - name: Checkout tree + uses: actions/checkout@v4 + - name: Set-up OCaml + uses: ocaml/setup-ocaml@v3 + with: + ocaml-compiler: 5 + - uses: ocaml/setup-ocaml/lint-fmt@v3 + + lint-opam: + runs-on: ubuntu-latest + steps: + - name: Checkout tree + uses: actions/checkout@v4 + - name: Set-up OCaml + uses: ocaml/setup-ocaml@v3 + with: + ocaml-compiler: 5 + - uses: ocaml/setup-ocaml/lint-opam@v3