ci: build examples in CI #98
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: Build and Test VM | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
container: | |
- ubuntu-2204 | |
- fedora-39 | |
container: | |
image: "manjusakalza/bpftime-base-image:${{matrix.container}}" | |
options: --privileged | |
steps: | |
- name: cache dependencies | |
uses: actions/cache@v2 | |
id: cache | |
with: | |
path: ${{ github.workspace }}/${{ env.INSTALL_LOCATION }} | |
key: ${{ runner.os }}-dependencies | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- name: Install Ninja (Ubuntu) | |
if: ${{matrix.container == 'ubuntu-2204'}} | |
run: | |
apt install ninja-build | |
- name: Install Ninja (Fedora) | |
if: ${{matrix.container == 'fedora-39'}} | |
run: | |
dnf install -y ninja-build | |
- uses: actions/setup-python@v4 | |
if: startsWith(matrix.container,'ubuntu') | |
with: | |
python-version: '3.8' | |
- name: build debug | |
run: | |
| | |
cmake -B build -DCMAKE_BUILD_TYPE=Debug -DBPFTIME_ENABLE_UNIT_TESTING=1 -G Ninja | |
cmake --build build --target all -j | |
- name: run testsuit x86 | |
shell: bash | |
run: | | |
python3.8 -m venv ./test | |
source test/bin/activate | |
pip install -r test/requirements.txt | |
# make build # or build-arm32 build-arm64 | |
pytest -v -s test/test_framework | |
- name: build llvm JIT/AOT release as a standalone library | |
run: | | |
cmake -B build -DCMAKE_BUILD_TYPE=Release -G Ninja &&\ | |
cmake --build build --target all -j |