fix libzmq path #42
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CMake | |
on: | |
push: | |
branches: | |
- '*' | |
tags: | |
- '*' | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
env: ${{ matrix.env }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
env: | |
BUILD_TYPE: Debug | |
- os: macos-12 | |
env: | |
BUILD_TYPE: Debug | |
CMAKE_GENERATOR: Xcode | |
- os: self-hosted | |
env: | |
BUILD_TYPE: Debug | |
MACOSX_DEPLOYMENT_TARGET: 10.15 | |
CMAKE_GENERATOR: Xcode | |
- os: windows-2019 | |
env: | |
WITH_LIBSODIUM: ON | |
ENABLE_CURVE: ON | |
CMAKE_GENERATOR: Visual Studio 16 2019 | |
MSVCVERSION: v142 | |
MSVCYEAR: vs2019 | |
ARTIFACT_NAME: v142-x64 | |
ENABLE_DRAFTS: ON | |
LIBZMQ_SRCDIR: ${{ github.workspace }}\libzmq | |
steps: | |
- name: Add msbuild to PATH | |
uses: microsoft/setup-msbuild@v1.0.2 | |
if: matrix.os == 'windows-2019' | |
- uses: actions/checkout@v1 | |
with: | |
submodules: recursive | |
# fetch-depth: 0 | |
- name: add Debian Packages | |
if: matrix.os == 'ubuntu-latest' | |
uses: myci-actions/add-deb-repo@10 | |
with: | |
repo-name: obs | |
repo: deb http://download.opensuse.org/repositories/network:/messaging:/zeromq:/git-draft/xUbuntu_22.04/ ./ | |
keys-asc: https://download.opensuse.org/repositories/network:/messaging:/zeromq:/git-draft/xUbuntu_22.04/Release.key | |
install: libzmq5 libzmq3-dev libglx-dev mesa-common-dev libasound2-dev libglew-dev libunwind-dev libmicrohttpd-dev | |
- name: Add brew packages | |
if: ${{ contains( matrix.os, 'macos' ) }} | |
shell: bash | |
run: brew install automake libmicrohttpd | |
# libzmq | |
- uses: actions/checkout@v2 | |
with: | |
repository: zeromq/libzmq | |
path: libzmq | |
submodules: true | |
- name: libZMQ Dep | |
if: ${{ contains( matrix.os, 'macos' ) }} | |
working-directory: libzmq | |
run: | | |
./autogen.sh | |
./configure | |
make | |
sudo make install | |
- run: md build_libzmq | |
shell: cmd | |
if: matrix.os == 'windows-2019' | |
- name: libzmq build win | |
if: matrix.os == 'windows-2019' | |
shell: cmd | |
working-directory: build_libzmq | |
run: | | |
cmake -D WITH_LIBSODIUM="OFF" -D ENABLE_DRAFTS="ON" -G "%CMAKE_GENERATOR%" ${{ github.workspace }}/libzmq | |
cmake --build . --config release --target install -- -verbosity:Minimal -maxcpucount | |
# - name: Cache CPython Build | |
# id: cpython-build-cache | |
# uses: actions/cache@v3 | |
# with: | |
# path: ${{github.workspace}}/build/python | |
# key: ${{ runner.os }}-${{ hashFiles('dist/osx/build_python.sh') }} | |
# - name: Build Python dep | |
# if: ${{ matrix.os != 'ubuntu-latest' && steps.cpython-build-cache.outputs.cache-hit != 'true' }} | |
# run: | | |
# ./dist/osx/build_python.sh ${{github.workspace}}/build/python | |
- uses: actions/setup-python@v5 | |
#if: matrix.os == 'windows-2019' | |
with: | |
python-version: '3.9' | |
- name: Extract Python Info | |
if: ${{ matrix.os != 'ubuntu-latest' }} | |
run: | | |
PY_ROOT=`python3 -c "import sys, os;print(os.path.abspath(sys.base_prefix))"` | |
echo "CMAKE_OPTIONS=-DPython3_ROOT_DIR=$PY_ROOT -DWITH_EMBED_PYTHON=ON -DWITH_OPENVR=OFF -DWITH_DEV=OFF" >> $GITHUB_ENV | |
- name: Configure CMake | |
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | |
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} $CMAKE_OPTIONS | |
- name: Build | |
# Build your program with the given configuration | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
- name: Pack | |
if: ${{ matrix.os != 'ubuntu-latest' }} | |
working-directory: ${{github.workspace}}/build | |
run: cpack -V -C ${{env.BUILD_TYPE}} | |
- name: Test | |
working-directory: ${{github.workspace}}/build | |
# Execute tests defined by the CMake configuration. | |
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | |
run: ctest -C ${{env.BUILD_TYPE}} -VV | |
- name: Upload file via SSH only on push | |
working-directory: ${{github.workspace}}/build | |
if: github.event_name == 'push' | |
env: | |
BBPWD: ${{ secrets.BBPWD }} | |
run: | | |
git fetch --all --tags | |
if [ "${RUNNER_OS}" == "Linux" ]; then zip -q -r $( echo $GITHUB_REPOSITORY | cut -d"/" -f2)_${RUNNER_OS}_$( git describe --tag --always --dirty --abbrev=4).zip * -x "*/test/*" "*/__pycache__/*"; fi | |
echo 'pong.hku.nl,37.97.171.71 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFxUlmYnS6gItSE4QuXpJxVFqhatyadmYaSQ+GPYwna9bs3KoWxfYl2j0ijA4aVAPPZLjLAjNbxd26fIrocW5fQ=' >> ./known_hosts | |
git clone https://github.com/clarkwang/passh.git | |
cd passh | |
cc -o passh passh.c | |
./passh -p env:BBPWD scp -o UserKnownHostsFile=../known_hosts ../gazebosc_*_* buildbot@pong.hku.nl:public_html/gazebosc/ | |
rm ../known_hosts |