Update .github/workflows/build.yml
All checks were successful
Build XMRig / xmrig-linux-static-x64 (push) Successful in 5m11s

This commit is contained in:
Liam Chan 2024-12-17 03:02:16 -05:00
parent ef5b42aaf3
commit 3908dad97a

View File

@ -10,9 +10,8 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout XMRig code - name: Checkout XMRig code
uses: actions/checkout@v4 run: |
with: git clone https://github.com/xmrig/xmrig.git
repository: https://github.com/xmrig/xmrig@master
- name: Install dependencies - name: Install dependencies
run: | run: |
@ -21,6 +20,7 @@ jobs:
- name: Disable the XMRig donate function - name: Disable the XMRig donate function
run: | run: |
cd xmrig
sed -i 's/DonateLevel\ =\ 1/DonateLevel\ =\ 0/g' src/donate.h 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-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-over-proxy":\ 1/"donate-over-proxy":\ 0/g' src/core/config/Config_default.h
@ -31,22 +31,25 @@ jobs:
- name: Build library dependencies - name: Build library dependencies
run: | run: |
cd xmrig
cd scripts && ./build_deps.sh cd scripts && ./build_deps.sh
- name: Build XMRig binary - name: Build XMRig binary
run: | run: |
cd xmrig
mkdir build && cd build mkdir build && cd build
cmake .. -DXMRIG_DEPS=scripts/deps -DBUILD_STATIC=ON -DWITH_EMBEDDED_CONFIG=ON cmake .. -DXMRIG_DEPS=scripts/deps -DBUILD_STATIC=ON -DWITH_EMBEDDED_CONFIG=ON
make -j$(nproc) make -j$(nproc)
- name: Compress executable files - name: Compress executable files
run: | run: |
cd xmrig
cd build cd build
strip xmrig strip xmrig
upx xmrig upx xmrig
- name: Archive artifacts - name: Archive artifacts
uses: actions/upload-artifact@v3 uses: christopherhx/gitea-upload-artifact@v4
with: with:
name: xmrig-linux-static-x64 name: xmrig-linux-static-x64
path: build/xmrig path: xmrig/build/xmrig