-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (67 loc) · 2.14 KB
/
Copy pathsmall-win-test.yaml
File metadata and controls
76 lines (67 loc) · 2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Small Windows Test for rules_mayhem
on:
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/setup-bazel@0.18.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}
repository-cache: true
- name: Log into Mayhem
run: |
echo %USERPROFILE%
mkdir "%USERPROFILE%\.config\mayhem"
echo %USERPROFILE%
echo [DEFAULT]> "%USERPROFILE%\.config\mayhem\mayhem"
echo version=0>> "%USERPROFILE%\.config\mayhem\mayhem"
echo url=%MAYHEM_URL%>> "%USERPROFILE%\.config\mayhem\mayhem"
echo token=%MAYHEM_TOKEN%>> "%USERPROFILE%\.config\mayhem\mayhem"
echo XDG_CONFIG_HOME=%USERPROFILE%/.config>> "%GITHUB_ENV%"
shell: cmd
env:
MAYHEM_URL: ${{ env.MAYHEM_URL }}
MAYHEM_TOKEN: ${{ secrets.MAYHEM_TOKEN }}
- name: Run bazel build
run: |
bazel run //examples:run_mayhemit
shell: cmd
env:
MAYHEM_URL: ${{ env.MAYHEM_URL }}
XDG_CONFIG_HOME: ${{ env.XDG_CONFIG_HOME }}
- name: Run download
run: |
bazel build //examples:download_mayhemit
shell: cmd
env:
MAYHEM_URL: ${{ env.MAYHEM_URL }}
XDG_CONFIG_HOME: ${{ env.XDG_CONFIG_HOME }}