Skip to content

test in small synth of Stenailurus TNRS bug #332

test in small synth of Stenailurus TNRS bug

test in small synth of Stenailurus TNRS bug #332

Workflow file for this run

name: Build and test
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
jobs:
build:
strategy:
matrix:
name: [ubuntu-gcc-10,
ubuntu-gcc-11,
# ubuntu-gcc-11-sanitize,
ubuntu-gcc-12,
ubuntu-gcc-12-debugoptimized,
ubuntu-clang-15,
# macos-xcode-12.5
]
include:
- name: ubuntu-gcc-9
os: ubuntu-latest
compiler: gcc
version: "9"
buildtype: "release"
- name: ubuntu-gcc-10
os: ubuntu-latest
compiler: gcc
version: "10"
buildtype: "release"
- name: ubuntu-gcc-11
os: ubuntu-latest
compiler: gcc
version: "11"
buildtype: "release"
- name: ubuntu-gcc-12
os: ubuntu-latest
compiler: gcc
version: "12"
buildtype: "release"
# To enable this, we'd probably need to add `export ASAN_OPTIONS=detect_odr_violation=0`.
#
# - name: ubuntu-gcc-11-sanitize
# os: ubuntu-latest
# compiler: gcc
# version: "11"
# buildtype: "release"
# sanitize: "address"
#
- name: ubuntu-gcc-12-debugoptimized
os: ubuntu-latest
compiler: gcc
version: "12"
buildtype: "debugoptimized"
- name: ubuntu-clang-15
os: ubuntu-latest
compiler: clang
version: "15"
buildtype: "release"
# Currently we get "dyld: Library not loaded: @rpath/librestbed.4.dylib"
# when attempting to run executables.
#
# - name: macos-xcode-12.5
# os: macos-latest
# compiler: xcode
# version: "12.5"
# buildtype: "release"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install (Linux)
if: runner.os == 'Linux'
run: |
sudo apt install -y ccache libboost-all-dev
sudo rm -rf /usr/local/share/boost
if [ "${{ matrix.compiler }}" = "gcc" ]; then
sudo apt-get install -y g++-${{ matrix.version }}
echo "CC=ccache gcc-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=ccache g++-${{ matrix.version }}" >> $GITHUB_ENV
else
sudo apt-get install -y clang-${{ matrix.version }}
echo "CC=ccache clang-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=ccache clang++-${{ matrix.version }}" >> $GITHUB_ENV
fi
- name: Install (macOS)
if: runner.os == 'macOS'
run: |
brew install pkg-config boost ccache coreutils
echo "DEVELOPER_DIR=/Applications/Xcode_${{ matrix.version }}.app/Contents/Developer" >> $GITHUB_ENV
echo "CC=ccache clang" >> $GITHUB_ENV
echo "CXX=ccache clang++" >> $GITHUB_ENV
- name: Install meson
run: |
python3 -mpip install meson ninja
# Caches for different branches are isolated, so we don't need to put the branch name into the key.
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
run: |
ccache --set-config=cache_dir=$HOME/.ccache
if [ "${{ runner.os }}" = "Linux" ]; then
stamp=$(date '+%s')
else
stamp=$(gdate '+%s')
fi
echo "${stamp}"
echo "timestamp=${stamp}" >> $GITHUB_OUTPUT
- name: ccache cache files
uses: pat-s/always-upload-cache@v3.0.11
with:
path: ~/.ccache
key: ${{ matrix.name }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: |
${{ matrix.name }}-ccache-
- name: build restbed
run: |
cd
git clone --recursive https://github.com/corvusoft/restbed.git
mkdir restbed/build
cd restbed/build
cmake .. -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_TESTS=NO -DBUILD_SSL=NO -DCMAKE_INSTALL_PREFIX="${HOME}/local/" -G Ninja
ninja install
echo "LD_LIBRARY_PATH=${HOME}/local/library:$LD_LIBRARY_PATH" >> $GITHUB_ENV
- name: build g3log
run: |
cd
git clone https://github.com/KjellKod/g3log.git
mkdir g3log/build
cd g3log/build
cmake .. -DCMAKE_INSTALL_PREFIX="/usr/" -DUSE_DYNAMIC_LOGGING_LEVELS=ON -G Ninja
ninja package
sudo dpkg -i g3log*.deb
- name: Configure otcetera
run: |
cd ${GITHUB_WORKSPACE}
ARGS="${ARGS} -Drestbed_dir=${HOME}/local/"
if [ "${{ runner.os }}" = "Linux" ] && [ "${{ matrix.name }}" != "windows" ] && [ "${{ matrix.sanitize }}" != "" ] ; then
# Address sanitizer can't find its dylibs on OS X?
ARGS="${ARGS} -Db_sanitize=${{ matrix.sanitize }}"
fi
echo "CPPFLAGS=-g $CPPFLAGS" >> $GITHUB_ENV
echo meson setup build --prefix=$HOME/local --buildtype=${{ matrix.buildtype }} ${ARGS}
meson setup build --prefix=$HOME/local --buildtype=${{ matrix.buildtype }} ${ARGS}
- name: Build otcetera
run: |
ccache -p
ninja -C build install -j4
ccache -s
- name: Run otcetera tests
run: |
$HOME/local/bin/otc-version-reporter
$HOME/local/bin/otc-solve-subproblem -h
python3 -mpip install requests
ninja -C build test
- name: Upload test files if they failed
uses: actions/upload-artifact@v3
if: failure()
with:
name: test-results-${{ matrix.name }}
path: expected
- name: Upload test files if they failed
uses: actions/upload-artifact@v3
if: failure()
with:
name: test-resultsws-${{ matrix.name }}
path: expected-ws