Skip to content

Commit

Permalink
Create subzero-pipeline.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
simondevenish authored Nov 16, 2024
1 parent 5d98ae8 commit 7773afa
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/subzero-pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
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
- name: Configure and Build
run: |
cmake -S . -B build &&
cmake --build build
# Docker Build and Test Job
docker-build:
if: github.ref == 'refs/heads/main' && 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

0 comments on commit 7773afa

Please sign in to comment.