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

build-ubuntu-18.04-cpu.yml « workflows « .github - github.com/marian-nmt/marian.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0b37e4f4b4cdd4e16b5d111f33a8abf97ca08a2d (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
59
60
61
62
63
64
name: ubuntu-18.04-cpu

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

jobs:
  build:

    runs-on: ubuntu-18.04

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

    # The following packages are already installed on GitHub-hosted runners: build-essential openssl libssl-dev
    - name: Install dependencies
      run: sudo apt-get install --no-install-recommends libgoogle-perftools-dev libprotobuf10 libprotobuf-dev protobuf-compiler

    # https://software.intel.com/content/www/us/en/develop/articles/installing-intel-free-libs-and-python-apt-repo.html
    - name: Install MKL
      run: |
        wget -qO- "https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB" | sudo apt-key add -
        sudo sh -c "echo deb https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list"
        sudo apt-get update -o Dir::Etc::sourcelist="/etc/apt/sources.list.d/intel-mkl.list"
        sudo apt-get install --no-install-recommends intel-mkl-64bit-2020.0-088

    - name: Print Boost paths
      run: |
        ls $BOOST_ROOT_1_69_0
        ls $BOOST_ROOT_1_69_0/include
        ls $BOOST_ROOT_1_69_0/lib

    # Boost is already installed on GitHub-hosted runners in a non-standard location
    # https://github.com/actions/virtual-environments/issues/687#issuecomment-610471671
    - name: Configure CMake
      run: |
        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 \
          -DBOOST_ROOT=$BOOST_ROOT_1_69_0 -DBOOST_INCLUDEDIR=$BOOST_ROOT_1_69_0/include -DBOOST_LIBRARYDIR=$BOOST_ROOT_1_69_0/lib \
          -DBoost_ARCHITECTURE=-x64

    - 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