mirror of
https://github.com/Maks1mS/xmrig-zero-donation.git
synced 2024-12-23 16:02:58 +03:00
init
This commit is contained in:
commit
27de973a4b
138
.github/workflows/build.yml
vendored
Normal file
138
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,138 @@
|
||||
name: Build
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
paths:
|
||||
- 'xmrig'
|
||||
- 'patches/**'
|
||||
|
||||
jobs:
|
||||
build-static:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: jirutka/setup-alpine@v1
|
||||
with:
|
||||
branch: v3.15
|
||||
packages: >
|
||||
git
|
||||
make
|
||||
cmake
|
||||
libstdc++
|
||||
gcc
|
||||
g++
|
||||
automake
|
||||
libtool
|
||||
autoconf
|
||||
linux-headers
|
||||
|
||||
- name: Apply patches
|
||||
working-directory: xmrig
|
||||
run: |
|
||||
git apply < ../patches/*.patch
|
||||
|
||||
- name: Build
|
||||
working-directory: xmrig
|
||||
run: |
|
||||
mkdir build
|
||||
cd scripts && ./build_deps.sh && cd ../build
|
||||
cmake .. -DXMRIG_DEPS=scripts/deps -DBUILD_STATIC=ON
|
||||
make -j$(nproc)
|
||||
shell: alpine.sh {0}
|
||||
|
||||
- name: Verify
|
||||
working-directory: xmrig
|
||||
run: |
|
||||
chmod +x build/xmrig && build/xmrig --version
|
||||
|
||||
- name: Archive production artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: build-static
|
||||
path: |
|
||||
xmrig/build/xmrig
|
||||
|
||||
- name: Check xmrig tag
|
||||
id: xmrig_tag_result
|
||||
working-directory: xmrig
|
||||
run: echo "XMRIG_TAG=$(git tag --points-at HEAD)" >> $GITHUB_OUTPUT
|
||||
|
||||
outputs:
|
||||
xmrig_tag: ${{ steps.xmrig_tag_result.outputs.xmrig_tag }}
|
||||
|
||||
release-nightly:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build-static
|
||||
steps:
|
||||
- name: Download Artifact
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: build-static
|
||||
path: /tmp/artifact
|
||||
|
||||
- name: "Copy files (Nightly)"
|
||||
run: |
|
||||
mkdir /tmp/xmrig-nightly
|
||||
cp -r /tmp/artifact/* /tmp/xmrig-nightly
|
||||
|
||||
- name: "Tar (Nightly)"
|
||||
uses: a7ul/tar-action@v1.1.0
|
||||
with:
|
||||
command: c
|
||||
cwd: /tmp
|
||||
files: |
|
||||
xmrig-nightly
|
||||
outPath: xmrig-nightly.tar.gz
|
||||
|
||||
- name: Release (Nightly)
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
prerelease: true
|
||||
tag_name: "nightly"
|
||||
files: |
|
||||
./xmrig-nightly.tar.gz
|
||||
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build-static
|
||||
if: startsWith(needs.build-static.outputs.xmrig_tag, 'v')
|
||||
steps:
|
||||
- name: "Set version env"
|
||||
run: |
|
||||
VERSION=${{ needs.build-static.outputs.xmrig_tag }}
|
||||
echo "VERSION=${VERSION}" >> $GITHUB_ENV
|
||||
echo "VER=${VERSION:1}" >> $GITHUB_ENV
|
||||
|
||||
- name: Download Artifact
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: build-static
|
||||
path: /tmp/artifact
|
||||
|
||||
- name: "Copy files"
|
||||
run: |
|
||||
mkdir /tmp/xmrig-${{env.VER}}
|
||||
cp -r /tmp/artifact/* /tmp/xmrig-${{env.VER}}
|
||||
|
||||
- name: "Tar"
|
||||
uses: a7ul/tar-action@v1.1.0
|
||||
with:
|
||||
command: c
|
||||
cwd: /tmp
|
||||
files: |
|
||||
xmrig-${{env.VER}}
|
||||
outPath: xmrig-${{env.VER}}.tar.gz
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
tag_name: ${{env.VERSION}}
|
||||
files: |
|
||||
./xmrig-${{env.VER}}.tar.gz
|
24
.github/workflows/update-upstream.yml
vendored
Normal file
24
.github/workflows/update-upstream.yml
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
name: Update module
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
jobs:
|
||||
update:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Update module
|
||||
run: |
|
||||
git submodule update --init --recursive --checkout -f --remote
|
||||
git config --global user.name "GitHub Action"
|
||||
git config --global user.email "noreply@github.com"
|
||||
git commit -am "Autoupdate xmrig" || true
|
||||
git push
|
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
[submodule "xmrig"]
|
||||
path = xmrig
|
||||
url = https://github.com/xmrig/xmrig
|
15
patches/01_disable-donate.patch
Normal file
15
patches/01_disable-donate.patch
Normal file
@ -0,0 +1,15 @@
|
||||
diff --git a/src/donate.h b/src/donate.h
|
||||
index 206b1b8f..14cdf9ea 100644
|
||||
--- a/src/donate.h
|
||||
+++ b/src/donate.h
|
||||
@@ -37,8 +37,8 @@
|
||||
* If you plan on changing donations to 0%, please consider making a one-off donation to my wallet:
|
||||
* XMR: 48edfHu7V9Z84YzzMa6fUueoELZ9ZRXq9VetWzYGzKt52XU5xvqgzYnDK9URnRoJMk1j8nLwEVsaSWJ4fhdUyZijBGUicoD
|
||||
*/
|
||||
-constexpr const int kDefaultDonateLevel = 1;
|
||||
-constexpr const int kMinimumDonateLevel = 1;
|
||||
+constexpr const int kDefaultDonateLevel = 0;
|
||||
+constexpr const int kMinimumDonateLevel = 0;
|
||||
|
||||
|
||||
#endif // XMRIG_DONATE_H
|
1
xmrig
Submodule
1
xmrig
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit c0143b90cee8c19ad603641a5006309e8f3ad27f
|
Loading…
Reference in New Issue
Block a user