123 lines
3.2 KiB
YAML
Raw Normal View History

name: Linux
on: [push, pull_request]
jobs:
2021-07-08 14:19:40 +00:00
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
2021-07-08 14:19:40 +00:00
os: ["ubuntu-latest"]
2021-07-06 15:14:54 +00:00
cppstd: ["98", "11", "20"]
2021-07-08 11:04:31 +00:00
cc: ["gcc-10"]
2021-07-08 10:57:02 +00:00
cxx: ["g++-10"]
drafts: ["ON"]
libzmq: ["4.3.4"]
2021-07-08 10:57:02 +00:00
libzmqbuild: ["cmake"]
include:
2021-07-08 17:07:27 +00:00
# older libzmq and gcc without draft
2021-07-08 14:19:40 +00:00
- os: "ubuntu-18.04"
2021-07-08 17:07:27 +00:00
cppstd: "11"
2021-07-08 11:04:31 +00:00
cc: "gcc-7"
2021-07-08 10:57:02 +00:00
cxx: "g++-7"
2021-07-06 15:14:54 +00:00
drafts: "OFF"
2021-07-08 10:57:02 +00:00
libzmq: "4.2.0"
libzmqbuild: "pkgconfig"
2021-07-13 22:47:57 +00:00
# gcc 4.8
- os: "ubuntu-18.04"
cppstd: "11"
cc: "gcc-4.8"
cxx: "g++-4.8"
drafts: "ON"
libzmq: "4.3.4"
libzmqbuild: "cmake"
aptinstall: "gcc-4.8 g++-4.8"
# gcc 5
- os: "ubuntu-18.04"
cppstd: "11"
cc: "gcc-5"
cxx: "g++-5"
drafts: "ON"
libzmq: "4.3.4"
libzmqbuild: "cmake"
aptinstall: "gcc-5 g++-5"
2021-07-08 17:07:27 +00:00
# without draft
2021-07-08 14:19:40 +00:00
- os: "ubuntu-latest"
2021-07-08 17:07:27 +00:00
cppstd: "20"
2021-07-08 11:04:31 +00:00
cc: "gcc-10"
2021-07-08 10:57:02 +00:00
cxx: "g++-10"
drafts: "OFF"
libzmq: "4.3.4"
2021-07-08 10:57:02 +00:00
libzmqbuild: "cmake"
2021-07-08 17:07:27 +00:00
# clang
2021-07-08 14:19:40 +00:00
- os: "ubuntu-latest"
2021-07-08 17:07:27 +00:00
cppstd: "17"
2021-07-08 14:19:40 +00:00
cc: "clang-12"
cxx: "clang++-12"
drafts: "ON"
libzmq: "4.3.4"
libzmqbuild: "cmake"
2021-07-08 17:07:27 +00:00
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
VERBOSE: 1
THREADS: 2
LIBZMQ: /tmp/libzmq-build
CPPZMQ: /tmp/cppzmq-build
COVERAGE: "OFF" # TODO
steps:
2021-07-08 10:57:02 +00:00
- uses: actions/checkout@v2
2021-07-13 22:47:57 +00:00
- name: install_deps
if: matrix.aptinstall
run: sudo apt install ${{matrix.aptinstall}}
2021-07-08 17:07:27 +00:00
- name: get_libzmq
run: |
curl -L https://github.com/zeromq/libzmq/archive/v${{ matrix.libzmq }}.tar.gz \
>zeromq.tar.gz
tar -xvzf zeromq.tar.gz
- name: build_libzmq_cmake
if: ${{ matrix.libzmqbuild == 'cmake' }}
run: |
cmake -Hlibzmq-${{ matrix.libzmq }} -B${LIBZMQ} \
-DWITH_PERF_TOOL=OFF \
-DZMQ_BUILD_TESTS=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_DRAFTS=${{ matrix.drafts }}
cmake --build ${LIBZMQ} -- -j${THREADS}
- name: build_libzmq_pkgconfig
if: ${{ matrix.libzmqbuild == 'pkgconfig' }}
working-directory: libzmq-${{ matrix.libzmq }}
run: |
./autogen.sh &&
./configure --prefix=${LIBZMQ} &&
make -j${THREADS}
make install
- name: build
env:
2021-07-08 17:07:27 +00:00
CMAKE_PREFIX_PATH: ${{ env.LIBZMQ }}
run: |
cmake -H. -B${CPPZMQ} -DENABLE_DRAFTS=${{ matrix.drafts }} \
-DCOVERAGE=${COVERAGE} \
-DCMAKE_CXX_STANDARD=${{ matrix.cppstd }}
cmake --build ${CPPZMQ} -- -j${THREADS}
- name: test
working-directory: ${{ env.CPPZMQ }}
run: ctest -V -j${THREADS}
- name: demo
env:
CMAKE_PREFIX_PATH: ${{ env.LIBZMQ }}:${{ env.CPPZMQ }}
run: |
cmake -Hdemo -Bdemo/build
cmake --build demo/build
cd demo/build
ctest -V