Remove all mentions to Apache 2 and LGPL licenses #234
This file contains hidden or 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: Build Make | |
| # For any push we try to build the project with make | |
| # When a PR is open we do more test such as test more make rules | |
| on: [push,pull_request] | |
| env: | |
| OCAML_DEFAULT_VERSION: 4.10.0 | |
| # Add OPAMYES=true to the environment, this is usefill to replace `-y` option | |
| # in any opam call | |
| OPAMYES: true | |
| jobs: | |
| make_all: | |
| # Basic test to check if the project build with `make`. | |
| # This test also check that `.opam` files are synced with dune-project | |
| # If this test fails, no more make building test are done | |
| name: Make all | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checkout the code of the current branch | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| # Update apt-get database | |
| - name: Update apt-get database | |
| run: sudo apt-get update | |
| # Retrieve the opam cache with unique key | |
| # A new cache is created/used if the `.opam` files changes or | |
| # if we use another ocaml version | |
| # This action only retrieve de .opam/ directory | |
| - name: Retrieve opam cache | |
| uses: actions/cache@v2 | |
| id: cache-opam | |
| with: | |
| path: ~/.opam | |
| key: v1-${{ runner.os }}-alt-ergo-make-${{ env.OCAML_DEFAULT_VERSION }}-${{ hashFiles('*.opam') }} | |
| # Get an OCaml environment with opam installed and the proper ocaml version | |
| # opam will used opam cache environment if retrieved | |
| - name: Use OCaml ${{ env.OCAML_DEFAULT_VERSION }} | |
| uses: ocaml/setup-ocaml@v2 | |
| with: | |
| ocaml-compiler: ${{ env.OCAML_DEFAULT_VERSION }} | |
| # Pin the packages, this is needed for opam depext | |
| # remove this step when opam 2.1 will be used | |
| - name: Pin no action | |
| run: opam pin add . --no-action | |
| # Install external dependencies | |
| # remove this step when opam 2.1 will be used | |
| - name: opam install depext | |
| run: opam depext alt-ergo-lib alt-ergo-parsers alt-ergo altgr-ergo | |
| # Install dependencies | |
| - name: opam install deps | |
| run: opam install ./*.opam --deps-only | |
| # make use `dune build` which update .opam file if the dune-project is updated | |
| - name: Make | |
| run: opam exec -- make | |
| # Monitor changes in repo's files | |
| # If there are some changes, stop the workflow and suggest changes in the PR | |
| - uses: getsentry/action-git-diff-suggestions@main | |
| with: | |
| message: 'The following changes have been made after `make`:' | |
| make_release: | |
| # Test every make package with release profile | |
| name: Make package release | |
| # Only if in pull request or a push on main or next | |
| if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/next' | |
| needs: make_all | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| # Setup package name to test | |
| package: | |
| - alt-ergo-lib | |
| - alt-ergo-parsers | |
| - alt-ergo | |
| - altgr-ergo | |
| steps: | |
| # Checkout the code of the current branch | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| # Update apt-get database | |
| - name: Update apt-get database | |
| run: sudo apt-get update | |
| # Retrieve the opam cache with unique key | |
| # A new cache is created/used if the `.opam` files changes or | |
| # if we use another ocaml version | |
| # This action only retrieve de .opam/ directory | |
| - name: Retrieve opam cache | |
| uses: actions/cache@v2 | |
| id: cache-opam | |
| with: | |
| path: ~/.opam | |
| key: v1-${{ runner.os }}-alt-ergo-${{ matrix.package }}-${{ env.OCAML_DEFAULT_VERSION }}-${{ hashFiles('*.opam') }} | |
| # Get an OCaml environment with opam installed and the proper ocaml version | |
| # opam will used opam cache environment if retrieved | |
| - name: Use OCaml ${{ env.OCAML_DEFAULT_VERSION }} | |
| uses: ocaml/setup-ocaml@v2 | |
| with: | |
| ocaml-compiler: ${{ env.OCAML_DEFAULT_VERSION }} | |
| # Pin the packages, this is needed for opam depext | |
| # remove this step when opam 2.1 will be used | |
| - name: Pin no action | |
| run: opam pin add . --no-action | |
| # Install external dependencies | |
| # remove this step when opam 2.1 will be used | |
| - name: opam install depext | |
| run: opam depext ${{ matrix.package }} | |
| # Install dependencies | |
| - name: opam install deps | |
| run: opam install ./${{ matrix.package }}.opam --deps-only | |
| # Run configure script for the package | |
| - name: Configure ${{ matrix.package }} | |
| run: opam exec -- ./configure ${{ matrix.package }} | |
| # Make the package | |
| - name: Make ${{ matrix.package }} | |
| run: opam exec -- make ${{ matrix.package }} | |
| # Clean repo | |
| - name: Unpin the repo | |
| run: opam pin remove . | |
| make_install: | |
| # Test every install/uninstall rules | |
| name: Make install | |
| # Only if in pull request or a push on main or next | |
| if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/next' | |
| needs: make_all | |
| strategy: | |
| matrix: | |
| # Setup package to install | |
| package: | |
| - lib | |
| - parsers | |
| - bin | |
| - gui | |
| - all | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checkout the code of the current branch | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| # Update apt-get database | |
| - name: Update apt-get database | |
| run: sudo apt-get update | |
| # Retrieve the opam cache with unique key | |
| # A new cache is created/used if the `.opam` files changes or | |
| # if we use another ocaml version | |
| # This action only retrieve de .opam/ directory | |
| - name: Retrieve opam cache | |
| uses: actions/cache@v2 | |
| id: cache-opam | |
| with: | |
| path: ~/.opam | |
| key: v1-${{ runner.os }}-alt-ergo-make-${{ matrix.package }}-${{ env.OCAML_DEFAULT_VERSION }}-${{ hashFiles('*.opam') }} | |
| - name: Use OCaml ${{ env.OCAML_DEFAULT_VERSION }} | |
| uses: ocaml/setup-ocaml@v2 | |
| with: | |
| ocaml-compiler: ${{ env.OCAML_DEFAULT_VERSION }} | |
| # Get an OCaml environment with opam installed and the proper ocaml version | |
| # opam will used opam cache environment if retrieved | |
| - name: Use OCaml ${{ env.OCAML_DEFAULT_VERSION }} | |
| uses: ocaml/setup-ocaml@v2 | |
| with: | |
| ocaml-compiler: ${{ env.OCAML_DEFAULT_VERSION }} | |
| # Pin the packages, this is needed for opam depext | |
| # remove this step when opam 2.1 will be used | |
| - name: Pin no action | |
| run: opam pin add . --no-action | |
| # Install all depext and deps and then build the project | |
| # This step is needed since the install rule does not build the project | |
| - name: Build | |
| run: | | |
| opam depext -y alt-ergo-lib alt-ergo-parsers alt-ergo altgr-ergo | |
| opam install -y ./*.opam --deps-only | |
| opam exec -- make | |
| # Install the package in opam files | |
| - name: Install ${{ matrix.package }} | |
| run: opam exec -- make install-${{ matrix.package }} | |
| # Try to look for lib or bin files in opam root | |
| # This test fails if the libs or bins can't be found | |
| - name: Look for lib/bin in opam root | |
| run: ./rsc/extra/check_installed_package.sh ${{ matrix.package }} false | |
| # Uninstall the package | |
| - name: Uninstall ${{ matrix.package }} | |
| run: opam exec -- make uninstall-${{ matrix.package }} | |
| # Try to look for lib or bin files in opam root | |
| # This test fails if the libs or bins can be found | |
| - name: Look for lib/bin in opam root | |
| run: ./rsc/extra/check_installed_package.sh ${{ matrix.package }} true |