-
Notifications
You must be signed in to change notification settings - Fork 123
129 lines (111 loc) · 3.35 KB
/
build.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: Build
on:
push:
pull_request:
jobs:
Windows:
runs-on: windows-latest
steps:
# Checks-out
- uses: actions/checkout@v2
- uses: ilammy/msvc-dev-cmd@v1
- name: Install Meson
run: |
pip install meson
#don't use run-cmake for windows because only one build should add warnings to pull request
- name: Build Debug
run: |
meson setup debug --buildtype=debug --backend=vs
meson compile -C debug
- name: Upload ryzenadj debug
uses: actions/upload-artifact@v2
with:
name: ryzenadj-win64-debug
path: |
debug/ryzenadj.exe
debug/libryzenadj.dll
- name: Build Release
run: |
meson setup build --buildtype=release --backend=vs
meson compile -C build
- name: Prepair Release Folder
run: |
mkdir release
copy build/ryzenadj.exe release/
copy build/libryzenadj.dll release/
copy win32/* release/
copy examples/* release/
# - name: Test Scripts
# shell: pwsh
# run: |
# cd release
# $expectedOutput = "Not AMD processor, must be kidding"
# $cmdDemoOutput = '' | cmd.exe /c .\demo.bat
# if ($cmdDemoOutput -notcontains $expectedOutput){
# Write-Error "$cmdDemoOutput"
# exit 1
# }
# $psServiceOutput = Powershell .\readjustService.ps1 -noGUI
# if ($psServiceOutput -ne $expectedOutput){
# Write-Error "$psServiceOutput"
# exit 1
# }
# $pythonOutput = python pmtable-example.py
# if ($pythonOutput -notcontains $expectedOutput){
# Write-Error "$pythonOutput"
# exit 1
# }
# $pythonOutput = python readjust.py
# if ($pythonOutput -notcontains $expectedOutput){
# Write-Error "$pythonOutput"
# exit 1
# }
# exit 0
- name: Upload ryzenadj
uses: actions/upload-artifact@v2
with:
name: ryzenadj-win64
path: |
release/
!release/*.lib
!release/*.exp
- name: Upload libryzenadj
uses: actions/upload-artifact@v2
with:
name: libryzenadj-win64
path: |
./build/libryzenadj.dll
./build/libryzenadj.lib
./lib/ryzenadj.h
./win32/inpoutx64.dll
./win32/WinRing0x64.dll
./win32/WinRing0x64.sys
Linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libpci-dev meson ninja-build
- name: Meson Build
run: |
meson setup build --buildtype=release
meson compile -C build
# - name: Test Scripts
# shell: bash
# run: |
# cd examples
# export LD_LIBRARY_PATH="${{ github.workspace }}/build/"
# expectedOutput="Not AMD processor, must be kidding"
# pythonOutput=$(python pmtable-example.py 2>&1) || true
# if [[ ! "$pythonOutput" =~ "$expectedOutput" ]]; then
# echo "pmtable-example.py output: $pythonOutput"
# exit 1
# fi
# pythonOutput=$(python readjust.py 2>&1) || true
# if [[ ! "$pythonOutput" =~ "$expectedOutput" ]]; then
# echo "readjust.py output: $pythonOutput"
# exit 1
# fi
# exit 0