Skip to content

Commit

Permalink
Update GitHub Actions
Browse files Browse the repository at this point in the history
Signed-off-by: Sora Morimoto <sora@morimoto.io>
  • Loading branch information
smorimoto committed Dec 27, 2024
1 parent 184a270 commit 5bd6551
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 25 deletions.
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: daily
74 changes: 50 additions & 24 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Main workflow
name: Builds, tests & co

on:
- pull_request
- push
- pull_request

jobs:
build:
Expand All @@ -11,40 +11,66 @@ jobs:
matrix:
os:
- ubuntu-latest
# disabled for now:
# - macos-latest
# - windows-latest
node-version:
- 14.x
- macos-latest
- windows-latest
ocaml-compiler:
- 4.14.x
- 4.12.x
- 4.11.x
- 4.10.x
- 4.09.x
- 4.08.x
- 5
- 4
include:
- os: ubuntu-latest
ocaml-compiler: "4.08"

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

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

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
- name: Set-up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: latest

- name: Use OCaml ${{ matrix.ocaml-version }}
uses: ocaml/setup-ocaml@v2
- name: Set-up OCaml
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
opam-pin: false
dune-cache: ${{ matrix.os != 'windows-latest' }}

- run: opam install . --deps-only --with-doc --with-test
- run: opam install . --deps-only --with-test

- run: opam exec -- make

- run: opam exec -- make test
continue-on-error: ${{ runner.os == 'Windows' }}

# 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
1 change: 0 additions & 1 deletion gen_js_api.opam
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ depends: [
"ocaml" {>= "4.08"}
"ppxlib" {>= "0.26"}
"js_of_ocaml-compiler" {with-test}
"conf-npm" {with-test}
"ojs" {= version}
"odoc" {with-doc}
]
Expand Down

0 comments on commit 5bd6551

Please sign in to comment.