mirror of
https://github.com/bdnugget/nbnet.git
synced 2026-11-07 05:27:27 +00:00
288 lines
7.6 KiB
YAML
288 lines
7.6 KiB
YAML
name: nbnet
|
|
|
|
env:
|
|
EMSDK_VERSION: 3.1.64
|
|
|
|
on:
|
|
push:
|
|
branches: [ master, github-actions, release-2.0 ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
unit-tests-linux:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Install prerequisites
|
|
run: sudo apt-get install build-essential cmake -y
|
|
- name: Compile tests
|
|
run: |
|
|
cd tests
|
|
cmake .
|
|
make
|
|
- name: Run tests
|
|
run: |
|
|
cd tests
|
|
ctest
|
|
|
|
unit-tests-osx:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Install prerequisites
|
|
run: brew install cmake
|
|
- name: Compile tests
|
|
run: |
|
|
cd tests
|
|
cmake .
|
|
make
|
|
- name: Run tests
|
|
run: |
|
|
cd tests
|
|
ctest
|
|
|
|
unit-tests-windows:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: ilammy/msvc-dev-cmd@v1
|
|
- name: Compile tests
|
|
run: |
|
|
cd tests
|
|
cmake -G "NMake Makefiles" .
|
|
nmake
|
|
# FIXME: string_tests hangs forever
|
|
# - name: Run tests
|
|
# run: ctest
|
|
|
|
soak-test-linux-c:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Install prerequisites
|
|
run: sudo apt-get install build-essential cmake -y
|
|
- name: Compile soak test
|
|
run: |
|
|
cd soak
|
|
mkdir build
|
|
cd build
|
|
cmake -DCMAKE_BUILD_TYPE=Debug ..
|
|
make
|
|
- name: Run soak test
|
|
run: timeout 240 ./bin/github-actions/run_soak.sh
|
|
|
|
soak-test-linux-cpp:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Install prerequisites
|
|
run: sudo apt-get install build-essential cmake -y
|
|
- name: Compile soak test
|
|
run: |
|
|
cd soak
|
|
mkdir build
|
|
cd build
|
|
cmake -DCMAKE_BUILD_TYPE=Debug -DCPP_COMPILE=ON ..
|
|
make
|
|
- name: Run soak test
|
|
run: timeout 240 ./bin/github-actions/run_soak.sh
|
|
|
|
soak-test-linux-emcc:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Install prerequisites
|
|
run: sudo apt-get install build-essential cmake git python2 g++ -y
|
|
- name: Install emsdk
|
|
run: ./bin/github-actions/install_emsdk.sh $EMSDK_VERSION
|
|
- name: Install nbnet NPM dependencies
|
|
run: |
|
|
npm update
|
|
npm install -g node-pre-gyp
|
|
npm install -g node-gyp
|
|
cd net_drivers/webrtc
|
|
npm install --build-from-resource
|
|
- name: Compile soak test
|
|
run: ./bin/github-actions/build_soak_web.sh
|
|
- name: Run soak test
|
|
run: |
|
|
cd emsdk
|
|
source ./emsdk_env.sh
|
|
cd ..
|
|
WEBRTC=1 timeout 240 ./bin/github-actions/run_soak.sh
|
|
|
|
soak-test-osx-c:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Install prerequisites
|
|
run: brew install cmake coreutils
|
|
- name: Compile soak test
|
|
run: |
|
|
cd soak
|
|
mkdir build
|
|
cd build
|
|
cmake -DCMAKE_BUILD_TYPE=Debug ..
|
|
make
|
|
- name: Run soak test
|
|
run: gtimeout 240 ./bin/github-actions/run_soak.sh
|
|
|
|
soak-test-osx-cpp:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Install prerequisites
|
|
run: brew install cmake coreutils
|
|
- name: Compile soak test
|
|
run: |
|
|
cd soak
|
|
mkdir build
|
|
cd build
|
|
cmake -DCMAKE_BUILD_TYPE=Debug -DCPP_COMPILE=ON ..
|
|
make
|
|
- name: Run soak test
|
|
run: gtimeout 240 ./bin/github-actions/run_soak.sh
|
|
|
|
soak-test-osx-emcc:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Install prerequisites
|
|
run: brew install cmake coreutils
|
|
- name: Install emsdk
|
|
run: ./bin/github-actions/install_emsdk.sh $EMSDK_VERSION
|
|
- name: Install nbnet NPM dependencies
|
|
run: |
|
|
npm update
|
|
npm install -g node-pre-gyp
|
|
npm install -g node-gyp
|
|
cd net_drivers/webrtc
|
|
npm install --build-from-resource
|
|
- name: Compile soak test
|
|
run: ./bin/github-actions/build_soak_web.sh
|
|
- name: Run soak test
|
|
run: |
|
|
cd emsdk
|
|
source ./emsdk_env.sh
|
|
cd ..
|
|
WEBRTC=1 gtimeout 240 ./bin/github-actions/run_soak.sh
|
|
|
|
soak-test-windows-c:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: ilammy/msvc-dev-cmd@v1
|
|
- name: Compile soak test
|
|
run: |
|
|
cd soak
|
|
mkdir build
|
|
cd build
|
|
cmake -G "NMake Makefiles" ..
|
|
nmake
|
|
- name: Run soak test
|
|
run: ./bin/github-actions/run_soak.sh
|
|
|
|
soak-test-linux-webrtc-native:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Install prerequisites
|
|
run: sudo apt-get install build-essential cmake git -y
|
|
- name: Download and build libdatachannel
|
|
run: ./bin/github-actions/download_and_build_libdatachannel.sh
|
|
- name: Install emsdk
|
|
run: ./bin/github-actions/install_emsdk.sh $EMSDK_VERSION
|
|
- name: Install nbnet NPM dependencies
|
|
run: |
|
|
npm update
|
|
npm install -g node-pre-gyp
|
|
npm install -g node-gyp
|
|
cd net_drivers/webrtc
|
|
npm install --build-from-resource
|
|
- name: Compile soak test (native)
|
|
run: |
|
|
cd soak
|
|
mkdir build
|
|
cd build
|
|
cmake -DLIBDATACHANNEL_LIBRARY_PATH=${{ github.workspace }}/libdatachannel/build/libdatachannel.so -DLIBDATACHANNEL_INCLUDE_PATH=${{ github.workspace }}/libdatachannel/include -DWEBRTC_NATIVE=ON ..
|
|
make
|
|
- name: Compile soak test (web)
|
|
run: ./bin/github-actions/build_soak_web.sh
|
|
- name: Run soak test
|
|
run: |
|
|
cd emsdk
|
|
source ./emsdk_env.sh
|
|
cd ..
|
|
WEBRTC_NATIVE=1 timeout 240 ./bin/github-actions/run_soak.sh
|
|
|
|
compile-examples-linux-c:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Install prerequisites
|
|
run: sudo apt-get install build-essential cmake -y
|
|
- name: Compile examples
|
|
run: |
|
|
cd examples
|
|
cmake .
|
|
make
|
|
|
|
compile-examples-linux-cpp:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Install prerequisites
|
|
run: sudo apt-get install build-essential cmake -y
|
|
- name: Compile examples
|
|
run: |
|
|
cd examples
|
|
cmake -DCPP_COMPILE=ON .
|
|
make
|
|
|
|
compile-examples-osx-c:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Install prerequisites
|
|
run: brew install cmake
|
|
- name: Compile examples
|
|
run: |
|
|
cd examples
|
|
cmake .
|
|
make
|
|
|
|
compile-examples-osx-cpp:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Install prerequisites
|
|
run: brew install cmake
|
|
- name: Compile examples
|
|
run: |
|
|
cd examples
|
|
cmake -DCPP_COMPILE=ON .
|
|
make
|
|
|
|
compile-examples-windows-c:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: ilammy/msvc-dev-cmd@v1
|
|
- name: Compile examples
|
|
run: |
|
|
cd examples
|
|
cmake -G "NMake Makefiles" .
|
|
nmake
|
|
|
|
compile-examples-windows-cpp:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: ilammy/msvc-dev-cmd@v1
|
|
- name: Compile examples
|
|
run: |
|
|
cd examples
|
|
cmake -G "NMake Makefiles" -DCPP_COMPILE=ON .
|
|
nmake
|