save log #37
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Mayhem (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' }} | |
USE_BAZEL_VERSION: ${{ 'last_green' || '' }} | |
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: Download and Install VS Build Tools | |
run: | | |
./scripts/install_vs_buildtools.bat | |
# save log file as artifact | |
- name: Save log file as artifact | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
path: ./vs_buildtools_install.log | |
name: vs_buildtools_install_log | |
- name: Download and Install Clang | |
run: | | |
./scripts/install_llvm.bat | |
- name: Download and Install Mayhem | |
run: | | |
$installPath = "C:\Program Files\Mayhem" | |
New-Item -ItemType Directory -Force -Path $installPath | |
curl -L "${{ env.MAYHEM_URL }}/cli/Windows/mayhem.exe" -o "$installPath\mayhem.exe" | |
[System.Environment]::SetEnvironmentVariable("PATH", $env:PATH + ";$installPath", [System.EnvironmentVariableTarget]::Process) | |
mayhem --version | |
env: | |
MAYHEM_URL: ${{ env.MAYHEM_URL }} | |
- name: Log in to Mayhem | |
run: | | |
$installPath = "C:\Program Files\Mayhem" | |
[System.Environment]::SetEnvironmentVariable("PATH", $env:PATH + ";$installPath", [System.EnvironmentVariableTarget]::Process) | |
mayhem login --url ${{ env.MAYHEM_URL }} --token ${{ secrets.MAYHEM_TOKEN }} | |
env: | |
MAYHEM_URL: ${{ env.MAYHEM_URL }} | |
MAYHEM_TOKEN: ${{ secrets.MAYHEM_TOKEN }} | |
- name: Run Bazel commands | |
run: | | |
$installPath = "C:\Program Files\Mayhem" | |
[System.Environment]::SetEnvironmentVariable("PATH", $env:PATH + ";$installPath", [System.EnvironmentVariableTarget]::Process) | |
bazel build //fuzz:fuzz_calculator --toolchain_resolution_debug='.*' --incompatible_enable_cc_toolchain_resolution --compiler=clang-cl | |
# bazel build --define=MAYHEM_URL=${{ env.MAYHEM_URL }} //mayhem:mayhem_fuzz_calculator | |
env: | |
MAYHEM_URL: ${{ env.MAYHEM_URL }} | |