Refactor codecs module. #343
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: bash -l {0} | |
jobs: | |
build-and-test-core: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
ocaml-compiler: | |
- "5.2.0" | |
- "4.14.2" | |
local-packages: | |
- zarr.opam | |
env: | |
AWS_ACCESS_KEY_ID: minioadmin | |
AWS_SECRET_ACCESS_KEY: minioadmin | |
services: | |
minio: | |
image: fclairamb/minio-github-actions | |
ports: | |
- 9000:9000 | |
name: Ocaml version - ${{ matrix.ocaml-compiler }} - ${{ matrix.os }} | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Setup Minio | |
run: | | |
mkdir ~/.aws | |
echo '[default]' > ~/.aws/credentials | |
echo 'aws_access_key_id = minioadmin' >> ~/.aws/credentials | |
echo 'aws_secret_access_key = minioadmin' >> ~/.aws/credentials | |
pip3 install minio | |
python3 - <<'EOF' | |
from minio import Minio | |
minio = Minio( | |
'localhost:9000', | |
access_key='minioadmin', | |
secret_key='minioadmin', | |
secure=False | |
) | |
minio.make_bucket('test-bucket-lwt', location='us-east-1') | |
EOF | |
- name: setup-ocaml | |
uses: ocaml/setup-ocaml@v3 | |
with: | |
ocaml-compiler: ${{ matrix.ocaml-compiler }} | |
- name: setup | |
run: | | |
opam install --deps-only --with-test --with-doc --yes zarr | |
opam install bytesrw conf-zlib conf-zstd --yes | |
opam install lwt aws-s3-lwt --yes | |
opam exec -- dune build zarr zarr-sync zarr-lwt | |
- name: setup ocaml-5-specific | |
if: ${{ matrix.ocaml-compiler == '5.2.0' }} | |
run: | | |
opam install eio_main --yes | |
opam exec -- dune build zarr-eio | |
- name: test | |
run: | | |
opam exec -- dune exec --instrument-with bisect_ppx --force -- _build/default/zarr/test/test_all.exe -runner sequential -ci true | |
opam exec -- dune exec --instrument-with bisect_ppx --force -- _build/default/zarr-sync/test/test_sync.exe -runner sequential -ci true | |
opam exec -- dune exec --instrument-with bisect_ppx --force -- _build/default/zarr-lwt/test/test_lwt.exe -runner sequential -ci true | |
- name: test ocaml-5-specific libs | |
if: ${{ matrix.ocaml-compiler == '5.2.0' }} | |
run: | | |
opam exec -- dune exec --instrument-with bisect_ppx --force -- _build/default/zarr-eio/test/test_eio.exe -runner sequential -ci true | |
- name: Upload code coverage report | |
if: ${{ matrix.ocaml-compiler == '5.2.0' }} | |
run: opam exec -- bisect-ppx-report send-to Codecov | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
- name: Build Docs | |
if: ${{ matrix.ocaml-compiler == '5.2.0' }} | |
run: opam exec -- dune build @doc | |
- name: Upload API Docs artifact | |
if: ${{ matrix.ocaml-compiler == '5.2.0' }} | |
uses: actions/upload-artifact@v3.1.3 | |
with: | |
name: docs | |
path: ./_build/default/_doc/_html | |
- name: Deploy API Docs | |
if: ${{ matrix.ocaml-compiler == '5.2.0' }} | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./_build/default/_doc/_html |