|
11 | 11 | - '!.github/workflows/ccpp.yml' |
12 | 12 |
|
13 | 13 | jobs: |
14 | | - Ubuntu-build: |
15 | | - name: Test on ${{ matrix.ubuntuOS }} on ${{ matrix.python }} |
16 | | - runs-on: ${{ matrix.ubuntuOS }} |
| 14 | + build-test: |
| 15 | + name: Build & Test on ${{ matrix.os }} |
| 16 | + runs-on: ${{ matrix.os }} |
17 | 17 | strategy: |
18 | | - matrix: |
19 | | - ubuntuOS: [ ubuntu-20.04, ubuntu-latest] |
20 | 18 | fail-fast: false |
21 | | - steps: |
22 | | - - uses: actions/checkout@v1 |
23 | | - - name: install requested |
24 | | - run: | |
25 | | - sudo apt install build-essential libzmq3-dev libjsoncpp-dev zlib1g-dev libfftw3-dev |
26 | | - wget "https://raw.githubusercontent.com/zeromq/cppzmq/master/zmq.hpp" -O include/zmq.hpp |
27 | | - - name: make |
28 | | - run: | |
29 | | - cd build/ |
30 | | - make c++ -j |
31 | | - - name: run unit test |
32 | | - run: | |
33 | | - ./build/c++-build/test -sampling 1D 2D 3D |
34 | | - macOS-build: |
35 | | - name: Test on ${{ matrix.macOS }} on ${{ matrix.python }} using ${{ matrix.packageManager }} as packages manager |
36 | | - runs-on: ${{ matrix.macOS }} |
37 | | - strategy: |
38 | 19 | matrix: |
39 | | - macOS: [macOS-latest] |
40 | | - packageManager: ['Brew'] |
41 | | - #'macPort' |
42 | | - fail-fast: false |
| 20 | + os: [ubuntu-latest, macos-latest] |
| 21 | + |
43 | 22 | steps: |
44 | | - - uses: actions/checkout@v1 |
45 | | - - name: install requested macPort |
46 | | - if : contains( matrix.packageManager, 'macPort' ) |
| 23 | + - uses: actions/checkout@v4 |
| 24 | + |
| 25 | + - name: Install dependencies (Ubuntu) |
| 26 | + if: startsWith(matrix.os, 'ubuntu') |
47 | 27 | run: | |
48 | | - curl -O https://distfiles.macports.org/MacPorts/MacPorts-2.6.3.tar.bz2 |
49 | | - tar xf MacPorts-2.6.3.tar.bz2 |
50 | | - cd MacPorts-2.6.3/ |
51 | | - ./configure |
52 | | - make -j |
53 | | - sudo make install |
54 | | - export PATH=$PATH:/opt/local/bin |
55 | | - sudo port -v selfupdate |
56 | | - sudo port install zmq-devel jsoncpp zlib cppzmq fftw-3 fftw-3-single curl |
57 | | - - name: install requested Homebrew |
58 | | - if : contains( matrix.packageManager, 'Brew' ) |
| 28 | + sudo apt update |
| 29 | + sudo apt install -y build-essential libzmq3-dev libjsoncpp-dev zlib1g-dev libfftw3-dev libomp-dev |
| 30 | + wget "https://raw.githubusercontent.com/zeromq/cppzmq/master/zmq.hpp" -O include/zmq.hpp |
| 31 | +
|
| 32 | + - name: Install dependencies (macOS) |
| 33 | + if: startsWith(matrix.os, 'macos') |
59 | 34 | run: | |
60 | | - brew install zeromq jsoncpp zlib fftw curl cppzmq |
61 | | - - name: make |
| 35 | + brew install zeromq jsoncpp zlib fftw cppzmq libomp curl |
| 36 | + wget "https://raw.githubusercontent.com/zeromq/cppzmq/master/zmq.hpp" -O include/zmq.hpp |
| 37 | +
|
| 38 | + - name: Build project |
62 | 39 | run: | |
63 | 40 | cd build/ |
64 | 41 | make c++ -j |
65 | | - - name: run unit test |
| 42 | +
|
| 43 | + - name: Run unit tests |
66 | 44 | run: | |
67 | 45 | ./build/c++-build/test -sampling 1D 2D 3D |
68 | | -
|
0 commit comments