Skip to content

new version

new version #78

Workflow file for this run

name: Mayhem on Windows (Bazel-based)
on:
push:
pull_request:
workflow_dispatch:
inputs:
mayhem_url:
description: 'Mayhem URL'
required: true
default: 'https://app.mayhem.security'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
MAYHEM_URL: ${{ github.event.inputs.mayhem_url || 'https://app.mayhem.security' }}
MAYHEM_TOKEN: ${{ secrets.MAYHEM_TOKEN }}
jobs:
build:
name: '${{ matrix.os }} shared=${{ matrix.shared }} ${{ matrix.build_type }}'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
shared: [false]
build_type: [Release]
include:
- os: windows-latest
triplet: x64-windows
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Prep Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install Bazel
uses: bazel-contrib/[email protected]
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}
repository-cache: true
- name: Run bazel for Mayhem package
run: |
bazel build --action_env=MAYHEM_URL=${{ env.MAYHEM_URL }} --action_env=MAYHEM_TOKEN=${{ secrets.MAYHEM_TOKEN }} //mayhem:run_test_calculator_package
env:
MAYHEM_URL: ${{ env.MAYHEM_URL }}
MAYHEM_TOKEN: ${{ secrets.MAYHEM_TOKEN }}
# - name: Install LLVM
# run: |
# scripts\install_llvm.bat
# shell: cmd
# - name: Run bazel for Mayhem + libFuzzer
# run: |
# bazel clean --expunge
# set USE_CLANG_CL=1
# bazel build --compiler=clang-cl --config=libfuzzer --action_env=MAYHEM_URL=${{ env.MAYHEM_URL }} --action_env=MAYHEM_TOKEN=${{ secrets.MAYHEM_TOKEN }} //mayhem:run_package_fuzz_calculator
# - name: Run coverage manually
# run: |
# bazel build --action_env=MAYHEM_URL=${{ env.MAYHEM_URL }} --action_env=MAYHEM_TOKEN=${{ secrets.MAYHEM_TOKEN }} //test:download_combined_test_calculator_results
# for /f %%i in ('dir /b .\bazel-bin\test\combined_test_calculator-pkg\testsuite') do bazel coverage --combined_report=lcov //test:combined_test_calculator --test_arg=test/combined_test_calculator-pkg/testsuite/%%i
# env:
# MAYHEM_URL: ${{ env.MAYHEM_URL }}
# MAYHEM_TOKEN: ${{ secrets.MAYHEM_TOKEN }}