diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..0543088 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,47 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events but only for the master branch + push: + branches: [ master ] + pull_request: + branches: [ master ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + ocaml-version: + - 4.11.2 + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Use OCaml ${{ matrix.ocaml-version }} + uses: avsm/setup-ocaml@v1 + with: + ocaml-version: ${{ matrix.ocaml-version }} + + - run: opam install ./makecloud.opam.locked --deps-only --unlock-base -y + + - run: eval $(opam env) && dune build + + - name: Upload CLI + uses: actions/upload-artifact@v2 + with: + name: makecloud-cli + path: _build/default/cli/main.exe