-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (81 loc) · 2.97 KB
/
build.yml
File metadata and controls
89 lines (81 loc) · 2.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# 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