Skip to content

Merge pull request #3 from alaamroue/master #4

Merge pull request #3 from alaamroue/master

Merge pull request #3 from alaamroue/master #4

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"