Welcome to mirror list, hosted at ThFree Co, Russian Federation.

macos.yml « workflows « .github - github.com/marian-nmt/marian.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5e3e57c638668468bb9131c62e6d9a992c1a39cb (plain)
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
name: MacOS

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build-macos:
    name: MacOS CPU-only
    runs-on: macos-10.15

    steps:
    - name: Checkout
      uses: actions/checkout@v2
      with:
        submodules: recursive

    - name: Install dependencies
      run: brew install boost openblas openssl protobuf

    # Openblas location is exported explicitly because openblas is keg-only,
    # which means it was not symlinked into /usr/local/.
    # CMake cannot find BLAS on GitHub runners if Marian is being compiled
    # statically, hence USE_STATIC_LIBS=off
    - name: Configure CMake
      run: |
        export LDFLAGS="-L/usr/local/opt/openblas/lib"
        export CPPFLAGS="-I/usr/local/opt/openblas/include"
        mkdir -p build
        cd build
        cmake .. \
          -DCOMPILE_CPU=on \
          -DCOMPILE_CUDA=off \
          -DCOMPILE_EXAMPLES=on \
          -DCOMPILE_SERVER=on \
          -DCOMPILE_TESTS=on \
          -DUSE_FBGEMM=on \
          -DUSE_SENTENCEPIECE=on \
          -DUSE_STATIC_LIBS=off

    - name: Compile
      working-directory: build
      run: make -j2

    - name: Run unit tests
      working-directory: build
      run: make test

    - name: Print versions
      working-directory: build
      run: |
        ./marian --version
        ./marian-decoder --version
        ./marian-scorer --version
        ./spm_encode --version