| 1 |
name: Test |
| 2 |
|
| 3 |
on: |
| 4 |
pull_request: |
| 5 |
branches: |
| 6 |
- master |
| 7 |
- develop |
| 8 |
push: |
| 9 |
branches: |
| 10 |
- master |
| 11 |
- develop |
| 12 |
tags: |
| 13 |
- v* |
| 14 |
|
| 15 |
jobs: |
| 16 |
cxx: |
| 17 |
name: ${{ matrix.os_short }} c++ |
| 18 |
runs-on: ${{ matrix.os }} |
| 19 |
timeout-minutes: 120 |
| 20 |
strategy: |
| 21 |
fail-fast: false |
| 22 |
matrix: |
| 23 |
os: ["windows-2022", "macos-11.0", "ubuntu-22.04"] |
| 24 |
include: |
| 25 |
- os: "windows-2022" |
| 26 |
os_short: "windows" |
| 27 |
- os: "macos-11.0" |
| 28 |
os_short: "macos" |
| 29 |
- os: "ubuntu-22.04" |
| 30 |
os_short: "linux" |
| 31 |
steps: |
| 32 |
- uses: actions/checkout@v3 |
| 33 |
with: |
| 34 |
fetch-depth: 0 |
| 35 |
- name: Install |
| 36 |
shell: bash |
| 37 |
run: | |
| 38 |
if [ "${{ matrix.os_short }}" == "linux" ]; then |
| 39 |
export OCL_SUDO_INSTALL="1" |
| 40 |
fi |
| 41 |
./install.sh \ |
| 42 |
--install-ci-deps \ |
| 43 |
--build-library cxx \ |
| 44 |
--build-type release \ |
| 45 |
--install-boost \ |
| 46 |
--boost-prefix $(pwd) \ |
| 47 |
--install \ |
| 48 |
--test |
| 49 |
nodejs: |
| 50 |
name: ${{ matrix.os_short }} node.js |
| 51 |
runs-on: ${{ matrix.os }} |
| 52 |
timeout-minutes: 120 |
| 53 |
strategy: |
| 54 |
fail-fast: false |
| 55 |
matrix: |
| 56 |
os: ["windows-2022", "macos-11.0", "ubuntu-22.04"] |
| 57 |
include: |
| 58 |
- os: "windows-2022" |
| 59 |
os_short: "windows" |
| 60 |
libdir: windows-nodejs-x64 |
| 61 |
- os: "macos-11.0" |
| 62 |
os_short: "macos" |
| 63 |
libdir: macos-nodejs-x64 |
| 64 |
- os: "ubuntu-22.04" |
| 65 |
os_short: "linux" |
| 66 |
libdir: linux-nodejs-x64 |
| 67 |
steps: |
| 68 |
- uses: actions/checkout@v3 |
| 69 |
with: |
| 70 |
fetch-depth: 0 |
| 71 |
- name: Install |
| 72 |
shell: bash |
| 73 |
run: | |
| 74 |
if [ "${{ matrix.os_short }}" == "linux" ]; then |
| 75 |
export OCL_SUDO_INSTALL="1" |
| 76 |
fi |
| 77 |
./install.sh \ |
| 78 |
--install-ci-deps \ |
| 79 |
--build-library nodejs \ |
| 80 |
--build-type release \ |
| 81 |
--node-architecture x64 \ |
| 82 |
--install-boost \ |
| 83 |
--boost-prefix $(pwd) \ |
| 84 |
--install \ |
| 85 |
--install-prefix $(pwd)/src/npmpackage/build/Release/${{ matrix.libdir }} \ |
| 86 |
--test |
| 87 |
python: |
| 88 |
name: ${{ matrix.os_short }} python |
| 89 |
runs-on: ${{ matrix.os }} |
| 90 |
timeout-minutes: 120 |
| 91 |
strategy: |
| 92 |
fail-fast: false |
| 93 |
matrix: |
| 94 |
os: ["windows-2022", "macos-11.0", "ubuntu-22.04"] |
| 95 |
include: |
| 96 |
- os: "windows-2022" |
| 97 |
os_short: "windows" |
| 98 |
python_version: "3.10" |
| 99 |
- os: "macos-11.0" |
| 100 |
os_short: "macos" |
| 101 |
python_version: "3.11" |
| 102 |
- os: "ubuntu-22.04" |
| 103 |
os_short: "linux" |
| 104 |
python_version: "3.10" |
| 105 |
cmake_generator: "Unix Makefiles" |
| 106 |
steps: |
| 107 |
- uses: actions/checkout@v3 |
| 108 |
with: |
| 109 |
fetch-depth: 0 |
| 110 |
- uses: actions/setup-python@v4 |
| 111 |
with: |
| 112 |
python-version: ${{ matrix.python_version }} |
| 113 |
- name: Install |
| 114 |
shell: bash |
| 115 |
run: | |
| 116 |
if [ "${{ matrix.os_short }}" == "linux" ]; then |
| 117 |
export OCL_INSTALL_BOOST="1" |
| 118 |
export OCL_BOOST_WITH_PYTHON="1" |
| 119 |
export OCL_BOOST_PREFIX="$(pwd)" |
| 120 |
else |
| 121 |
export OCL_INSTALL_BOOST_FROM_REPO="1" |
| 122 |
fi |
| 123 |
./install.sh \ |
| 124 |
--build-library python \ |
| 125 |
--build-type release \ |
| 126 |
--install-system-deps \ |
| 127 |
--python-executable python \ |
| 128 |
--python-pip-install \ |
| 129 |
--test |
| 130 |
env: |
| 131 |
CMAKE_GENERATOR: ${{ matrix.cmake_generator }} |