-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (56 loc) · 1.56 KB
/
subzero-pipeline.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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