-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5d98ae8
commit 7773afa
Showing
1 changed file
with
56 additions
and
0 deletions.
There are no files selected for viewing
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
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 |