forked from primesearch/mfakto
-
Notifications
You must be signed in to change notification settings - Fork 0
180 lines (175 loc) · 5.65 KB
/
ci.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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
name: mfakto CI
on:
push:
pull_request:
jobs:
Linux:
name: Linux
runs-on: ubuntu-24.04
env:
CC: gcc
CPP: g++
steps:
- uses: actions/checkout@v4
- name: Setup
run: |
sudo apt-get install -y ocl-icd-opencl-dev pocl-opencl-icd
- name: Build
run: |
make -C src -O -j "$(nproc)" CC=${CC} CPP=${CPP}
- name: Test
run: |
./mfakto -d 11
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: mfakto-linux64
path: |
*.cl
Changelog-mfakto.txt
COPYING
datatypes.h
mfakto
mfakto.ini
README-SpecialVersions.txt
README.txt
tf_debug.h
todo.txt
- name: Create artifact and release asset
if: startsWith(github.ref, 'refs/tags/')
run: |
tar cvjf mfakto-linux64.tar.bz2 *.cl Changelog-mfakto.txt COPYING datatypes.h mfakto mfakto.ini README-SpecialVersions.txt README.txt tf_debug.h todo.txt
- name: Upload release assets on release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
mfakto-linux64.tar.bz2
WindowsMSVC:
name: Windows MSVC
runs-on: windows-2022
env:
OCL_ROOT: "OpenCL-SDK-v2024.05.08-Win-x64"
OCL_URL: https://github.com/KhronosGroup/OpenCL-SDK/releases/download/v2024.05.08/OpenCL-SDK-v2024.05.08-Win-x64.zip
steps:
- uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1
- name: Setup
run: |
Invoke-WebRequest $env:OCL_URL -OutFile OpenCL-SDK.zip
unzip OpenCL-SDK.zip
mkdir $env:OCL_ROOT\lib\x86_64
cp $env:OCL_ROOT\lib\*.lib $env:OCL_ROOT\lib\x86_64
- name: Build
run: |
msbuild mfaktoVS12.vcxproj /property:OCL_ROOT="$env:OCL_ROOT" /property:Configuration=Release
- name: Create artifact and release asset
run: |
Copy-Item -Path Changelog-mfakto.txt, COPYING, README-SpecialVersions.txt, README.txt, todo.txt, src/mfakto.ini -Destination x64/Release/
Compress-Archive -DestinationPath mfakto-windows-msvc.zip -CompressionLevel Optimal -Path x64/Release/*
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: mfakto-windows-msvc
path: x64/Release/
- name: Upload release asset on release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
mfakto-windows-msvc.zip
WindowsMSYS2:
name: Windows MSYS2
runs-on: windows-2022
env:
CC: gcc
CPP: g++
steps:
- uses: actions/checkout@v4
- name: Path Setup
run: |
echo "C:\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "C:\msys64\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Setup
run: |
pacman -S --needed --noconfirm mingw-w64-x86_64-opencl-icd mingw-w64-x86_64-opencl-headers
- name: Build
run: |
make -C src -O -j $env:NUMBER_OF_PROCESSORS CC=$env:CC CPP=$env:CPP AMD_APP_INCLUDE="-IC:\msys64\mingw64\include" AMD_APP_LIB="-LC:\msys64\mingw64\lib"
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: mfakto-windows-msys2
path: |
*.cl
Changelog-mfakto.txt
COPYING
datatypes.h
mfakto.exe
mfakto.ini
README-SpecialVersions.txt
README.txt
tf_debug.h
todo.txt
- name: Create artifact and release asset
if: startsWith(github.ref, 'refs/tags/')
run: |
Compress-Archive -DestinationPath mfakto-windows-msys2.zip -CompressionLevel Optimal -Path *.cl, Changelog-mfakto.txt, COPYING, datatypes.h, mfakto.exe, mfakto.ini, README-SpecialVersions.txt, README.txt, tf_debug.h, todo.txt
- name: Upload release assets on release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
mfakto-windows-msys2.zip
MacOS:
name: MacOS
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-13, macos-14]
fail-fast: false
env:
CC: clang
CPP: clang++
steps:
- uses: actions/checkout@v4
- name: Setup
run: |
brew install pocl
- name: Build GitHub development version
run: |
make -C src -j "$(sysctl -n hw.ncpu)" CC=${CC} CPP=${CPP} AMD_APP_INCLUDE="$(pkg-config --cflags pocl)" AMD_APP_LIB="$(pkg-config --libs pocl)"
- name: Test
run: |
./mfakto -d 11
- name: Cleanup build for user artifact
run: |
make -C src clean
- name: Build user artifact without pocl dependency
run: |
make -C src -j "$(sysctl -n hw.ncpu)" CC=${CC} CPP=${CPP}"
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: mfakto-${{ matrix.os }}
path: |
*.cl
Changelog-mfakto.txt
COPYING
datatypes.h
mfakto
mfakto.ini
README-SpecialVersions.txt
README.txt
tf_debug.h
todo.txt
- name: Create artifact and release asset
if: startsWith(github.ref, 'refs/tags/')
run: |
tar cvjf mfakto-${{ matrix.os }}.tar.bz2 *.cl Changelog-mfakto.txt COPYING datatypes.h mfakto mfakto.ini README-SpecialVersions.txt README.txt tf_debug.h todo.txt
- name: Upload release assets on release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
mfakto-${{ matrix.os }}.tar.bz2