Skip to content

Commit

Permalink
wip: initial ci support
Browse files Browse the repository at this point in the history
Signed-off-by: Roberto Scolaro <[email protected]>
  • Loading branch information
therealbobo committed Oct 27, 2023
1 parent 7e5a4c8 commit c53c0a4
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 19 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,24 +58,24 @@ jobs:
build_type: Debug
cmd: "echo $(build/userspace/falco/falco -c ./falco.yaml --version | grep 'Engine:' | awk '{print $2}') $(echo $(build/userspace/falco/falco -c ./falco.yaml --version | grep 'Schema version:' | awk '{print $3}') $(build/userspace/falco/falco -c ./falco.yaml --list --markdown | grep '^`' | sort) $(build/userspace/falco/falco -c ./falco.yaml --list-events | sort) | sha256sum)"

build-dev-others-amd64:
name: build-dev-others-amd64
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Libs
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
with:
fetch-depth: 0
#build-dev-others-amd64:
# name: build-dev-others-amd64
# strategy:
# fail-fast: false
# matrix:
# os: [windows-latest, macos-latest]
# runs-on: ${{ matrix.os }}
# steps:
# - name: Checkout Libs
# uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
# with:
# fetch-depth: 0

- name: Build
run: |
mkdir -p build
cd build && cmake -DUSE_BUNDLED_DEPS=ON -DCMAKE_BUILD_TYPE=Release -DMINIMAL_BUILD=ON ..
cmake --build . --config Release
# - name: Build
# run: |
# mkdir -p build
# cd build && cmake -DUSE_BUNDLED_DEPS=ON -DCMAKE_BUILD_TYPE=Release -DMINIMAL_BUILD=ON ..
# cmake --build . --config Release

# checks the falco engine checksum for consistency
check-engine-checksum:
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/reusable_build_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ on:
description: x86_64 or aarch64
required: true
type: string
operating-systems:
description: "Optional input to set a list of operating systems which the workflow uses. Defaults to ['ubuntu-22.04', 'windows-latest', 'macos-latest'] if not set"
required: false
type: string
default: "['ubuntu-latest', 'windows-latest', 'macos-latest']"
minimal:
description: Minimal build
required: true
Expand All @@ -31,8 +36,12 @@ on:
jobs:
build-and-test:
# See https://github.com/actions/runner/issues/409#issuecomment-1158849936
runs-on: ${{ (inputs.arch == 'aarch64' && fromJSON('[ "self-hosted", "linux", "ARM64" ]')) || 'ubuntu-22.04' }}
runs-on: ${{ (inputs.arch == 'aarch64' && fromJSON('[ "self-hosted", "linux", "ARM64" ]')) || '${{matrix.operating-systems}}' }}
container: ${{ (inputs.arch == 'aarch64' && 'ubuntu:22.04') || '' }}
strategy:
fail-fast: false
matrix:
operating-systems: ${{fromJson(inputs.operating-systems)}}
outputs:
cmdout: ${{ steps.run_cmd.outputs.out }}
steps:
Expand All @@ -43,13 +52,15 @@ jobs:
ref: ${{ inputs.git_ref }}

- name: Update base image
if: matrix.operating-systems == 'ubuntu:22.04'
run: sudo apt update -y

- name: Install build dependencies
if: matrix.operating-systems == 'ubuntu:22.04'
run: sudo DEBIAN_FRONTEND=noninteractive apt install libjq-dev libelf-dev libyaml-cpp-dev cmake build-essential git -y

- name: Install build dependencies (non-minimal)
if: inputs.minimal != true
if: inputs.minimal != true && matrix.operating-systems == 'ubuntu:22.04'
run: sudo DEBIAN_FRONTEND=noninteractive apt install libssl-dev libyaml-dev libc-ares-dev libprotobuf-dev protobuf-compiler libgrpc++-dev protobuf-compiler-grpc rpm libcurl4-openssl-dev linux-headers-$(uname -r) clang llvm -y

- name: Prepare project
Expand Down

0 comments on commit c53c0a4

Please sign in to comment.