22
22
copy bin\WinRing0\WinRing0x64.sys .
23
23
7z a -tzip -mx windows_build.zip xmrig.exe config.json WinRing0x64.sys
24
24
- name : Upload Windows build artifacts
25
- uses : actions/upload-artifact@v1
25
+ uses : actions/upload-artifact@v4
26
26
with :
27
27
name : windows_build
28
28
path : windows_build.zip
44
44
cp src/config.json .
45
45
tar cfz ubuntu_build.tar.gz xmrig config.json
46
46
- name : Upload Ubuntu build artifacts
47
- uses : actions/upload-artifact@v1
47
+ uses : actions/upload-artifact@v4
48
48
with :
49
49
name : ubuntu_build
50
50
path : ubuntu_build.tar.gz
73
73
cp src/config.json .
74
74
tar cfz macos_build.tar.gz xmrig config.json
75
75
- name : Upload MacOS build artifacts
76
- uses : actions/upload-artifact@v1
76
+ uses : actions/upload-artifact@v4
77
77
with :
78
78
name : macos_build
79
79
path : macos_build.tar.gz
@@ -102,18 +102,20 @@ jobs:
102
102
cp src/config.json .
103
103
tar cfz macos_build_intel.tar.gz xmrig config.json
104
104
- name : Upload MacOS build artifacts
105
- uses : actions/upload-artifact@v1
105
+ uses : actions/upload-artifact@v4
106
106
with :
107
107
name : macos_build_intel
108
108
path : macos_build_intel.tar.gz
109
109
110
110
build_lin_ub12 :
111
111
name : Build Ubuntu 12.04 artifacts
112
112
runs-on : ubuntu-latest
113
- container : ubuntu:12.04
114
113
steps :
115
- - name : Prepare build tools
114
+ - name : Run build inside docker
116
115
run : |
116
+ mkdir /tmp/docker
117
+ cat >/tmp/docker/script.sh <<EOF
118
+ set -x
117
119
sed -i -r 's/(archive|security).ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
118
120
apt-get update
119
121
apt-get install -y python-software-properties
@@ -124,22 +126,24 @@ jobs:
124
126
curl -sSL https://cmake.org/files/v3.27/cmake-3.27.9-linux-x86_64.tar.gz | tar -xzC /opt
125
127
git clone --depth 1 git://sourceware.org/git/binutils-gdb.git /tmp/binutils-gdb
126
128
(cd /tmp/binutils-gdb && git checkout binutils-2_38 && CC=gcc ./configure && make -j$(nproc) && make install)
127
- - name : Checkout code
128
- run : |
129
- git clone https://github.com/C3Pool/ xmrig-C3.git .
129
+
130
+ git clone https://github.com/C3Pool/xmrig-C3.git
131
+ cd xmrig
130
132
git checkout $GITHUB_REF_NAME
131
- - name : Build project on Ubuntu 12.04
132
- run : |
133
- cd scripts && ./build_deps.sh && cd ..
133
+
134
+ (cd scripts && ./build_deps.sh && cd ..)
134
135
/opt/cmake-3.27.9-linux-x86_64/bin/cmake . -DXMRIG_DEPS=scripts/deps
135
136
make -j$(nproc)
136
137
cp src/config.json .
137
- tar cfz ubuntu12_build.tar.gz xmrig config.json
138
+ tar cfz /tmp/docker/ubuntu12_build.tar.gz xmrig config.json
139
+ EOF
140
+ chmod +x /tmp/docker/script.sh
141
+ docker run -i -v /tmp/docker:/tmp/docker ubuntu:12.04 /bin/bash -c /tmp/docker/script.sh
138
142
- name : Upload Ubuntu 12.04 build artifacts
139
- uses : actions/upload-artifact@v1
143
+ uses : actions/upload-artifact@v4
140
144
with :
141
145
name : ubuntu12_build
142
- path : ubuntu12_build.tar.gz
146
+ path : /tmp/docker/ ubuntu12_build.tar.gz
143
147
144
148
deploy :
145
149
needs : [build_win, build_lin, build_macos, build_macos_intel, build_lin_ub12]
@@ -160,23 +164,23 @@ jobs:
160
164
id : version
161
165
run : echo ::set-output name=VERSION::$GITHUB_REF_NAME
162
166
- name : Download Windows build artifacts
163
- uses : actions/download-artifact@v1
167
+ uses : actions/download-artifact@v4
164
168
with :
165
169
name : windows_build
166
170
- name : Download Ubuntu build artifacts
167
- uses : actions/download-artifact@v1
171
+ uses : actions/download-artifact@v4
168
172
with :
169
173
name : ubuntu_build
170
174
- name : Download MacOS build artifacts
171
- uses : actions/download-artifact@v1
175
+ uses : actions/download-artifact@v4
172
176
with :
173
177
name : macos_build
174
178
- name : Download MacOS (Intel) build artifacts
175
- uses : actions/download-artifact@v1
179
+ uses : actions/download-artifact@v4
176
180
with :
177
181
name : macos_build_intel
178
182
- name : Download Ubuntu 12.04 build artifacts
179
- uses : actions/download-artifact@v1
183
+ uses : actions/download-artifact@v4
180
184
with :
181
185
name : ubuntu12_build
182
186
- name : Upload Windows build release asset
@@ -185,7 +189,7 @@ jobs:
185
189
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
186
190
with :
187
191
upload_url : ${{ steps.create_release.outputs.upload_url }}
188
- asset_path : windows_build/windows_build .zip
192
+ asset_path : windows_build.zip
189
193
asset_name : xmrig-${{steps.version.outputs.VERSION}}-win64.zip
190
194
asset_content_type : application/zip
191
195
- name : Upload Ubuntu build release asset
@@ -194,7 +198,7 @@ jobs:
194
198
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
195
199
with :
196
200
upload_url : ${{ steps.create_release.outputs.upload_url }}
197
- asset_path : ubuntu_build/ubuntu_build .tar.gz
201
+ asset_path : ubuntu_build.tar.gz
198
202
asset_name : xmrig-${{steps.version.outputs.VERSION}}-lin64.tar.gz
199
203
asset_content_type : application/zip
200
204
- name : Upload MacOS build release asset
@@ -203,7 +207,7 @@ jobs:
203
207
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
204
208
with :
205
209
upload_url : ${{ steps.create_release.outputs.upload_url }}
206
- asset_path : macos_build/macos_build .tar.gz
210
+ asset_path : macos_build.tar.gz
207
211
asset_name : xmrig-${{steps.version.outputs.VERSION}}-mac64.tar.gz
208
212
asset_content_type : application/zip
209
213
- name : Upload MacOS (Intel) build release asset
@@ -212,7 +216,7 @@ jobs:
212
216
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
213
217
with :
214
218
upload_url : ${{ steps.create_release.outputs.upload_url }}
215
- asset_path : macos_build_intel/macos_build_intel .tar.gz
219
+ asset_path : macos_build_intel.tar.gz
216
220
asset_name : xmrig-${{steps.version.outputs.VERSION}}-mac-intel.tar.gz
217
221
asset_content_type : application/zip
218
222
- name : Upload Ubuntu 12.04 build release asset
@@ -221,17 +225,17 @@ jobs:
221
225
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
222
226
with :
223
227
upload_url : ${{ steps.create_release.outputs.upload_url }}
224
- asset_path : ubuntu12_build/ubuntu12_build .tar.gz
228
+ asset_path : ubuntu12_build.tar.gz
225
229
asset_name : xmrig-${{steps.version.outputs.VERSION}}-lin64-compat.tar.gz
226
230
asset_content_type : application/zip
227
231
- name : Update xmrig_setup repo
228
232
run : |
229
233
git clone https://$GITHUB_ACTOR:${{secrets.xmrig_setup_key}}@github.com/C3Pool/xmrig_setup.git
230
234
cd xmrig_setup
231
235
git config user.name C3Pool
232
- git config user.email support@C3Pool .com
233
- cp ../ubuntu12_build/ubuntu12_build .tar.gz xmrig.tar.gz
234
- cp ../windows_build/windows_build .zip xmrig.zip
236
+ git config user.email hkfoan@gmail .com
237
+ cp ../ubuntu12_build.tar.gz xmrig.tar.gz
238
+ cp ../windows_build.zip xmrig.zip
235
239
unzip xmrig.zip
236
240
zip -u offline_miner_setup.zip xmrig.exe config.json WinRing0x64.sys
237
241
git commit -m "xmrig "$GITHUB_REF_NAME" based release" xmrig.tar.gz xmrig.zip offline_miner_setup.zip
@@ -242,13 +246,13 @@ jobs:
242
246
git clone https://$GITHUB_ACTOR:${{secrets.xmrig_setup_key}}@github.com/C3Pool/hiveos.git
243
247
cd hiveos
244
248
git config user.name C3Pool
245
- git config user.email support@C3Pool .com
246
- tar xf ../ubuntu12_build/ubuntu12_build .tar.gz
247
- mv xmrig mo_xmrig /xmrig
248
- mv config.json mo_xmrig /config_global.json
249
+ git config user.email hkfoan@gmail .com
250
+ tar xf ../ubuntu12_build.tar.gz
251
+ mv xmrig c3_xmrig /xmrig
252
+ mv config.json c3_xmrig /config_global.json
249
253
export VER=$GITHUB_REF_NAME
250
254
export VER=${VER//-/_}
251
- tar -zcvf mo_xmrig -$VER.tar.gz mo_xmrig
252
- git add mo_xmrig -$VER.tar.gz mo_xmrig /xmrig mo_xmrig /config_global.json
253
- git commit -m "xmrig "$GITHUB_REF_NAME" based release" mo_xmrig -$VER.tar.gz
255
+ tar -zcvf c3_xmrig -$VER.tar.gz c3_xmrig
256
+ git add c3_xmrig -$VER.tar.gz c3_xmrig /xmrig c3_xmrig /config_global.json
257
+ git commit -m "xmrig "$GITHUB_REF_NAME" based release" c3_xmrig -$VER.tar.gz
254
258
git push
0 commit comments