Skip to content

Commit

Permalink
add s390x yamls
Browse files Browse the repository at this point in the history
  • Loading branch information
vivkong committed Apr 3, 2024
1 parent e2def50 commit 55257a2
Show file tree
Hide file tree
Showing 4 changed files with 447 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ jobs:
sanitizers: true

build-dev-packages-s390x:
runs-on: [self-hosted, S390X]
needs: [fetch-version]
uses: ./.github/workflows/reusable_build_packages.yaml
uses: ./.github/workflows/reusable_build_packages_s390x.yaml
with:
# arch: s390x
version: ${{ needs.fetch-version.outputs.version }}
Expand Down Expand Up @@ -68,6 +67,16 @@ jobs:
static: ${{ matrix.static != '' && true || false }}
version: ${{ needs.fetch-version.outputs.version }}

test-dev-packages-s390x:
needs: [fetch-version, build-dev-packages-s390x]
uses: ./.github/workflows/reusable_test_packages_s390x.yaml
strategy:
fail-fast: false
with:
# arch: aarch64
static: ${{ matrix.static != '' && true || false }}
version: ${{ needs.fetch-version.outputs.version }}

build-dev-minimal:
uses: ./.github/workflows/reusable_build_dev.yaml
with:
Expand All @@ -85,8 +94,7 @@ jobs:
build_type: Debug

build-dev-minimal-s390x:
runs-on: [self-hosted, S390X]
uses: ./.github/workflows/reusable_build_dev.yaml
uses: ./.github/workflows/reusable_build_dev_s390x.yaml
with:
# arch: s390x
git_ref: ${{ github.event.pull_request.head.sha }}
Expand Down Expand Up @@ -168,4 +176,4 @@ jobs:
else
echo "engine version for baseref and headref differ too, so no bump is required"
fi
fi
fi
89 changes: 89 additions & 0 deletions .github/workflows/reusable_build_dev_s390x.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# This is a reusable workflow used by the master CI
on:
workflow_call:
outputs:
cmdout:
description: "Post-build command output"
value: ${{ jobs.build-and-test.outputs.cmdout }}
inputs:
# arch:
# description: x86_64 or aarch64
# required: true
# type: string
minimal:
description: Minimal build
required: true
type: boolean
sanitizers:
description: Enable sanitizer support
required: false
default: false
type: boolean
build_type:
description: One of 'Debug' or 'Release'
required: true
type: string
git_ref:
description: Git ref used for checking out the code
required: true
type: string
cmd:
description: If defined, this command is executed after a successful build and its output is set in the `cmdout` output
required: false
default: ''
type: string

jobs:
build-and-test:
# See https://github.com/actions/runner/issues/409#issuecomment-1158849936
runs-on: [self-hosted, S390X] #${{ (inputs.arch == 'aarch64' && 'actuated-arm64-8cpu-16gb') || 'ubuntu-22.04' }}
outputs:
cmdout: ${{ steps.run_cmd.outputs.out }}
steps:
- name: Checkout
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
with:
fetch-depth: 0
ref: ${{ inputs.git_ref }}

- name: Update base image
run: sudo apt update -y

- name: Install build dependencies
run: sudo DEBIAN_FRONTEND=noninteractive apt install libelf-dev libyaml-cpp-dev cmake build-essential git -y

- name: Install build dependencies (non-minimal)
if: inputs.minimal != true
run: sudo DEBIAN_FRONTEND=noninteractive apt install libssl-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
run: |
cmake -B build -S .\
-DBUILD_FALCO_UNIT_TESTS=On \
-DCMAKE_BUILD_TYPE=${{ inputs.build_type }} \
-DBUILD_BPF=${{ inputs.minimal == true && 'OFF' || 'ON' }} \
-DBUILD_DRIVER=${{ inputs.minimal == true && 'OFF' || 'ON' }} \
-DMINIMAL_BUILD=${{ inputs.minimal == true && 'ON' || 'OFF' }} \
-DUSE_ASAN=${{ inputs.sanitizers == true && 'ON' || 'OFF' }} \
-DUSE_UBSAN=${{ inputs.sanitizers == true && 'ON' || 'OFF' }} \
-DUSE_BUNDLED_DEPS=Off \
-DUSE_BUNDLED_NLOHMANN_JSON=On \
-DUSE_BUNDLED_CXXOPTS=On \
-DUSE_BUNDLED_CPPHTTPLIB=On \
- name: Build
run: |
KERNELDIR=/lib/modules/$(uname -r)/build cmake --build build -j4
- name: Run unit tests
run: |
pushd build
sudo ./unit_tests/falco_unit_tests
popd
- name: Run command
id: run_cmd
if: inputs.cmd != ''
run: |
OUT=$(${{ inputs.cmd }})
echo "out=${OUT}" >> $GITHUB_OUTPUT
Loading

0 comments on commit 55257a2

Please sign in to comment.