From 67e348bfbd1fc5160a46b2891ebbeb769d685724 Mon Sep 17 00:00:00 2001 From: Niols Date: Thu, 11 May 2023 13:25:07 +0000 Subject: [PATCH] [DEBUG] --- .github/workflows/ci.yml | 150 ++------------------------------------- 1 file changed, 4 insertions(+), 146 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fabfe2f..5fae321 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,26 +25,8 @@ jobs: fail-fast: false matrix: include: - - {os: ubuntu, ocaml: 4.11.x} ## in Debian stable (2023-05-11) - {os: ubuntu, ocaml: 4.11.x, lower-bounds: lower-bounds, doc: no-doc} - - {os: ubuntu, ocaml: 4.12.x} - - {os: ubuntu, ocaml: 4.13.x} - # {os: ubuntu, ocaml: 4.14.x} ## main supported version - {os: ubuntu, ocaml: 4.14.x, lower-bounds: lower-bounds, doc: no-doc} - - {os: ubuntu, ocaml: 4.14.x, deploy-doc: deploy-doc} - - {os: ubuntu, ocaml: 4.14.1, bytecode: bytecode} - - {os: macos, ocaml: 4.14.x} - - {os: windows, ocaml: 4.14.x, tests: no-tests} - - {os: ubuntu, ocaml: 5.0.x} - ## NOTE: The `ocaml/setup-ocaml@v2` action does not support `4.14.x` - ## versions for `ocaml-variants` and such, hence the detailed version. - ## NOTE: After OCaml 5.0.0, `ocaml-option-bytecode-only` can be used - ## directly with `ocaml-base-compiler`, probably? - ## NOTE: Tests are written in a Unix-like way and therefore cannot - ## run correctly on Windows. - ## NOTE: `lower-bounds` implies to not build the documentation because - ## `opam-0install`, the solver we use, does not support it. Therefore - ## we don't even install those dependencies to begin with. ## Grant GITHUB_TOKEN the permissions required to make a pages deployment permissions: @@ -121,9 +103,13 @@ jobs: if: matrix.tests != 'no-tests' run: opam exec -- make check + - run: which -a morbig || true + - name: Try installing run: opam exec -- make install + - run: which -a morbig || true + - name: Try building examples ## NOTE: Examples are written in a Unix-like way and cannot build on a ## bytecode-only infrastructure. @@ -201,131 +187,3 @@ jobs: # - name: Try cleaning # run: make clean - - ## ======================== [ Docker-based CI ] ======================== ## - - docker-based: - - strategy: - fail-fast: false - matrix: - include: - - {tag: alpine, deploy-image: deploy-image} - - {tag: archlinux} - - {tag: centos, tests: no-tests} ## only has Alcotest 1.6 (2023-05-11) - - {tag: debian} - - {tag: debian-testing} - - {tag: debian-unstable} - - {tag: fedora} - - {tag: opensuse} - - {tag: oraclelinux} - - {tag: ubuntu} - - {tag: ubuntu-lts} - - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Build Docker image - run: | - docker build \ - --tag morbig \ - . \ - --build-arg tag=${{matrix.tag}} \ - --build-arg doc=${{matrix.doc != 'no-doc'}} \ - --build-arg tests=${{matrix.tests != 'no-tests'}} - - - name: Run tests - run: | - docker run --entrypoint /bin/sh morbig -c ' - set -e - eval $(opam env) - cd /home/opam/morbig - if ${{ matrix.tests != 'no-tests' }}; then - make check - fi - if ${{ matrix.doc != 'no-doc' }}; then - make doc - fi - make install - make examples - make uninstall - ' - - - name: Login to Docker Hub - if: github.event_name == 'push' && matrix.deploy-image == 'deploy-image' - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_HUB_USERNAME }} - password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - - name: Rename Docker image - if: github.event_name == 'push' && matrix.deploy-image == 'deploy-image' - run: docker image tag morbig colisanr/morbig:${GITHUB_REF##*/} - - - name: Push to Docker Hub - if: github.event_name == 'push' && matrix.deploy-image == 'deploy-image' - run: docker push colisanr/morbig:${GITHUB_REF##*/} - - ## ========================= [ Nix-based CI ] ========================== ## - - nix-based: - - strategy: - fail-fast: false - matrix: - package: - - with-nixpkgs - - with-opam-nix - - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Install Nix - uses: cachix/install-nix-action@v20 - with: - extra_nix_config: | - ## Access token to avoid triggering GitHub's rate limiting. - access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} - - - name: Install Nix dependencies - run: | - nix develop .#${{ matrix.package }} --print-build-logs --command true - - - name: Build in development Shell - run: | - nix develop .#${{ matrix.package }} --command make - - - name: Build documentation in development Shell - run: | - nix develop .#${{ matrix.package }} --command make doc - - - name: Run tests in development Shell - run: | - nix develop .#${{ matrix.package }} --command make check - - - name: Build with Nix - run: | - nix build .#${{ matrix.package }} --print-build-logs - - nix-flake-checks: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Install Nix - uses: cachix/install-nix-action@v20 - with: - extra_nix_config: | - ## Access token to avoid triggering GitHub's rate limiting. - access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} - - - name: Run flake checks - run: nix flake check . --print-build-logs