-
Notifications
You must be signed in to change notification settings - Fork 5
135 lines (119 loc) · 4.07 KB
/
test-win.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
name: Windows Builds
on: [push, pull_request]
jobs:
TestCWindows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.7
uses: actions/setup-python@v4
with:
python-version: 3.7
- name: Install dependencies
run: |
choco install -y wget
mkdir deps
cd deps
mkdir fftw3
cd fftw3
wget https://fftw.org/pub/fftw/fftw-3.3.5-dll64.zip -q -O fftw.zip
7z x -y fftw.zip
ls
rm fftw.zip
cd ..\..
ls deps
ls deps\fftw3
pwd
echo $GITHUB_WORKSPACE
echo $GITHUB_ACTION_PATH
- name: Setup FFTW
shell: cmd
run: |
cd deps\fftw3
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
lib /def:libfftw3-3.def
lib /def:libfftw3f-3.def
lib /def:libfftw3l-3.def
cd ..\..
dir deps\fftw3
echo "GITHUB_WORKSPACE: $env:GITHUB_WORKSPACE"
- name: Build and test
run: |
"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
cmake . -DFFTW_INCLUDE_DIRS="deps\fftw3" -DFFTW_LIBRARIES="$env:GITHUB_WORKSPACE\deps\fftw3\libfftw3-3.lib" -DPython3_EXECUTABLE:FILEPATH=$(python -c "import os, sys; print(os.path.dirname(sys.executable) + '\python.exe')") -DPYTHON_BINDINGS=ON -DBUILD_TESTS_EXAMPLES=ON -G "Visual Studio 17 2022" -A x64
cmake --build . --config Release
cp deps\fftw3\* tests\Release\
cp src\Release\* tests\Release\
cp bindings\c\src\Release\* tests\Release\
ctest -V -C Release
- name: Archive generated DLLs
uses: actions/upload-artifact@v4
with:
name: DLLs
path: src\Release\
BuildWindowsInstaller:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.7
uses: actions/setup-python@v4
with:
python-version: 3.7
- name: Install dependencies
run: |
choco install -y wget
mkdir deps
cd deps
mkdir fftw3
cd fftw3
wget https://fftw.org/pub/fftw/fftw-3.3.5-dll64.zip -q -O fftw.zip
7z x -y fftw.zip
ls
rm fftw.zip
cd ..\..
ls deps
ls deps\fftw3
pwd
echo $GITHUB_WORKSPACE
echo $GITHUB_ACTION_PATH
- name: Setup FFTW
shell: cmd
run: |
cd deps\fftw3
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
lib /def:libfftw3-3.def
lib /def:libfftw3f-3.def
lib /def:libfftw3l-3.def
cd ..\..
dir deps\fftw3
echo "GITHUB_WORKSPACE: $env:GITHUB_WORKSPACE"
- name: Build library
run: |
"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
cmake . -DFFTW_INCLUDE_DIRS="deps\fftw3" -DFFTW_LIBRARIES="$env:GITHUB_WORKSPACE\deps\fftw3\libfftw3-3.lib" -G "Visual Studio 17 2022" -A x64
cmake --build . --config Release
- name: Build installer
run: |
"%programfiles(x86)%\Inno Setup 6\iscc.exe" "libgenalyzer.iss"
dir
dir C:\
shell: cmd
- name: Archive Windows exe installer
uses: actions/upload-artifact@v4
with:
name: EXE-Installer
path: C:\genalyzer-setup.exe
- name: Download artifact installer
uses: actions/download-artifact@v4
with:
name: EXE-Installer
path: win_build
- name: Post development build to GH releases page
uses: "marvinpinto/action-automatic-releases@latest"
if: github.ref == 'refs/heads/main'
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Latest Development Build"
files: win_build