File: build.yml

package info (click to toggle)
nlopt 2.7.1-7.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,940 kB
  • sloc: ansic: 24,572; cpp: 2,983; sh: 86; makefile: 55; f90: 53; lisp: 37; python: 27
file content (44 lines) | stat: -rw-r--r-- 1,842 bytes parent folder | download | duplicates (3)
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
name: Build
on: [push, pull_request]
jobs:
  linux:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Build
        run: |
          sudo apt-get install python3-dev python3-numpy guile-2.0-dev liboctave-dev cmake gfortran g++-mingw-w64-x86-64 gfortran-mingw-w64-x86-64
          pip install mkdocs python-markdown-math --user
          PATH=$PATH:~/.local/bin mkdocs build
          mkdir build && pushd build
          cmake -DCMAKE_INSTALL_PREFIX=~/.local -DNLOPT_MATLAB=OFF -DNLOPT_FORTRAN=ON -DCMAKE_C_FLAGS='-std=c89 -pedantic -D_POSIX_C_SOURCE=200809L -Wall -Wextra -Werror' -DCMAKE_CXX_FLAGS='-Wall -Wextra' ..
          make install -j2 && ctest -j2 --output-on-failure
          rm -rf * ~/.local
          cmake -DCMAKE_INSTALL_PREFIX=~/.local -DNLOPT_PYTHON=OFF -DNLOPT_OCTAVE=OFF -DNLOPT_GUILE=OFF -DNLOPT_MATLAB=OFF -DNLOPT_FORTRAN=ON -DCMAKE_TOOLCHAIN_FILE=$PWD/../cmake/toolchain-x86_64-w64-mingw32.cmake ..
          make install -j2

  macos:
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v2
      - name: Build
        run: |
          brew upgrade && brew install swig octave
          mkdir build && pushd build
          cmake -DCMAKE_INSTALL_PREFIX=~/.local -DNLOPT_FORTRAN=OFF -DNLOPT_GUILE=OFF ..
          make install -j3 && ctest --output-on-failure

  windows:
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v2
      - name: Build
        shell: cmd
        run: |
          pip install numpy
          cmake -DCMAKE_INSTALL_PREFIX=%cd:\=/%/install .
          cmake --build . --config Release --target install
          xcopy %cd%\install\bin\nlopt.dll %cd%\src\swig
          xcopy %cd%\install\Lib\site-packages\_nlopt.pyd %cd%\src\swig
          dir /p %cd%\src\swig
          ctest -C Release --output-on-failure --timeout 100