Skip to content

Commit

Permalink
add sanitizers for crypto3
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyMlashkin committed Sep 26, 2024
1 parent c34e13c commit 47dc00c
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .github/workflows/clang-sanitizers-linux-nix-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build and Test on Linux Platforms

on:
workflow_call:

jobs:
build-and-test:
name: "Build and test Linux with clang"
runs-on: [self-hosted, Linux, X64, aws_autoscaling]
steps:
# https://github.com/actions/checkout/issues/1552
- name: Clean up after previous checkout
run: chmod +w -R ${GITHUB_WORKSPACE}; rm -rf ${GITHUB_WORKSPACE}/*;

- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Run checks
run: nix build -L .?#checks.x86_64-linux.all-sanitizers
env:
NIX_CONFIG: |
cores = 4
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action/linux@v2
with:
check_name: "Sanitizers Test Results"
files: "results/*.xml"
comment_mode: ${{ github.event.pull_request.head.repo.fork && 'off' || 'always' }} # Don't create PR comment from fork runs
action_fail_on_inconclusive: true # fail, if no reports

7 changes: 7 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ jobs:
always() && !cancelled()
secrets: inherit

test-linux-sanitizers:
name: Linux Crypto3 Test and sanitize with clang
uses: ./.github/workflows/clang-sanitizers-linux-nix-check.yml
if: |
always() && !cancelled()
secrets: inherit

check-proof-producer:
name: Check Proof Producer
uses: ./.github/workflows/check-proof-producer.yml
Expand Down
3 changes: 2 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
crypto3-debug-tests = (pkgs.callPackage ./crypto3/crypto3.nix {
enableDebug = true;
runTests = true;
sanitize = true;
});
crypto3-sanitize = (pkgs.callPackage ./crypto3/crypto3.nix {
enableDebug = true;
Expand Down Expand Up @@ -67,7 +68,7 @@
crypto3 = crypto3-clang-debug;
});

evm-assigner = (pkgs.callPackage ./evm-assigner/evm-assigner.nix {
evm-assigner = (pkgs.callPackage ./evm-assigner/evm-assigner.nix {
runTests = false;
enableDebug = false;
crypto3 = crypto3;
Expand Down

0 comments on commit 47dc00c

Please sign in to comment.