Skip to content

Stdio redirection

Stdio redirection #469

Workflow file for this run

name: CMake
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
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
steps:
- uses: actions/checkout@v2
with:
submodules: true
- 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
- name: libZMQ Dep
if: ${{ contains( matrix.os, 'macos' ) }}
run: |
git clone https://github.com/zeromq/libzmq.git
cd libzmq
./autogen.sh
./configure
make
sudo make install
- 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
- name: Extract Python Info
if: ${{ matrix.os != 'ubuntu-latest' }}
run: |
PY_ROOT=`${{github.workspace}}/build/python/bin/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_*_* [email protected]:public_html/gazebosc/
rm ../known_hosts