mirror of
https://github.com/ocaml-tracing/ocaml-trace.git
synced 2026-05-05 08:54:27 -04:00
change CI to use container images
This commit is contained in:
parent
41b152c789
commit
83d408355b
3 changed files with 22 additions and 48 deletions
17
.github/workflows/format.yml
vendored
17
.github/workflows/format.yml
vendored
|
|
@ -1,28 +1,17 @@
|
||||||
name: format
|
name: format
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
format:
|
format:
|
||||||
name: format
|
name: format
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
ocaml-compiler:
|
|
||||||
- '5.3'
|
|
||||||
runs-on: 'ubuntu-latest'
|
runs-on: 'ubuntu-latest'
|
||||||
|
container: ghcr.io/c-cube/c-cube-commmon/ci-doc-5.3:latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@main
|
- uses: actions/checkout@v6
|
||||||
- name: Use OCaml ${{ matrix.ocaml-compiler }}
|
|
||||||
uses: ocaml/setup-ocaml@v3
|
|
||||||
with:
|
|
||||||
ocaml-compiler: ${{ matrix.ocaml-compiler }}
|
|
||||||
dune-cache: true
|
|
||||||
allow-prerelease-opam: true
|
|
||||||
|
|
||||||
- run: opam install ocamlformat.0.27.0
|
|
||||||
- run: opam exec -- make format-check
|
- run: opam exec -- make format-check
|
||||||
|
|
||||||
|
|
|
||||||
14
.github/workflows/gh-pages.yml
vendored
14
.github/workflows/gh-pages.yml
vendored
|
|
@ -11,20 +11,12 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
container: ghcr.io/c-cube/c-cube-commmon/ci-doc-5.3:latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@main
|
- uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Use OCaml
|
|
||||||
uses: ocaml/setup-ocaml@v3
|
|
||||||
with:
|
|
||||||
ocaml-compiler: '5.1.x'
|
|
||||||
allow-prerelease-opam: true
|
|
||||||
dune-cache: true
|
|
||||||
|
|
||||||
- run: opam pin odoc 3.1.0 -y -n
|
|
||||||
# crash with 2.4, see https://github.com/ocaml/odoc/issues/1066
|
|
||||||
- name: Deps
|
- name: Deps
|
||||||
run: opam install odig thread-local-storage trace trace-tef trace-fuchsia ppx_trace
|
run: opam install thread-local-storage trace trace-tef trace-fuchsia ppx_trace
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: opam exec -- odig odoc --cache-dir=_doc/ trace trace-tef trace-fuchsia ppx_trace
|
run: opam exec -- odig odoc --cache-dir=_doc/ trace trace-tef trace-fuchsia ppx_trace
|
||||||
|
|
|
||||||
39
.github/workflows/main.yml
vendored
39
.github/workflows/main.yml
vendored
|
|
@ -1,4 +1,4 @@
|
||||||
name: Build and Test
|
name: build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
|
@ -8,28 +8,21 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
name: build
|
name: build # build+test on various versions of OCaml, on linux
|
||||||
|
timeout-minutes: 15
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
os:
|
container:
|
||||||
- ubuntu-latest
|
- ghcr.io/c-cube/c-cube-commmon/ci-4.08:latest
|
||||||
#- macos-latest
|
- ghcr.io/c-cube/c-cube-commmon/ci-4.14:latest
|
||||||
#- windows-latest
|
- ghcr.io/c-cube/c-cube-commmon/ci-5.0:latest
|
||||||
ocaml-compiler:
|
- ghcr.io/c-cube/c-cube-commmon/ci-5.4:latest
|
||||||
- '4.08.x'
|
|
||||||
- '4.14.x'
|
|
||||||
- '5.3.x'
|
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ubuntu-latest
|
||||||
|
container: ${{ matrix.container }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@main
|
- uses: actions/checkout@v6
|
||||||
- name: Use OCaml ${{ matrix.ocaml-compiler }}
|
|
||||||
uses: ocaml/setup-ocaml@v3
|
|
||||||
with:
|
|
||||||
ocaml-compiler: ${{ matrix.ocaml-compiler }}
|
|
||||||
dune-cache: true
|
|
||||||
allow-prerelease-opam: true
|
|
||||||
|
|
||||||
# check that trace compiles with no optional deps
|
# check that trace compiles with no optional deps
|
||||||
- run: opam install -t trace --deps-only
|
- run: opam install -t trace --deps-only
|
||||||
|
|
@ -37,11 +30,11 @@ jobs:
|
||||||
|
|
||||||
# install all packages
|
# install all packages
|
||||||
- run: opam install -t trace trace-tef trace-fuchsia --deps-only
|
- run: opam install -t trace trace-tef trace-fuchsia --deps-only
|
||||||
- run: opam install ppx_trace --deps-only # no tests
|
- run: opam install ppx_trace --deps-only
|
||||||
if: matrix.ocaml-compiler != '4.08.x'
|
if: ${{ !contains(matrix.container, 'ci-4.08') }}
|
||||||
- run: opam exec -- dune build '@install' -p trace,trace-tef,trace-fuchsia
|
- run: opam exec -- dune build '@install' -p trace,trace-tef,trace-fuchsia
|
||||||
- run: opam exec -- dune build '@install' -p ppx_trace
|
- run: opam exec -- dune build '@install' -p ppx_trace
|
||||||
if: matrix.ocaml-compiler != '4.08.x'
|
if: ${{ !contains(matrix.container, 'ci-4.08') }}
|
||||||
- run: opam exec -- dune runtest -p trace
|
- run: opam exec -- dune runtest -p trace
|
||||||
- run: opam install trace
|
- run: opam install trace
|
||||||
- run: opam exec -- dune runtest -p trace-tef,trace-fuchsia
|
- run: opam exec -- dune runtest -p trace-tef,trace-fuchsia
|
||||||
|
|
@ -51,9 +44,9 @@ jobs:
|
||||||
- run: opam exec -- dune build '@install' -p trace,trace-tef,trace-fuchsia
|
- run: opam exec -- dune build '@install' -p trace,trace-tef,trace-fuchsia
|
||||||
|
|
||||||
- run: opam install picos_aux
|
- run: opam install picos_aux
|
||||||
if: matrix.ocaml-compiler != '4.08.x' && matrix.ocaml-compiler != '4.12.x'
|
if: ${{ !contains(matrix.container, 'ci-4.') }}
|
||||||
- run: opam exec -- dune build '@install' -p trace,trace-tef,trace-fuchsia
|
- run: opam exec -- dune build '@install' -p trace,trace-tef,trace-fuchsia
|
||||||
if: matrix.ocaml-compiler != '4.08.x' && matrix.ocaml-compiler != '4.12.x'
|
if: ${{ !contains(matrix.container, 'ci-4.') }}
|
||||||
|
|
||||||
- run: opam install mtime
|
- run: opam install mtime
|
||||||
- run: opam exec -- dune build '@install' -p trace,trace-tef,trace-fuchsia
|
- run: opam exec -- dune build '@install' -p trace,trace-tef,trace-fuchsia
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue