Skip to content

Merge xmrig-proxy v6.22.0 into master #40

Merge xmrig-proxy v6.22.0 into master

Merge xmrig-proxy v6.22.0 into master #40

Workflow file for this run

on:
push:
tags:
- 'v*'
name: Create release and build artifacts
jobs:
build_win:
name: Build Windows artifacts
runs-on: windows-2019
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Checkout deps
run: git clone https://github.com/xmrig/xmrig-deps.git
- name: Build project on Windows
run: |
cmake . -G "Visual Studio 16 2019" -DXMRIG_DEPS=xmrig-deps\msvc2019\x64
cd "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin"
.\MSBuild.exe /p:Configuration=Release $Env:GITHUB_WORKSPACE\xmrig-proxy.sln
cd $Env:GITHUB_WORKSPACE
copy Release\xmrig-proxy.exe .
copy src\config.json .
7z a -tzip -mx windows_build.zip xmrig-proxy.exe config.json
- name: Upload Windows build artifacts
uses: actions/upload-artifact@v1
with:
name: windows_build
path: windows_build.zip
build_lin:
name: Build Ubuntu artifacts
runs-on: ubuntu-22.04
steps:
- name: Prepare Ubuntu tools
run: |
sudo apt-get install -y git build-essential cmake libuv1-dev libssl-dev
- name: Checkout code
uses: actions/checkout@master
- name: Build project on Ubuntu
run: |
cmake .
make -j$(nproc)
cp src/config.json .
tar cfz ubuntu_build.tar.gz xmrig-proxy config.json
- name: Upload Ubuntu build artifacts
uses: actions/upload-artifact@v1
with:
name: ubuntu_build
path: ubuntu_build.tar.gz
build_macos:
name: Build MacOS artifacts
runs-on: macos-latest
steps:
- name: Prepare MacOS tools
run: |
brew install cmake libuv openssl
- name: Checkout code
uses: actions/checkout@master
- name: Build project on MacOS
run: |
cmake . -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl
make -j$(sysctl -n hw.logicalcpu)
cp src/config.json .
tar cfz macos_build.tar.gz xmrig-proxy config.json
- name: Upload MacOS build artifacts
uses: actions/upload-artifact@v1
with:
name: macos_build
path: macos_build.tar.gz
build_lin_ub12:
name: Build Ubuntu 12.04 artifacts
runs-on: ubuntu-latest
container: ubuntu:12.04
steps:
- name: Prepare build tools
run: |
sed -i -r 's/(archive|security).ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
apt-get update
apt-get install -y python-software-properties
add-apt-repository -y ppa:ubuntu-toolchain-r/test
apt-get update
apt-get install -y git build-essential automake libtool autoconf wget libgmp-dev libmpfr-dev texinfo bison flex gcc-9 g++-9 curl
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9
curl -sSL https://cmake.org/files/v3.27/cmake-3.27.9-linux-x86_64.tar.gz | tar -xzC /opt
git clone --depth 1 git://sourceware.org/git/binutils-gdb.git /tmp/binutils-gdb
(cd /tmp/binutils-gdb && git checkout binutils-2_38 && CC=gcc ./configure && make -j$(nproc) && make install)
- name: Checkout code
run: |
git clone https://github.com/MoneroOcean/xmrig-proxy.git .
git checkout $GITHUB_REF_NAME
- name: Build project on Ubuntu 12.04
run: |
cd scripts && ./build_deps.sh && cd ..
/opt/cmake-3.27.9-linux-x86_64/bin/cmake . -DXMRIG_DEPS=scripts/deps
make -j$(nproc)
cp src/config.json .
tar cfz ubuntu12_build.tar.gz xmrig-proxy config.json
- name: Upload Ubuntu 12.04 build artifacts
uses: actions/upload-artifact@v1
with:
name: ubuntu12_build
path: ubuntu12_build.tar.gz
deploy:
needs: [build_win, build_lin, build_macos, build_lin_ub12]
name: Create release and upload artifacts
runs-on: ubuntu-latest
steps:
- name: Create Release
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Set version
id: version
run: echo ::set-output name=VERSION::$GITHUB_REF_NAME
- name: Download Windows build artifacts
uses: actions/download-artifact@v1
with:
name: windows_build
- name: Download Ubuntu build artifacts
uses: actions/download-artifact@v1
with:
name: ubuntu_build
- name: Download MacOS build artifacts
uses: actions/download-artifact@v1
with:
name: macos_build
- name: Download Ubuntu 12.04 build artifacts
uses: actions/download-artifact@v1
with:
name: ubuntu12_build
- name: Upload Windows build release asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: windows_build/windows_build.zip
asset_name: xmrig-proxy-${{steps.version.outputs.VERSION}}-win64.zip
asset_content_type: application/zip
- name: Upload Ubuntu build release asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ubuntu_build/ubuntu_build.tar.gz
asset_name: xmrig-proxy-${{steps.version.outputs.VERSION}}-lin64.tar.gz
asset_content_type: application/zip
- name: Upload MacOS build release asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: macos_build/macos_build.tar.gz
asset_name: xmrig-proxy-${{steps.version.outputs.VERSION}}-mac64.tar.gz
asset_content_type: application/zip
- name: Upload Ubuntu 12.04 build release asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ubuntu12_build/ubuntu12_build.tar.gz
asset_name: xmrig-proxy-${{steps.version.outputs.VERSION}}-lin64-compat.tar.gz
asset_content_type: application/zip