Add support for Python integration tests #9
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: SubZero Build Pipeline | |
on: | |
push: | |
branches: | |
- '**' # Triggers on push to any branch | |
pull_request: | |
branches: | |
- '**' # Triggers on pull requests to any branch | |
jobs: | |
# Standard CMake Build Job | |
cmake-build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Install Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y --no-install-recommends \ | |
build-essential \ | |
cmake \ | |
pkg-config \ | |
libglib2.0-dev \ | |
libxml2-dev \ | |
libncurses5-dev \ | |
libevent-dev \ | |
zlib1g-dev \ | |
python3 \ | |
python3-pip \ | |
xxd \ | |
grep \ | |
findutils \ | |
sed \ | |
gawk | |
- name: Configure and Build | |
run: | | |
cmake -S . -B build -DCMAKE_EXE_LINKER_FLAGS="-lm" && | |
cmake --build build | |
# Docker Build and Test Job | |
docker-build: | |
if: github.ref == 'refs/heads/master' && github.event_name == 'push' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build Docker Image | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: false | |
tags: subzero-dev | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache |