From ea3bff9f4471d09121310dd1bbf3ae24139470e9 Mon Sep 17 00:00:00 2001 From: Javier Chavarri Date: Tue, 19 Sep 2023 10:55:36 +0000 Subject: [PATCH 1/2] ci: add opam --- .github/workflows/opam.yml | 40 ++++++++++++++++++++++++++++++++++++++ .gitignore | 1 + 2 files changed, 41 insertions(+) create mode 100644 .github/workflows/opam.yml diff --git a/.github/workflows/opam.yml b/.github/workflows/opam.yml new file mode 100644 index 0000000..168d921 --- /dev/null +++ b/.github/workflows/opam.yml @@ -0,0 +1,40 @@ +on: + pull_request: + push: + branches: + - main + schedule: + # Prime the caches every Monday + - cron: 0 1 * * MON + +jobs: + build-sample-project: + name: Build and test project + strategy: + matrix: + system: + - macos-latest + - ubuntu-latest + ocaml-compiler: + - 5.1.x + + fail-fast: false + runs-on: ${{ matrix.system }} + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-node@v3 + with: + node-version: current + + - name: Use OCaml ${{ matrix.ocaml-compiler }} + uses: ocaml/setup-ocaml@v2 + with: + ocaml-compiler: ${{ matrix.ocaml-compiler }} + opam-depext: false + + - name: Install all deps + run: opam install -y . --deps-only + + - name: Build everything + run: opam exec dune build diff --git a/.gitignore b/.gitignore index e35d885..2060389 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ _build +/_opam/ From 9b458c87c39826a0c531095fa8dffe8eea2e995f Mon Sep 17 00:00:00 2001 From: Javier Chavarri Date: Tue, 26 Sep 2023 20:47:48 +0000 Subject: [PATCH 2/2] update branch name in ci scripts --- .github/workflows/nix.yml | 2 +- .github/workflows/opam.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index 027cd64..7878f2f 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -3,7 +3,7 @@ on: pull_request: push: branches: - - main + - master concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/opam.yml b/.github/workflows/opam.yml index 168d921..e546e46 100644 --- a/.github/workflows/opam.yml +++ b/.github/workflows/opam.yml @@ -2,7 +2,7 @@ on: pull_request: push: branches: - - main + - master schedule: # Prime the caches every Monday - cron: 0 1 * * MON