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 bucket for fuzz targets #11131

Merged
merged 7 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 8 additions & 6 deletions .github/workflows/master_fuzzer_binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,15 @@ jobs:
- run: sudo mkswap /swap-file
- run: sudo swapon /swap-file

- name: Checkout
uses: actions/checkout@v4

- id: "auth"
uses: "google-github-actions/auth@v1"
name: Authenticate with Google Cloud
uses: "google-github-actions/auth@v2"
with:
workload_identity_provider: "projects/968400232856/locations/global/workloadIdentityPools/project-identity-pool/providers/github-provider"
service_account: "near-fuzzer-service-account@near-fuzzer.iam.gserviceaccount.com"
workload_identity_provider: "projects/346595944828/locations/global/workloadIdentityPools/github-pool/providers/github-provider"
service_account: "github-service-account@nearone-clusterfuzz.iam.gserviceaccount.com"

- name: Installing nightly rust
run: |
Expand All @@ -45,11 +49,9 @@ jobs:
with:
version: ">= 416.0.0"

- uses: actions/checkout@master

- name: "Compile fuzzers and upload to GCS"
run: |
NAME="nearcore-${{ github.ref_name }}-$(env TZ=Etc/UTC date +"%Y%m%d%H%M%S")"
# Our Clusterfuzz setup currently (2024-02) runs on Cascade Lake CPUs
RUSTFLAGS="--cfg fuzz -C target-cpu=cascadelake" cargo +nightly bolero build-clusterfuzz --all-features --profile fuzz
gsutil cp -Z target/fuzz/clusterfuzz.tar "gs://fuzzer_targets/${{ github.ref_name }}/$NAME.tar.gz"
gsutil cp -Z target/fuzz/clusterfuzz.tar "gs://nearone_fuzzer_targets/${{ github.ref_name }}/$NAME.tar.gz"
31 changes: 16 additions & 15 deletions .github/workflows/ondemand_fuzzer_binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,22 @@ jobs:
- run: sudo mkswap /swap-file
- run: sudo swapon /swap-file

- name: Checkout Release/RC branch
if: contains(fromJSON('["released", "prereleased"]'), github.event.action)
uses: actions/checkout@v4

- name: Checkout ${{ github.event.inputs.branch_ref }} branch
if: ${{ github.event_name == 'workflow_dispatch'}}
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch_ref }}

- id: "auth"
uses: "google-github-actions/auth@v1"
name: Authenticate with Google Cloud
uses: "google-github-actions/auth@v2"
with:
workload_identity_provider: "projects/968400232856/locations/global/workloadIdentityPools/project-identity-pool/providers/github-provider"
service_account: "near-fuzzer-service-account@near-fuzzer.iam.gserviceaccount.com"
workload_identity_provider: "projects/346595944828/locations/global/workloadIdentityPools/github-pool/providers/github-provider"
service_account: "github-service-account@nearone-clusterfuzz.iam.gserviceaccount.com"

- name: Installing nightly rust
run: |
Expand All @@ -57,20 +68,10 @@ jobs:
- run: rustup target add --toolchain nightly wasm32-unknown-unknown

- name: "Set up GCP SDK"
uses: "google-github-actions/setup-gcloud@v1"
uses: "google-github-actions/setup-gcloud@v2"
with:
version: ">= 416.0.0"

- name: Checkout Release/RC branch
if: contains(fromJSON('["released", "prereleased"]'), github.event.action)
uses: actions/checkout@master

- name: Checkout ${{ github.event.inputs.branch_ref }} branch
if: ${{ github.event_name == 'workflow_dispatch'}}
uses: actions/checkout@master
with:
ref: ${{ github.event.inputs.branch_ref }}

- name: Build Release branch fuzz targets
if: ${{ github.event.action == 'released'}}
run: echo "branch_type=release" >> "$GITHUB_ENV"
Expand All @@ -87,4 +88,4 @@ jobs:
run: |
NAME="nearcore-$branch_type-$(env TZ=Etc/UTC date +"%Y%m%d%H%M%S")"
RUSTFLAGS="--cfg fuzz" cargo +nightly bolero build-clusterfuzz --all-features --profile fuzz
gsutil cp -Z target/fuzz/clusterfuzz.tar "gs://fuzzer_targets/$branch_type/$NAME.tar.gz"
gsutil cp -Z target/fuzz/clusterfuzz.tar "gs://nearone_fuzzer_targets/$branch_type/$NAME.tar.gz"