Update .gitea/workflows/build-xmrig-arm64.yaml
All checks were successful
Build XMRig ARM64 / qemu (push) Successful in 19s

This commit is contained in:
Liam Chan 2024-09-05 14:03:20 -04:00
parent 9a529cf19b
commit 74a55b467d
2 changed files with 21 additions and 64 deletions

View File

@ -0,0 +1,21 @@
name: Build XMRig ARM64
on:
push:
branches:
- arm64
jobs:
qemu:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: linux/arm64
- name: Run Command
run: |
apt-get update
apt-get install -y neofetch
neofetch

View File

@ -1,64 +0,0 @@
name: Build XMRig
on:
push:
branches:
- main
workflow_dispatch:
schedule:
- cron: 0 15 * * 3
jobs:
linux-amd64:
runs-on: ubuntu-latest
container: alpine:3.20
steps:
- name: Install dependencies
run: |
apk add git make cmake libstdc++ gcc g++ automake libtool autoconf linux-headers upx nodejs
- name: Fetch sources
run: |
git clone https://github.com/xmrig/xmrig.git
- name: Build static libraries
run: |
cd xmrig/scripts && ./build_deps.sh
- name: Set config
env:
WALLET_ADDRESS: ${{ secrets.WALLET_ADDRESS }}
run: |
cd xmrig/src
# donate
sed -i "s/DonateLevel = 1/DonateLevel = 0/g" donate.h
sed -i "s/\"donate-level\": 1/\"donate-level\": 0/g" core/config/Config_default.h
sed -i "s/\"donate-over-proxy\": 1/\"donate-over-proxy\": 0/g" core/config/Config_default.h
# randomx
sed -i "s/\"mode\": \"auto\"/\"mode\": \"fast\"/g" core/config/Config_default.h
sed -i "s/\"1gb-pages\": false/\"1gb-pages\": true/g" core/config/Config_default.h
# pools
sed -i "s/donate.v2.xmrig.com:3333/pool.supportxmr.com:443/g" core/config/Config_default.h
sed -i "s/YOUR_WALLET_ADDRESS/$WALLET_ADDRESS/g" core/config/Config_default.h
sed -i "s/\"keepalive\": false/\"keepalive\": true/g" core/config/Config_default.h
sed -i "s/\"tls\":\ false/\"tls\":\ true/g" core/config/Config_default.h
- name: Build binary
run: |
mkdir -p xmrig/build && cd xmrig/build
cmake .. -DXMRIG_DEPS=scripts/deps -DBUILD_STATIC=ON -DWITH_EMBEDDED_CONFIG=ON
make -j$(nproc)
- name: Compress executables
run: |
cd xmrig/build
strip xmrig
upx xmrig
- name: Upload artifacts
#uses: actions/upload-artifact@v4
# Gitea Actions
uses: christopherhx/gitea-upload-artifact@v4
with:
name: xmrig-linux-amd64
path: xmrig/build/xmrig