rework cmake v2 #378
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: Build | |
on: | |
push: | |
pull_request: | |
jobs: | |
Windows: | |
runs-on: windows-latest | |
steps: | |
# Checks-out | |
- uses: actions/checkout@v2 | |
- uses: ilammy/msvc-dev-cmd@v1 | |
#don't use run-cmake for windows because only one build should add warnings to pull request | |
- name: Build ryzenadj Debug | |
run: | | |
cmake -B debug -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug | |
cd debug | |
nmake | |
- name: Upload ryzenadj Debug | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ryzenadj-win64-debug | |
path: | | |
debug/ryzenadj.exe | |
- name: Build libryzenadj Debug | |
run: | | |
cmake -S lib -B debuglib -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug | |
cd debuglib | |
nmake | |
- name: Upload libryzenadj Debug | |
uses: actions/upload-artifact@v2 | |
with: | |
name: libryzenadj-win64-debug | |
path: | | |
debuglib/libryzenadj.dll | |
- name: Build ryzenadj Release | |
run: | | |
cmake -B build -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release | |
cd build | |
nmake | |
- name: Prepair ryzenadj Release Folder | |
run: | | |
mkdir release | |
copy build/ryzenadj.exe release/ | |
copy build/lib/libryzenadj.lib 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 Release | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ryzenadj-win64 | |
path: | | |
release/ | |
!release/*.lib | |
!release/*.exp | |
- name: Build libryzenadj Release | |
run: | | |
cmake -S lib -B buildlib -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release | |
cd buildlib | |
nmake | |
- name: Upload libryzenadj Release | |
uses: actions/upload-artifact@v2 | |
with: | |
name: libryzenadj-win64 | |
path: | | |
./buildlib/libryzenadj.dll | |
./buildlib/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 libpci-dev | |
- name: run-cmake #with support for inline error reporting | |
uses: lukka/[email protected] | |
- name: Test make like readme | |
run: | | |
cmake -B build -DCMAKE_BUILD_TYPE=Release | |
cd build | |
make | |
# - 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 |