diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d7d83b9..5cc9812 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,9 +10,8 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout XMRig code - uses: actions/checkout@v4 - with: - repository: https://github.com/xmrig/xmrig@master + run: | + git clone https://github.com/xmrig/xmrig.git - name: Install dependencies run: | @@ -21,6 +20,7 @@ jobs: - name: Disable the XMRig donate function run: | + cd xmrig 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 @@ -31,22 +31,25 @@ jobs: - name: Build library dependencies run: | + cd xmrig cd scripts && ./build_deps.sh - name: Build XMRig binary run: | + cd xmrig 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 xmrig cd build strip xmrig upx xmrig - name: Archive artifacts - uses: actions/upload-artifact@v3 + uses: christopherhx/gitea-upload-artifact@v4 with: name: xmrig-linux-static-x64 - path: build/xmrig + path: xmrig/build/xmrig