Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

Commit

Permalink
Removed travis in favor of github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Risto-Stevcev committed Feb 18, 2021
1 parent 968eb91 commit 8e41c63
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 42 deletions.
1 change: 1 addition & 0 deletions .actrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-P ubuntu-latest=nektos/act-environments-ubuntu:18.04
49 changes: 49 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Main workflow

on:
push:
branches: ['master']

jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
ocaml-version:
- 4.11.0
- 4.10.1
- 4.09.1
- 4.08.1

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 }}

- uses: actions/setup-node@v2
with:
node-version: '12'

- run: npm install -g yarn

- run: yarn

- run: opam pin add bastet.dev . --no-action

- run: opam depext bastet --yes --with-doc --with-test

- run: opam install . --deps-only --with-doc --with-test

- run: make bisect

- run: make coveralls
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ _opam/
bastet/src/index.mld
docs/bisect_ppx
coverage.json
.env
.github/actions/setup-ocaml/
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

30 changes: 17 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ all: build

.PHONY: clean-bs
clean-bs:
bsb -clean-world
yarn bsb -clean-world

.PHONY: clean-native
clean-native:
dune clean
opam exec -- dune clean

.PHONY: clean-docs
clean-docs:
Expand All @@ -26,25 +26,25 @@ build-bs:

.PHONY: build-native
build-native:
dune build @all
opam exec -- dune build @all

.PHONY: build
build: build-bs build-native

.PHONY: fmt
fmt:
dune build @fmt --auto-promote
opam exec -- dune build @fmt --auto-promote

.PHONY: docs-template
docs-template: test-native
cat bastet/src/index.mld.template | \
sed -e 's/{{:/{ {:/g' | \
dune exec examples/docs_template.exe | \
opam exec -- dune exec examples/docs_template.exe | \
sed -e 's/{ {:/{{:/g' > bastet/src/index.mld

.PHONY: docs
docs: clean-docs docs-template
dune build @doc
opam exec -- dune build @doc

.PHONY: copy-docs
copy-docs: docs
Expand All @@ -60,7 +60,7 @@ test-bs: build-bs

.PHONY: test-native
test-native: build-native
dune runtest --no-buffer
opam exec -- dune runtest --no-buffer

.PHONY: test
test: test-bs test-native
Expand All @@ -75,22 +75,26 @@ bisect:

.PHONY: bisect-html
bisect-html: bisect
bisect-ppx-report html
opam exec -- bisect-ppx-report html

.PHONY: coveralls-json
coveralls-json: bisect
bisect-ppx-report coveralls --repo-token ${COVERALLS_TOKEN} coverage.json
opam exec -- bisect-ppx-report coveralls --repo-token ${COVERALLS_TOKEN} coverage.json

.PHONY: coveralls-send
coveralls-send:
curl -L -F json_file=@./coverage.json https://coveralls.io/api/v1/jobs

.PHONY: coveralls-api
coveralls-api: coveralls-json coveralls-send

.PHONY: coveralls
coveralls: coveralls-json coveralls-send
coveralls:
opam exec -- bisect-ppx-report send-to Coveralls

.PHONY: watch-native
watch-native:
dune build @all -w
opam exec -- dune build @all -w

.PHONY: watch-bs
watch-bs:
Expand All @@ -102,11 +106,11 @@ watch-test-bs:

.PHONY: watch-test-native
watch-test:
dune runtest --no-buffer -w
opam exec -- dune runtest --no-buffer -w

.PHONY: utop
utop:
dune utop .
opam exec -- dune utop .

.PHONY: remove-switch
remove-switch:
Expand Down

0 comments on commit 8e41c63

Please sign in to comment.