From 93d78463498c1a8780bd825e71fcd62bcdfd8804 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Mon, 6 Apr 2026 17:35:18 -0400 Subject: [PATCH] use prebuilt docker images for CI --- .github/workflows/format.yml | 19 +++-------- .github/workflows/gh-pages.yml | 12 +++---- .github/workflows/main.yml | 59 ++++++++-------------------------- 3 files changed, 21 insertions(+), 69 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index acbf3d16..a8a642c8 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -9,20 +9,9 @@ on: jobs: 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-4.14:latest + steps: - - uses: actions/checkout@main - - 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 + - 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 c18dffc9..df6b80e3 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -3,20 +3,16 @@ name: github pages on: push: branches: - - master # Set a branch name to trigger deployment + - main jobs: deploy: name: Deploy doc runs-on: ubuntu-latest - steps: - - uses: actions/checkout@main + container: ghcr.io/c-cube/c-cube-commmon/ci-5.4:latest - - name: Use OCaml - uses: ocaml/setup-ocaml@v3 - with: - ocaml-compiler: '5.2' - dune-cache: false + steps: + - uses: actions/checkout@v6 - name: Deps run: opam install odig containers containers-data diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 708567ba..deba401d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,58 +7,25 @@ on: pull_request: jobs: - run: + build: name: build timeout-minutes: 15 strategy: - fail-fast: true + fail-fast: false matrix: - os: - - ubuntu-latest - ocaml-compiler: - - '4.08' - - '4.10' - - '4.14' - - '5.3' - - 'ocaml-variants.5.0.0+options,ocaml-option-bytecode-only' + include: + - ocaml-version: "4.08" + container: ghcr.io/c-cube/c-cube-commmon/ci-4.08:latest + - ocaml-version: "4.14" + container: ghcr.io/c-cube/c-cube-commmon/ci-4.14:latest + - ocaml-version: "5.4" + container: ghcr.io/c-cube/c-cube-commmon/ci-5.4:latest + + runs-on: ubuntu-latest + container: ${{ matrix.container }} - runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@main - - name: Use OCaml ${{ matrix.ocaml-compiler }} - uses: ocaml/setup-ocaml@v3 - with: - ocaml-compiler: ${{ matrix.ocaml-compiler }} - dune-cache: true - allow-prerelease-opam: true + - uses: actions/checkout@v6 - run: opam install -t containers containers-data --deps-only - run: opam exec -- dune build '@install' - run: opam exec -- dune runtest --force --profile=release - - compat: - name: build - timeout-minutes: 15 - strategy: - fail-fast: true - matrix: - os: - - macos-latest - - ubuntu-latest - #- windows-latest - ocaml-compiler: - - '5.1' - - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@main - - 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 -t containers --deps-only ; - opam install containers-data --deps-only # no test deps - - run: opam exec -- dune build '@install' - - run: opam exec -- dune runtest -j 1 -p containers --profile=release # test only core on non-ubuntu platform