-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (66 loc) · 2.03 KB
/
Copy pathsmall-linux-test.yaml
File metadata and controls
75 lines (66 loc) · 2.03 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
name: Small Linux 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: [ubuntu-latest]
shared: [false]
build_type: [Release]
include:
- os: ubuntu-latest
triplet: x64-linux
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 "Logging into Mayhem"
echo $HOME
mkdir -p $HOME/.config/mayhem
echo "[DEFAULT]" > $HOME/.config/mayhem/mayhem
echo "url=$MAYHEM_URL" >> $HOME/.config/mayhem/mayhem
echo "token=$MAYHEM_TOKEN" >> $HOME/.config/mayhem/mayhem
echo "XDG_CONFIG_HOME=$HOME/.config" >> $GITHUB_ENV
shell: bash
env:
MAYHEM_URL: ${{ env.MAYHEM_URL }}
MAYHEM_TOKEN: ${{ secrets.MAYHEM_TOKEN }}
- name: Run bazel build
run: |
bazel run //examples:run_mayhemit
shell: bash
env:
MAYHEM_URL: ${{ env.MAYHEM_URL }}
XDG_CONFIG_HOME: ${{ env.XDG_CONFIG_HOME }}
- name: Run download
run: |
bazel build //examples:download_mayhemit
shell: bash
env:
MAYHEM_URL: ${{ env.MAYHEM_URL }}
XDG_CONFIG_HOME: ${{ env.XDG_CONFIG_HOME }}