Skip to content

Commit

Permalink
chore(ci): fixed up master and release yamls.
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
  • Loading branch information
FedeDP committed Apr 18, 2023
1 parent fbbf8a4 commit 3cdc306
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 52 deletions.
28 changes: 9 additions & 19 deletions .github/workflows/master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,40 +23,30 @@ jobs:

publish-dev-packages:
needs: [build-dev-packages, build-dev-packages-arm64]
outputs:
version: ${{ steps.expose_version.outputs.version }}

steps:
- name: Publish packages
uses: falcosecurity/falco/.github/workflows/reusable_publish_packages.yaml@main
with:
bucket: '-dev'
version: ${{ needs.build-dev-packages.outputs.version }}
secrets: inherit

- name: Expose FALCO_VERSION
id: expose_version
run: |
echo "version=${{ needs.build-dev-packages.outputs.version }}" >> $GITHUB_OUTPUT
uses: falcosecurity/falco/.github/workflows/reusable_publish_packages.yaml@main
with:
bucket: '-dev'
version: ${{ needs.build-dev-packages.outputs.version }}
secrets: inherit

build-dev-docker:
needs: publish-dev-packages
needs: [build-dev-packages, publish-dev-packages]
uses: falcosecurity/falco/.github/workflows/reusable_build_docker.yaml@main
with:
arch: x86_64
tagname: master
bucket: '-dev'
version: ${{ needs.publish-dev-packages.outputs.version }}
version: ${{ needs.build-dev-packages.outputs.version }}
secrets: inherit

build-dev-docker-arm64:
needs: publish-dev-packages
needs: [build-dev-packages, publish-dev-packages]
uses: falcosecurity/falco/.github/workflows/reusable_build_docker.yaml@main
with:
arch: aarch64
tagname: master
bucket: '-dev'
version: ${{ needs.publish-dev-packages.outputs.version }}
version: ${{ needs.build-dev-packages.outputs.version }}
secrets: inherit

publish-dev-docker:
Expand Down
26 changes: 8 additions & 18 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,37 +24,27 @@ jobs:

publish-packages:
needs: [build-packages, build-packages-arm64]
outputs:
version: ${{ steps.expose_version.outputs.version }}

steps:
- name: Publish packages
uses: falcosecurity/falco/.github/workflows/reusable_publish_packages.yaml@main
with:
version: ${{ needs.build-packages.outputs.version }}
secrets: inherit

- name: Expose FALCO_VERSION
id: expose_version
run: |
echo "version=${{ needs.build-packages.outputs.version }}" >> $GITHUB_OUTPUT
uses: falcosecurity/falco/.github/workflows/reusable_publish_packages.yaml@main
with:
version: ${{ needs.build-packages.outputs.version }}
secrets: inherit

build-docker:
needs: publish-packages
needs: [build-packages, publish-packages]
uses: falcosecurity/falco/.github/workflows/reusable_build_docker.yaml@main
with:
arch: x86_64
tagname: ${{ github.ref_name }}
version: ${{ needs.publish-packages.outputs.version }}
version: ${{ needs.build-packages.outputs.version }}
secrets: inherit

build-docker-arm64:
needs: publish-dev-packages
needs: [build-packages, publish-packages]
uses: falcosecurity/falco/.github/workflows/reusable_build_docker.yaml@main
with:
arch: aarch64
tagname: ${{ github.ref_name }}
version: ${{ needs.publish-packages.outputs.version }}
version: ${{ needs.build-packages.outputs.version }}
secrets: inherit

publish-docker:
Expand Down
21 changes: 6 additions & 15 deletions .github/workflows/reusable_build_packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ jobs:

- name: Install build dependencies
run: |
mkdir deps
pushd deps
mkdir deps && cd deps
apt update -y
DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends ca-certificates cmake build-essential clang-14 git pkg-config autoconf automake libelf-dev
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 90
Expand All @@ -40,17 +39,13 @@ jobs:
cd bpftool
git submodule update --init
cd src && make install
popd
- name: Build modern BPF skeleton
run: |
pushd source
mkdir skeleton-build
pushd skeleton-build
cd source
mkdir skeleton-build && cd skeleton-build
cmake -DUSE_BUNDLED_DEPS=ON -DBUILD_FALCO_MODERN_BPF=ON -DCREATE_TEST_TARGETS=Off ..
make ProbeSkeleton
popd
popd
- name: Build Falco packages
run: |
Expand Down Expand Up @@ -118,22 +113,18 @@ jobs:
- name: Prepare project
run: |
mkdir build
pushd build
mkdir build && cd build
cmake -DCPACK_GENERATOR=TGZ -DBUILD_BPF=Off -DBUILD_DRIVER=Off -DCMAKE_BUILD_TYPE=Release -DUSE_BUNDLED_DEPS=On -DUSE_BUNDLED_LIBELF=Off -DBUILD_LIBSCAP_MODERN_BPF=ON -DMUSL_OPTIMIZED_BUILD=On -DFALCO_ETC_DIR=/etc/falco /source-static/falco
popd
- name: Build project
run: |
pushd build
cd build
make -j6 all
popd
- name: Build packages
run: |
pushd build
cd build
make -j6 package
popd
- name: Upload Falco static package
uses: actions/upload-artifact@v3
Expand Down

0 comments on commit 3cdc306

Please sign in to comment.