Add cmdliner.1.3.0 #169
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: Lint submission | |
on: | |
pull_request: | |
branches: [ master ] | |
jobs: | |
Duniverse-Linter-Check: | |
name: Duniverse-lint run | |
strategy: | |
matrix: | |
ocaml-compiler: | |
- 4.14.x | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Get changed OPAM packages | |
uses: tj-actions/[email protected] | |
id: packages-modified | |
with: | |
files: | | |
packages/* | |
- uses: ocaml/setup-ocaml@v2 | |
with: | |
ocaml-compiler: ${{ matrix.ocaml-compiler }} | |
if: ${{ steps.packages-modified.outputs.any_changed == 'true' }} | |
- run: opam pin add duniverse-lint --dev-repo git+https://github.com/dune-universe/duniverse-lint.git | |
name: Install duniverse-lint | |
if: ${{ steps.packages-modified.outputs.any_changed == 'true' }} | |
- name: Add overlay-repo locally | |
run: opam repo add opam-overlays . | |
if: ${{ steps.packages-modified.outputs.any_changed == 'true' }} | |
- run: | | |
for file in ${{ steps.packages-modified.outputs.all_changed_files }}; do | |
echo $file | grep -Po "packages/.*/\K.*(?=/)" >> changed | |
done | |
OPAM_PKGS=$(sort changed | uniq | tr '\n' ' ') | |
echo "OPAM_PKGS=$OPAM_PKGS" >> $GITHUB_ENV | |
name: Determine OPAM packages to lint | |
if: ${{ steps.packages-modified.outputs.any_changed == 'true' }} | |
- name: Lint packages | |
run: | | |
for pkg in ${{ env.OPAM_PKGS }}; do | |
echo "Linting $pkg" | |
opam source $pkg > /dev/null | |
(cd $pkg ; opam exec duniverse-lint || touch ../lint-failed) | |
done | |
if [ -f "lint-failed" ]; then | |
# at least one of the linter runs failed | |
exit 1 | |
fi | |
if: ${{ steps.packages-modified.outputs.any_changed == 'true' }} |