-
-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: adding prometheus pull only build for windows
- Loading branch information
Showing
3 changed files
with
76 additions
and
113 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: Build exe installer for windows for prometheus-push only version | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- 'docs_src/**' | ||
- 'README.md' | ||
- 'CITATION' | ||
- 'book.toml' | ||
- 'CONTRIBUTING.md' | ||
tags: [ 'v*.*.*', 'dev*.*.*' ] | ||
branches: [ '336-proper-handling-of-windows-service-management' ] | ||
|
||
env: | ||
WRD_VERSION: v0.0.4 | ||
WRD_BASE_URL: https://github.com/hubblo-org/windows-rapl-driver/releases/download | ||
|
||
jobs: | ||
build_exe_win1011: | ||
name: Build exe installer for windows 10/11/server 2016/server 2019/server 2022 | ||
runs-on: "windows-latest" | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Install Innosoft | ||
run: | | ||
$url = "https://jrsoftware.org/download.php/is.exe" | ||
$dest = "is.exe" | ||
Invoke-WebRequest -Uri $url -OutFile $dest | ||
ls | ||
& "D:\a\scaphandre\scaphandre\$dest" /verysilent /suppressmsgbox | ||
ls "C:\Program Files (x86)\Inno Setup 6\" | ||
- name: Get windows-rapl-driver | ||
shell: pwsh | ||
run: | | ||
$dest = "DriverLoader.exe" | ||
$url = "${{ env.WRD_BASE_URL }}/${{ env.WRD_VERSION }}/DriverLoader.exe" | ||
Invoke-WebRequest -Uri ($url -replace '"', "") -OutFile $dest | ||
$dest = "ScaphandreDrv.cat" | ||
$url = "${{ env.WRD_BASE_URL }}/${{ env.WRD_VERSION }}/ScaphandreDrv.cat" | ||
Invoke-WebRequest -Uri ($url -replace '"', "") -OutFile $dest | ||
$dest = "ScaphandreDrv.sys" | ||
$url = "${{ env.WRD_BASE_URL }}/${{ env.WRD_VERSION }}/ScaphandreDrv.sys" | ||
Invoke-WebRequest -Uri ($url -replace '"', "") -OutFile $dest | ||
$dest = "ScaphandreDrv.inf" | ||
$url = "${{ env.WRD_BASE_URL }}/${{ env.WRD_VERSION }}/ScaphandreDrv.inf" | ||
Invoke-WebRequest -Uri ($url -replace '"', "") -OutFile $dest | ||
- name: Install Rustup | ||
uses: crazy-max/ghaction-chocolatey@v2 | ||
with: | ||
args: install rustup.install --ignore-checksums | ||
- name: Install Rust toolchain | ||
run: | | ||
rustup toolchain install stable-x86_64-pc-windows-msvc | ||
- name: Build Scaphandre | ||
run: | | ||
cargo build --release --no-default-features --features "prometheus json" | ||
- name: Build package | ||
run: | | ||
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" packaging/windows/installer.iss | ||
- name: Upload artifact #Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force | ||
run: | | ||
Set-PSRepository -Name 'PSGallery' -InstallationPolicy Trusted | ||
Install-Module -Confirm:$False -Name AWS.Tools.Installer | ||
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine | ||
Import-Module AWS.Tools.Installer | ||
Install-AWSToolsModule AWS.Tools.EC2,AWS.Tools.S3 -CleanUp -Confirm:$False -AllowClobber | ||
Set-AWSCredential -AccessKey ${{ secrets.S3_ACCESS_KEY_ID }} -SecretKey ${{ secrets.S3_SECRET_ACCESS_KEY }} -StoreAs default | ||
mv packaging/windows/Output/scaphandre_installer.exe scaphandre_${{ github.ref_name }}_installer.exe | ||
$clientconfig=@{ | ||
SignatureVersion="s3v4" | ||
ServiceUrl="https://s3.fr-par.scw.cloud" | ||
} | ||
Write-S3Object -EndpointUrl "https://s3.fr-par.scw.cloud" -Region "fr-par" -BucketName "scaphandre" -File scaphandre_${{ github.ref_name }}_installer.exe -key "x86_64/scaphandre_${{ github.ref_name }}_installer.exe" -PublicReadOnly -ClientConfig $clientconfig |
This file was deleted.
Oops, something went wrong.