Skip to content

rust: intercept module review #1134

rust: intercept module review

rust: intercept module review #1134

Workflow file for this run

name: continuous integration
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
name: Build on ${{ matrix.os }} with multilib ${{ matrix.multilib }}
strategy:
matrix:
include:
- os: ubuntu-latest
multilib: true
- os: ubuntu-latest
multilib: false
- os: macos-latest
multilib: false
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install package dependencies
if: startsWith( matrix.os, 'ubuntu' )
run: |
sudo apt-get update -y
sudo apt-get install -y cmake pkg-config gfortran nvidia-cuda-toolkit libtool-bin valgrind
- name: Install package dependencies
if: startsWith( matrix.os, 'macos' )
run: |
brew install cmake pkg-config fmt spdlog nlohmann-json grpc
echo "PKG_CONFIG_PATH=$(brew --prefix)/opt/openssl@1.1/lib/pkgconfig" >> $GITHUB_ENV
- uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: 'pip'
cache-dependency-path: '**/requirements.txt'
- name: Prepare
run: |
pip install -r test/requirements.txt
mkdir "$HOME/work/bear_build"
mkdir "$HOME/work/bear_install"
echo "BUILD_DIR=$HOME/work/bear_build" >> $GITHUB_ENV
echo "INSTALL_DIR=$HOME/work/bear_install" >> $GITHUB_ENV
echo "ZLIB_SRC_DIR=$HOME/work/zlib" >> $GITHUB_ENV
echo "$HOME/work/bear_install/bin:$PATH" >> $GITHUB_PATH
- name: Build
env:
CTEST_OUTPUT_ON_FAILURE: 1
C_FLAGS: -Wall -Wextra -pedantic
CXX_FLAGS: -Wall -Wextra -pedantic
CMAKE_OPTIONS: -DENABLE_MULTILIB=${{ matrix.multilib }}
run: |
cmake -B "$BUILD_DIR" -S "$GITHUB_WORKSPACE" $CMAKE_OPTIONS -DCMAKE_INSTALL_PREFIX:PATH="$INSTALL_DIR" -DCMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu
cmake --build "$BUILD_DIR" --parallel 1 --target install
- name: Run [functional test]
run: |
git clone https://github.com/madler/zlib.git $ZLIB_SRC_DIR -b v1.2.11
mkdir $HOME/work/zlib_compilations && cd $HOME/work/zlib_compilations
bear --help
bear -- $ZLIB_SRC_DIR/configure
bear -- make
cat compile_commands.json
$GITHUB_WORKSPACE/test/bin/assert_compilation compile_commands.json count -gt 30