Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new(ci): add a zig build job plus a composite action to setup zig. #2078

Merged
merged 5 commits into from
Sep 23, 2024

Conversation

FedeDP
Copy link
Contributor

@FedeDP FedeDP commented Sep 20, 2024

What type of PR is this?

/kind feature

Any specific area of the project related to this PR?

/area CI

Does this PR require a change in the driver versions?

What this PR does / why we need it:

This PR adds a composite action to setup zig (stolen by my Falco PR: falcosecurity/falco#3307, that will be of course updated to use the libs provided action once this gets merged), and adds a CI job to test build of sinsp-example with zig.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@poiana
Copy link
Contributor

poiana commented Sep 20, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: FedeDP

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@FedeDP FedeDP force-pushed the new/zig_action_ci branch 2 times, most recently from e4a7231 to 33e0670 Compare September 20, 2024 14:19
shell: bash
id: zig
env:
ZIG_VERSION: '0.14.0-dev.1588+2111f4c38'
Copy link
Contributor Author

@FedeDP FedeDP Sep 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to use a development version of zig since it needs my patch: ziglang/zig#21253
Hopefully they'll release 0.14.0 soon.

Also, keeping this PR wip as master zig artifacts are not kept around, ie: once a new master artifact is released, the old ones get removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a workaround, i am using actions/cache to cache the zig toolchain.

Copy link

codecov bot commented Sep 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.58%. Comparing base (b8c2d0d) to head (5abb3db).
Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2078      +/-   ##
==========================================
- Coverage   73.58%   73.58%   -0.01%     
==========================================
  Files         253      253              
  Lines       31867    31867              
  Branches     5640     5641       +1     
==========================================
- Hits        23449    23448       -1     
+ Misses       8414     8410       -4     
- Partials        4        9       +5     
Flag Coverage Δ
libsinsp 73.58% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented Sep 20, 2024

Perf diff from master - unit tests

     1.92%     +1.41%  [.] sinsp_thread_manager::find_thread
     0.75%     +0.85%  [.] sinsp_evt::get_direction
     1.33%     -0.70%  [.] sinsp_filter_check::parse_field_name
     6.03%     -0.68%  [.] sinsp_evt::get_type
     4.38%     -0.67%  [.] sinsp_parser::process_event
     1.07%     +0.51%  [.] sinsp_parser::parse_context_switch
     0.91%     +0.50%  [.] sinsp_evt::get_param
     2.50%     -0.44%  [.] scap_event_decode_params
     4.17%     -0.41%  [.] gzfile_read
     1.29%     +0.39%  [.] std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release

Heap diff from master - unit tests

peak heap memory consumption: 0B
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B

Heap diff from master - scap file

peak heap memory consumption: 0B
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B

Benchmarks diff from master

Comparing gbench_data.json to /root/actions-runner/_work/libs/libs/build/gbench_data.json
Benchmark                                                         Time             CPU      Time Old      Time New       CPU Old       CPU New
----------------------------------------------------------------------------------------------------------------------------------------------
BM_sinsp_split_mean                                            -0.0203         -0.0203           151           148           151           148
BM_sinsp_split_median                                          -0.0193         -0.0193           151           148           151           148
BM_sinsp_split_stddev                                          -0.4004         -0.4008             1             0             1             0
BM_sinsp_split_cv                                              -0.3879         -0.3884             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_mean                  +0.0330         +0.0330            41            42            41            42
BM_sinsp_concatenate_paths_relative_path_median                +0.0364         +0.0364            41            42            41            42
BM_sinsp_concatenate_paths_relative_path_stddev                +0.7860         +0.7848             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_cv                    +0.7290         +0.7277             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_mean                     -0.0103         -0.0103            17            17            17            17
BM_sinsp_concatenate_paths_empty_path_median                   -0.0036         -0.0036            17            17            17            17
BM_sinsp_concatenate_paths_empty_path_stddev                   -0.9098         -0.9100             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_cv                       -0.9089         -0.9091             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_mean                  -0.0284         -0.0284            45            44            45            44
BM_sinsp_concatenate_paths_absolute_path_median                -0.0355         -0.0354            45            43            45            43
BM_sinsp_concatenate_paths_absolute_path_stddev                -0.4896         -0.4897             1             1             1             1
BM_sinsp_concatenate_paths_absolute_path_cv                    -0.4747         -0.4748             0             0             0             0
BM_sinsp_split_container_image_mean                            +0.0236         +0.0236           350           358           350           358
BM_sinsp_split_container_image_median                          +0.0238         +0.0238           350           358           350           358
BM_sinsp_split_container_image_stddev                          -0.3030         -0.3031             2             1             2             1
BM_sinsp_split_container_image_cv                              -0.3191         -0.3192             0             0             0             0

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
@FedeDP FedeDP changed the title wip: new(ci): add a zig build job plus a composite action to setup zig. new(ci): add a zig build job plus a composite action to setup zig. Sep 20, 2024
@FedeDP
Copy link
Contributor Author

FedeDP commented Sep 20, 2024

/milestone 0.19.0

@poiana poiana added this to the 0.19.0 milestone Sep 20, 2024
Moreover, use zig version as cache key too.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
@@ -58,7 +58,9 @@ if((NOT ${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "s390x") AND ${SCAP_FILES_SUITE_
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/scap_files")
# Add here the name for new scap-files
set(SCAP_FILE_NAMES "kexec_arm64.scap" "kexec_x86.scap" "sample.scap")
set(SCAP_FILE_DOWNLOAD_PREFIX "https://download.falco.org/fixtures/libs/scap_files")
set(SCAP_FILE_DOWNLOAD_PREFIX
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To workaround some scarf-related issues, just skip using it while downloading text fixtures.

@poiana poiana merged commit f994d95 into master Sep 23, 2024
49 checks passed
@poiana poiana deleted the new/zig_action_ci branch September 23, 2024 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants