Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable tests on macos #2

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
jobs:
# This workflow contains a single job called "build"
build:
env:
OPAM_VERSION: 2.1.0-alpha
strategy:
fail-fast: false
matrix:
Expand All @@ -32,7 +34,10 @@ jobs:
- 4.08.1
- 4.09.1
- 4.10.1
- 4.11.0
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test comment

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test duplication

- 4.11.1
include:
- os: macos-latest
ocaml-version: 4.11.1
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}

Expand All @@ -55,7 +60,7 @@ jobs:

- run: opam pin add merlin.dev . --no-action
- run: opam pin add dot-merlin-reader.dev . --no-action
- run: opam depext merlin --yes --with-test
- run: opam depext conf-jq --yes # merlin --yes --with-test # opam depext bug
- run: opam install . --deps-only --with-test
- run: opam install menhir
- run: opam exec -- dune build
Expand Down
27 changes: 7 additions & 20 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
language: c
sudo: true
dist: xenial
install: wget https://raw.githubusercontent.com/ocaml/ocaml-ci-scripts/master/.travis-opam.sh
script: |
Expand All @@ -8,27 +7,15 @@ env:
global:
- EXTRA_DEPS="dot-merlin-reader"
- PINS="dot-merlin-reader.dev:."
- ASSUME_ALWAYS_YES=YES
matrix:
- OCAML_VERSION=4.02
PACKAGE=merlin
TESTS=false
- OCAML_VERSION=4.03
PACKAGE=merlin
# - OCAML_VERSION=4.04
# PACKAGE=merlin
# - OCAML_VERSION=4.05
# PACKAGE=merlin
# - OCAML_VERSION=4.06
# PACKAGE=merlin
# - OCAML_VERSION=4.07
# PACKAGE=merlin
- OCAML_VERSION=4.08
PACKAGE=merlin
- OCAML_VERSION=4.09
PACKAGE=merlin
- OCAML_VERSION=4.10
PACKAGE=merlin
- OCAML_VERSION=4.11
PACKAGE=merlin
os:
- linux
- osx
- freebsd
jobs:
include:
- os: linux
env: OCAML_VERSION=4.02 PACKAGE=merlin TESTS=false
2 changes: 1 addition & 1 deletion merlin.opam
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dev-repo: "git+https://github.com/ocaml/merlin.git"
build: [
["dune" "subst"] {pinned}
["dune" "build" "-p" name "-j" jobs]
["dune" "runtest" "-p" name "-j" "1"] {with-test & os != "macos" & ocaml:version >= "4.03"}
["dune" "runtest" "-p" name "-j" "1"] {with-test & ocaml:version >= "4.03"}
]
depends: [
"ocaml" {>= "4.02.3" & < "4.12"}
Expand Down
16 changes: 5 additions & 11 deletions tests/merlin-wrapper-template
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
#!/usr/bin/env bash

sed="sed"
uname=$(uname -s)
if [ "$uname" == "Darwin" ]; then
sed="gsed"
fi;

export PATH=$(dirname %%DOT_MERLIN_READER%%):$PATH

src_dir="$(dirname ${BASH_SOURCE[0]})/.."
cd "$src_dir"
src_dir=$(realpath -e $(pwd) 2>/dev/null || readlink -f $(pwd))
src_dir=$(pwd -P)
cd - > /dev/null
$(dirname ${BASH_SOURCE[0]})/%%OCAMLMERLIN_PATH%% "$@" \
| jq 'del(.timing)' \
| $sed -e "s:$src_dir/::g" \
| $sed -e 's:"[^"]*lib/ocaml:"lib/ocaml:g' \
| $sed -e 's:"/.*/\(\.opam\|opam2\)/[^/]*/\([^"]*\)":"~opam/\2":g' \
| $sed -e 's:\\n:\
| sed -e "s:$src_dir/::g" \
| sed -e 's:"[^"]*lib/ocaml:"lib/ocaml:g' \
| sed -e 's:"/.*/\(\.opam\|opam2\)/[^/]*/\([^"]*\)":"~opam/\2":g' \
| sed -e 's:\\n:\
:g'