Merge pull request #3 from alaamroue/master #4
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: Building For Windows | |
on: | |
push: | |
branches: | |
- main | |
- master | |
pull_request: | |
branches: | |
- main | |
- master | |
env: | |
EXE_NAME: ProMaIDeS_vc | |
BUILD_TYPE: Release | |
jobs: | |
BuildForWindows: | |
name: 'πͺ Build for Windows' | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: 'π§° Install Qt' | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: '5.15.2' | |
- name: 'π§° Install Nvidia Driver' | |
run: | | |
$url = "https://developer.download.nvidia.com/compute/cuda/12.3.1/local_installers/cuda_12.3.1_546.12_windows.exe" | |
$outputPath = "downloaded_file.exe" | |
Invoke-WebRequest -Uri $url -OutFile $outputPath | |
$argument = "-s opencl_12.3" | |
Start-Process -FilePath $outputPath -ArgumentList $argument -Wait -NoNewWindow | |
dir "C:/Program Files/NVIDIA GPU Computing Toolkit" -s | |
Add-Content $env:GITHUB_PATH "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3" | |
- name: 'ποΈ Configure CMake' | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DQT_DIR=${{env.Qt5_DIR}} | |
- name: 'π οΈ Build' | |
# Build your program with the given configuration | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 4 | |
- name: 'β¬οΈ Upload Exe File' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: exeArtifact | |
path: "build/Release/" | |
#- name: Install AutoIt | |
# run: choco install autoit -y | |
# | |
#- name: Run AutoIt Script | |
# run: C:\\Progra~2\\AutoIt3\\AutoIt3.exe .github\workflows\run_and_screenshot.au3 | |
# | |
#- name: Upload screenshot as artifact | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: screenshot | |
# path: "screenshot.png" | |
ReleaseArtifact: | |
name: 'π Release Project' | |
runs-on: windows-latest | |
needs: BuildForWindows | |
steps: | |
- name: 'β¬οΈ Download exe' | |
uses: actions/download-artifact@v3 | |
with: | |
name: exeArtifact | |
- name: 'π Output Current Files' | |
run: ls -R | |
- name: 'ποΈ Create Zip' | |
uses: thedoctor0/zip-release@0.7.1 | |
with: | |
type: 'zip' | |
filename: 'ProMaIDeS.zip' | |
- name: 'π·οΈ Add binaries to Release Tag' | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
tag: Continuous | |
file: ./ProMaIDes.zip | |
asset_name: ${{env.EXE_NAME}}-Win10-x64.zip | |
overwrite: true | |
prerelease: false | |
body: "Generated Automatically by Github Actions" |