-
Notifications
You must be signed in to change notification settings - Fork 42
88 lines (68 loc) · 2.1 KB
/
test.yml
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
77
78
79
80
81
82
83
84
85
86
87
88
name: Run tests
on:
push:
branches:
- rewrite
paths:
- "Payload_Type/thanatos/**"
- ".github/workflows/**"
env:
AGENT_CODE: Payload_Type/thanatos/agent
MYTHIC_CODE: Payload_Type/thanatos
jobs:
test-agent:
name: Test Agent Code
runs-on: ubuntu-latest
env:
JSON_CONFIG: testing/configs/config.json
defaults:
run:
working-directory: ${{ env.AGENT_CODE }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
uses: ./.github/workflows/dependencies
- name: Run tests
run: make test
test-mythic:
name: Test Mythic code
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ env.MYTHIC_CODE }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
uses: ./.github/workflows/dependencies
- name: Run tests
run: make test
test-sanitizers:
name: Sanitizer Test Agent Code
runs-on: ubuntu-latest
env:
JSON_CONFIG: testing/configs/config.json
defaults:
run:
working-directory: ${{ env.AGENT_CODE }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
uses: ./.github/workflows/dependencies
- name: Run sanitizer tests (Linux)
if: ${{ runner.os == 'Linux' }}
run: make sanitizers
- name: Run sanitizer tests (Windows)
if: ${{ runner.os == 'Windows' }}
run: |
$vspath = (Get-VSSetupInstance | Select-VSSetupInstance -Require Microsoft.VisualStudio.Component.VC.ASAN).InstallationPath
Import-Module $vspath/Common7/Tools/Microsoft.VisualStudio.DevShell.dll
Enter-VsDevShell -VsInstallPath $vspath -SkipAutomaticLocation
$env:PATH="$env:PATH;$env:VCToolsInstallDir/bin/Hostx64/x64"
cargo +nightly test --color always -p ffiwrappers --all-features --target $env:TARGET
env:
TARGET: x86_64-pc-windows-msvc
RUSTFLAGS: -Zsanitizer=address
CARGO_INCREMENTAL: 0