Merge branch 'master' of https://github.com/hubblo-org/windows-rapl-d… #65
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 Windows package | |
on: | |
push: | |
branches: [ "master" ] | |
paths-ignore: | |
- 'docs_src/**' | |
- 'README.md' | |
- 'CITATION' | |
- 'CONTRIBUTING.md' | |
#tags: [ 'v*.*.*', 'dev*.*.*' ] | |
jobs: | |
sign_driver: | |
name: Sign Driver | |
runs-on: windows-2022 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Download Windows SDK | |
run: Invoke-WebRequest -Uri https://scaphandre.s3.fr-par.scw.cloud/utils/winsdksetup_win11.exe -OutFile winsdksetup.exe | |
- name: Install SDK | |
run: .\winsdksetup.exe /v /qn License=Yes | |
- name: Download Windows WDK | |
run: Invoke-WebRequest -Uri https://scaphandre.s3.fr-par.scw.cloud/utils/wdksetup_win11.exe -OutFile wdksetup.exe | |
- name: Install WDK | |
run: .\wdksetup.exe /v /qn License=Yes | |
- name: Check what is in C:\Program Files (x86)\Windows Kits | |
run: ls "C:\Program Files (x86)\Windows Kits\" | |
#- name: Setup WDK | |
# run: C:\"Program Files (x86)"\Windows Kits\10\Vsix\VS2022\10.0.22621.382\WDK.vsix | |
- name: Get PWD/current path | |
run: $SRCPWD=pwd; echo "SRCPWD = $SRCPWD"; echo SRCPWD=$SRCPWD >> $env:GITHUB_ENV | |
- name: Get latest Kit folder | |
run: $regex = '(10).(\d).(\d)+.(\d+)'; $LFOLDER=(ls "C:\Program Files (x86)\Windows Kits\10\bin" | sort Name | select name | Select-String -Pattern $regex).Matches.Value | Select-Object -Last 1; echo "LFOLDER=$LFOLDER" >> $env:GITHUB_ENV | |
- name: Check what is in C:\Program Files (x86)\Windows Kits\10\bin | |
run: ls "C:\Program Files (x86)\Windows Kits\10\bin\$env:LFOLDER\x64\" | |
- run: ls "C:\Program Files (x86)\Windows Kits\10\bin\x64\" | |
- run: ls "C:\Program Files (x86)\Windows Kits\10\bin\x86\" | |
- name: Generate self-signed certificate | |
run: | | |
$all_args=@('-r','-pe','-ss','PrivateCertStore','-n','CN=hubblo.org','-eku','1.3.6.1.5.5.7.3.3','ScaphandreDrvTest.cer'); | |
& "C:\Program Files (x86)\Windows Kits\10\bin\$env:LFOLDER\x64\MakeCert.exe" $all_args | |
- run: | | |
$src_pwd="$env:SRCPWD\ScaphandreDrv\ScaphandreDrv.inf"; | |
echo "src_pwd = $src_pwd"; | |
$all_args=@('-f',"$src_pwd",'-a','x64','-d',"'*'",'-v',"'*'"); | |
echo "all_args = $all_args"; | |
& "C:\Program Files (x86)\Windows Kits\10\bin\$env:LFOLDER\x64\stampinf.exe" $all_args | |
- run: | | |
$all_args=@("/driver:.\ScaphandreDrv\",'/os:10_X64'); | |
cd $env:SRCPWD; & "C:\Program Files (x86)\Windows Kits\10\bin\x86\Inf2Cat.exe" $all_args | |
- run: | | |
$all_args=@('sign','/v','/fd','sha256','/s','PrivateCertStore','/n','hubblo.org',"$env:SRCPWD\ScaphandreDrv\scaphandredrv.cat"); | |
& "C:\Program Files (x86)\Windows Kits\10\bin\$env:LFOLDER\x64\signtool.exe" $all_args | |
- run: | | |
$all_args=@('/add',"$env:SRCPWD\ScaphandreDrv\ScaphandreDrvTest.cer",'/s','/r','localMachine','root'); | |
& "C:\Program Files (x86)\Windows Kits\10\bin\$env:LFOLDER\x64\certmgr.exe" $all_args | |
#- run: & "C:\Program Files (x86)\Windows Kits\10\Tools\10.0.22621.0\x64\devcon.exe" install .\ScaphandreDrv.inf root\SCAPHANDREDRV |