diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 0000000..934828a --- /dev/null +++ b/.github/workflows/workflow.yml @@ -0,0 +1,50 @@ +--- +on: + - pull_request + - push + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: + - macos-latest + - ubuntu-latest + - windows-latest + ocaml-version: + - 4.02.x + - 4.03.x + - 4.04.x + - 4.05.x + - 4.06.x + - 4.07.x + - 4.08.x + - 4.09.x + - 4.10.x + - 4.11.x + - 4.12.x + - 4.13.x + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Use OCaml ${{ matrix.ocaml-version }} + uses: ocaml/setup-ocaml@v2 + with: + ocaml-version: ${{ matrix.ocaml-version }} + + - run: opam install . --deps-only --with-test + + - run: opam exec -- dune build + + - run: opam exec -- dune runtest + + - name: Upload the build artifact + uses: actions/upload-artifact@v2 + with: + name: ${{ matrix.os }}-${{ matrix.ocaml-version }}-cppo.exe + path: _build/default/cppo_main.exe