-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (79 loc) · 2.49 KB
/
build.yml
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
# 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
run: |
curl.exe http://www.libsdl.org/release/SDL2-devel-2.0.16-VC.zip --output sdl.zip
curl.exe http://www.libsdl.org/projects/SDL_image/release/SDL2_image-devel-2.0.5-VC.zip --output sdl_im.zip
tar -xf sdl.zip
tar -xf sdl_im.zip
ren SDL2_image-2.0.5 SDL2_IM_VC
ren SDL2-2.0.16 SDL2_VC
move .\SDL2_IM_VC\include\* .\SDL2_VC\include\
move .\SDL2_IM_VC\lib\x64\* .\SDL2_VC\lib\x64
move .\SDL2_IM_VC\lib\x86\* .\SDL2_VC\lib\x86
move SDL2_VC C:\
del sdl.zip
del sdl_im.zip
mkdir FFTW
cd FFTW
curl.exe https://fftw.org/pub/fftw/fftw-3.3.5-dll64.zip --output fftw.zip
tar -xf fftw.zip
del fftw.zip
lib /machine:x64 /def:libfftw3f-3.def
cd ..
move 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@v2
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@v2
with:
name: Release_Linux
path: |
RICOM