File: .travis.yml

package info (click to toggle)
lwt 5.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 2,348 kB
  • sloc: ml: 20,374; ansic: 6,933; makefile: 184; sh: 87; python: 62
file content (206 lines) | stat: -rw-r--r-- 4,800 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
language: generic

scripts:
  - &opam
    before_install:
      - |
        if [ "$TRAVIS_EVENT_TYPE" == cron ]
        then
          rm -rf ~/.opam ./_opam ./_cache
        fi

    install:
      - |
        if [ "$LIBEV" != no ]
        then
          sudo apt-get update -qq
          if [ "$MUSL" != yes ]
          then
            sudo apt-get install -qq libev-dev
          else
            sudo apt-get install musl-tools
            wget http://dist.schmorp.de/libev/Attic/libev-4.27.tar.gz
            tar xf libev-4.27.tar.gz
            cd libev-4.27
            CC=musl-gcc ./configure --prefix `pwd`/install
            make
            make install
            sudo cp install/include/* /usr/include/x86_64-linux-musl
            sudo cp install/lib/* /usr/lib/x86_64-linux-musl
            cd ..
          fi
        fi

      - OS=linux
      - |
        if [ "$TRAVIS_OS_NAME" == osx ]
        then
          OS=macos
        fi
      - VERSION=2.0.6
      - PKG=opam-$VERSION-x86_64-$OS
      - wget https://github.com/ocaml/opam/releases/download/$VERSION/$PKG
      - sudo mv $PKG /usr/local/bin/opam
      - sudo chmod a+x /usr/local/bin/opam

      - opam init -y --bare --disable-sandboxing --disable-shell-hook
      - CACHED=yes
      - |
        if [ ! -d _opam/bin ]
        then
          CACHED=no
        fi
      - |
        if [ "$CACHED" == no ]
        then
          rm -rf _opam
          opam switch create . $COMPILER $REPOSITORIES --no-install
        fi
      - eval `opam env`
      - opam --version
      - ocaml -version

      - opam pin add --no-action ounit 2.0.8 # 2.1.2 release is broken.
      - CACHED=yes
      - |
        if [ ! -d _cache/build ]
        then
          CACHED=no
        fi
      - |
        if [ "$CACHED" == no ]
        then
          opam install . --deps-only --yes
        fi
      - |
        if [ "$CACHED" == no && "$LIBEV" != no ]
        then
          opam install -y conf-libev
        fi
      - |
        if [ "$CACHED" == yes ]
        then
          cp -r _cache/_build .
        fi

      - |
        if [ "$LIBEV" == no ]
        then
          LWT_DISCOVER_ARGUMENTS="--use-libev false"
        else
          LWT_DISCOVER_ARGUMENTS="--use-libev true"
        fi
      - export LWT_DISCOVER_ARGUMENTS

    script:
      - |
        if [ "$COVERAGE" != yes ]
        then
          dune build
          dune runtest --force
        else
          make coverage
          bisect-ppx-report send-to Coveralls
        fi

      - |
        if [ "$CACHED" == no ]
        then
          mkdir -p _cache
          cp -r _build _cache
        fi

      - |
        if [ "$DOCS" == yes ]
        then
          bash src/util/travis-docs.sh
        fi
      - |
        if [ "$PACKAGING" == yes ]
        then
          make install-for-packaging-test packaging-test uninstall-after-packaging-test
        fi
      - |
        if [ "$PPX_LET" == yes ]
        then
          make ppx_let-test-deps ppx_let-test
        fi

    before_cache:
      - opam clean

    cache:
      directories:
        - $HOME/.opam
        - ./_opam
        - ./_cache

  - &esy
    install: npm install -g esy
    script:
      - esy install
      - esy build
      - 'esy sh -c "cat #{self.target_dir}/_build/default/src/unix/unix_c_library_flags.sexp"  | grep lev'
      - |
        sed -i 's#"@opam/conf-libev": "\*",##g' esy.json
      - esy install
      - esy build
      # Check `lev` isn't detected
      - 'esy sh -c "cat #{self.target_dir}/_build/default/src/unix/unix_c_library_flags.sexp"  | grep -v lev'

    cache:
      directories:
        - $HOME/.esy

matrix:
  include:
    - <<: *opam
      os: osx
      env: COMPILER=4.10.0 LIBEV=no
    - <<: *opam
      os: linux
      env: COMPILER=4.10.0 LIBEV=no PPX_LET=yes COVERAGE=yes
    - <<: *opam
      os: linux
      env: COMPILER=4.09.0
    - <<: *opam
      os: linux
      env: COMPILER=4.08.1+musl+flambda MUSL=yes
    - <<: *opam
      os: linux
      env: COMPILER=4.07.1 DOCS=yes
    - <<: *opam
      os: linux
      env: COMPILER=4.06.1 LWT_STRESS_TEST=true
    - <<: *opam
      os: linux
      env: COMPILER=4.05.0+bytecode-only
    - <<: *opam
      os: linux
      env: COMPILER=4.04.2
    - <<: *opam
      os: linux
      env: COMPILER=4.03.0
    - <<: *opam
      os: linux
      env: COMPILER=4.02.3 PACKAGING=yes
    - <<: *esy
      os: linux
      env: ESY=yes

  allow_failures:
    - env: COMPILER=4.09.0
    - env: COMPILER=4.08.1+musl+flambda MUSL=yes
    - env: COMPILER=4.07.1 DOCS=yes
    - env: COMPILER=4.06.1 LWT_STRESS_TEST=true
    - env: COMPILER=4.05.0+bytecode-only
    - env: COMPILER=4.04.2
    - env: COMPILER=4.03.0
    - env: ESY=yes

  fast_finish: true

notifications:
  email:
    on_success: always
    on_failure: always