Add demo script for running riCOM in CLI with python #284
This file contains hidden or 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
| # Copyright (C) 2021 Thomas Friedrich, Chu-Ping Yu, | |
| # University of Antwerp - All Rights Reserved. | |
| # You may use, distribute and modify | |
| # this code under the terms of the GPL3 license. | |
| # You should have received a copy of the GPL3 license with | |
| # this file. If not, please visit: | |
| # https://www.gnu.org/licenses/gpl-3.0.en.html | |
| # Authors: | |
| # Thomas Friedrich <thomas.friedrich@uantwerpen.be> | |
| # Chu-Ping Yu <chu-ping.yu@uantwerpen.be> | |
| name: Compile | |
| on: [push, pull_request, workflow_dispatch] | |
| jobs: | |
| build_win: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| submodules: true | |
| - uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: amd64_x86 | |
| - name: get sdl, fftw | |
| shell: powershell | |
| run: | | |
| # Download SDL2 and SDL2_image and extract using PowerShell (follows redirects and supports ZIP) | |
| Invoke-WebRequest -Uri "https://www.libsdl.org/release/SDL2-devel-2.0.16-VC.zip" -OutFile sdl.zip -UseBasicParsing | |
| Invoke-WebRequest -Uri "https://www.libsdl.org/projects/SDL_image/release/SDL2_image-devel-2.0.5-VC.zip" -OutFile sdl_im.zip -UseBasicParsing | |
| Expand-Archive -LiteralPath sdl.zip -DestinationPath . | |
| Expand-Archive -LiteralPath sdl_im.zip -DestinationPath . | |
| Rename-Item SDL2_image-2.0.5 SDL2_IM_VC | |
| Rename-Item SDL2-2.0.16 SDL2_VC | |
| Move-Item .\SDL2_IM_VC\include\* .\SDL2_VC\include\ | |
| Move-Item .\SDL2_IM_VC\lib\x64\* .\SDL2_VC\lib\x64\ | |
| Move-Item .\SDL2_IM_VC\lib\x86\* .\SDL2_VC\lib\x86\ | |
| Move-Item SDL2_VC C:\ | |
| Remove-Item sdl.zip, sdl_im.zip -Force | |
| # FFTW | |
| New-Item -ItemType Directory FFTW -Force | Out-Null | |
| Push-Location FFTW | |
| Invoke-WebRequest -Uri "https://fftw.org/pub/fftw/fftw-3.3.5-dll64.zip" -OutFile fftw.zip -UseBasicParsing | |
| Expand-Archive -LiteralPath fftw.zip -DestinationPath . | |
| Remove-Item fftw.zip -Force | |
| lib /machine:x64 /def:libfftw3f-3.def | |
| Pop-Location | |
| Move-Item FFTW C:\ | |
| - name: Build with MSVC | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake .. | |
| msbuild .\RICOM.vcxproj /p:configuration=Release | |
| - name: Archive production artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Release_Win | |
| path: | | |
| build\Release | |
| build_Linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| submodules: true | |
| - name: Get SDL2, fftw3 and gcc-11 | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install libsdl2-dev libsdl2-image-dev libfftw3-dev gcc-11 g++-11 | |
| - name: Build | |
| env: | |
| CC: gcc-11 | |
| CXX: g++-11 | |
| run: | | |
| cmake . -D CMAKE_BUILD_TYPE=Release | |
| make | |
| - name: Archive production artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Release_Linux | |
| path: | | |
| RICOM |