Skip to content

Commit

Permalink
testing new updates for release-bin.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
xyephy authored Apr 18, 2024
1 parent bb994ed commit 760eb08
Showing 1 changed file with 96 additions and 236 deletions.
332 changes: 96 additions & 236 deletions .github/workflows/release-bin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,256 +5,116 @@
name: Release Binaries

on:
# Manually run by going to "Actions/Release" in Github and running the workflow
workflow_dispatch:

jobs:
release_pool:
runs-on: ${{ matrix.os }}
release:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-20.04, macos-latest]
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Compile Native
run: cargo build --release --locked --manifest-path=roles/pool/Cargo.toml

- name: Install aarch64-apple-darwin target
if: matrix.os == 'macos-latest'
run: rustup target add aarch64-apple-darwin

- name: Compile MacOS ARM64
if: matrix.os == 'macos-latest'
run: cargo build --release --locked --manifest-path=roles/pool/Cargo.toml --target=aarch64-apple-darwin

- name: Upload Linux x86-64 binaries to release
if: matrix.os == 'ubuntu-20.04'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.ACTION_TOKEN }}
file: roles/target/release/pool_sv2
asset_name: pool_sv2-x86_64-linux-gnu
tag: ${{ github.ref }}

- name: Upload MacOS x86-64 binaries to release
if: matrix.os == 'macos-latest'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.ACTION_TOKEN }}
file: roles/target/release/pool_sv2
asset_name: pool_sv2-x86_64-apple-darwin
tag: ${{ github.ref }}

- name: Upload MacOS ARM64 binaries to release
if: matrix.os == 'macos-latest'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.ACTION_TOKEN }}
file: roles/target/aarch64-apple-darwin/release/pool_sv2
asset_name: pool_sv2-aarch64-apple-darwin
tag: ${{ github.ref }}

release_jdc:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04, macos-latest ]
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Compile Native
run: cargo build --release --locked --manifest-path=roles/jd-client/Cargo.toml

- name: Install aarch64-apple-darwin target
if: matrix.os == 'macos-latest'
run: rustup target add aarch64-apple-darwin

- name: Compile MacOS ARM64
if: matrix.os == 'macos-latest'
run: cargo build --release --locked --manifest-path=roles/jd-client/Cargo.toml --target=aarch64-apple-darwin

- name: Upload Linux x86-64 binaries to release
if: matrix.os == 'ubuntu-20.04'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.ACTION_TOKEN }}
file: roles/target/release/jd_client
asset_name: jd_client-x86_64-linux-gnu
tag: ${{ github.ref }}

- name: Upload MacOS x86-64 binaries to release
if: matrix.os == 'macos-latest'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.ACTION_TOKEN }}
file: roles/target/release/jd_client
asset_name: jd_client-x86_64-apple-darwin
tag: ${{ github.ref }}

- name: Upload MacOS ARM64 binaries to release
if: matrix.os == 'macos-latest'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.ACTION_TOKEN }}
file: roles/target/aarch64-apple-darwin/release/jd_client
asset_name: jd_client-aarch64-apple-darwin
tag: ${{ github.ref }}

release_jds:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04, macos-latest ]
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Compile Native
run: cargo build --release --locked --manifest-path=roles/jd-server/Cargo.toml
os: [ubuntu-latest, macos-latest]

- name: Install aarch64-apple-darwin target
if: matrix.os == 'macos-latest'
run: rustup target add aarch64-apple-darwin

- name: Compile MacOS ARM64
if: matrix.os == 'macos-latest'
run: cargo build --release --locked --manifest-path=roles/jd-server/Cargo.toml --target=aarch64-apple-darwin

- name: Upload Linux x86-64 binaries to release
if: matrix.os == 'ubuntu-20.04'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.ACTION_TOKEN }}
file: roles/target/release/jd_server
asset_name: jd_server-x86_64-linux-gnu
tag: ${{ github.ref }}

- name: Upload MacOS x86-64 binaries to release
if: matrix.os == 'macos-latest'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.ACTION_TOKEN }}
file: roles/target/release/jd_server
asset_name: jd_server-x86_64-apple-darwin
tag: ${{ github.ref }}

- name: Upload MacOS ARM64 binaries to release
if: matrix.os == 'macos-latest'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.ACTION_TOKEN }}
file: roles/target/aarch64-apple-darwin/release/jd_server
asset_name: jd_server-aarch64-apple-darwin
tag: ${{ github.ref }}

release_proxy:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04, macos-latest ]
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Compile Native
run: cargo build --release --locked --manifest-path=roles/mining-proxy/Cargo.toml

- name: Install aarch64-apple-darwin target
if: matrix.os == 'macos-latest'
run: rustup target add aarch64-apple-darwin

- name: Compile MacOS ARM64
if: matrix.os == 'macos-latest'
run: cargo build --release --locked --manifest-path=roles/mining-proxy/Cargo.toml --target=aarch64-apple-darwin
- name: Checkout Repository
uses: actions/checkout@v3

- name: Upload Linux x86-64 binaries to release
if: matrix.os == 'ubuntu-20.04'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.ACTION_TOKEN }}
file: roles/target/release/mining_proxy_sv2
asset_name: mining_proxy_sv2-x86_64-linux-gnu
tag: ${{ github.ref }}

- name: Upload MacOS x86-64 binaries to release
if: matrix.os == 'macos-latest'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.ACTION_TOKEN }}
file: roles/target/release/mining_proxy_sv2
asset_name: mining_proxy_sv2-x86_64-apple-darwin
tag: ${{ github.ref }}

- name: Upload MacOS ARM64 binaries to release
if: matrix.os == 'macos-latest'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.ACTION_TOKEN }}
file: roles/target/aarch64-apple-darwin/release/mining_proxy_sv2
asset_name: mining_proxy_sv2-aarch64-apple-darwin
tag: ${{ github.ref }}

release_translator:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04, macos-latest ]
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Compile Native
run: cargo build --release --locked --manifest-path=roles/translator/Cargo.toml

- name: Install aarch64-apple-darwin target
if: matrix.os == 'macos-latest'
run: rustup target add aarch64-apple-darwin

- name: Compile MacOS ARM64
if: matrix.os == 'macos-latest'
run: cargo build --release --locked --manifest-path=roles/translator/Cargo.toml --target=aarch64-apple-darwin

- name: Upload Linux x86-64 binaries to release
if: matrix.os == 'ubuntu-20.04'
- name: Install cargo cross
run: cargo install cross

- name: Compile Binaries
run: |
cross build --release --locked --manifest-path=roles/pool/Cargo.toml --target aarch64-unknown-linux-gnu
cross build --release --locked --manifest-path=roles/jd-client/Cargo.toml --target aarch64-unknown-linux-gnu
cross build --release --locked --manifest-path=roles/jd-server/Cargo.toml --target aarch64-unknown-linux-gnu
cross build --release --locked --manifest-path=roles/mining-proxy/Cargo.toml --target aarch64-unknown-linux-gnu
cross build --release --locked --manifest-path=roles/translator/Cargo.toml --target aarch64-unknown-linux-gnu
cross build --release --locked --manifest-path=roles/pool/Cargo.toml --target x86_64-linux-gnu
cross build --release --locked --manifest-path=roles/jd-client/Cargo.toml --target x86_64-linux-gnu
cross build --release --locked --manifest-path=roles/jd-server/Cargo.toml --target x86_64-linux-gnu
cross build --release --locked --manifest-path=roles/mining-proxy/Cargo.toml --target x86_64-linux-gnu
cross build --release --locked --manifest-path=roles/translator/Cargo.toml --target x86_64-linux-gnu
cross build --release --locked --manifest-path=roles/pool/Cargo.toml --target aarch64-apple-darwin
cross build --release --locked --manifest-path=roles/jd-client/Cargo.toml --target aarch64-apple-darwin
cross build --release --locked --manifest-path=roles/jd-server/Cargo.toml --target aarch64-apple-darwin
cross build --release --locked --manifest-path=roles/mining-proxy/Cargo.toml --target aarch64-apple-darwin
cross build --release --locked --manifest-path=roles/translator/Cargo.toml --target aarch64-apple-darwin
cross build --release --locked --manifest-path=roles/pool/Cargo.toml --target x86_64-apple-darwin
cross build --release --locked --manifest-path=roles/jd-client/Cargo.toml --target x86_64-apple-darwin
cross build --release --locked --manifest-path=roles/jd-server/Cargo.toml --target x86_64-apple-darwin
cross build --release --locked --manifest-path=roles/mining-proxy/Cargo.toml --target x86_64-apple-darwin
cross build --release --locked --manifest-path=roles/translator/Cargo.toml --target x86_64-apple-darwin
cross build --release --locked --manifest-path=roles/pool/Cargo.toml --target arm-unknown-linux-gnueabi
cross build --release --locked --manifest-path=roles/jd-client/Cargo.toml --target arm-unknown-linux-gnueabi
cross build --release --locked --manifest-path=roles/jd-server/Cargo.toml --target arm-unknown-linux-gnueabi
cross build --release --locked --manifest-path=roles/mining-proxy/Cargo.toml --target arm-unknown-linux-gnueabi
cross build --release --locked --manifest-path=roles/translator/Cargo.toml --target arm-unknown-linux-gnueabi
- name: Upload Binaries
if: success()
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.ACTION_TOKEN }}
file: roles/target/release/translator_sv2
asset_name: translator_sv2-x86_64-linux-gnu
tag: ${{ github.ref }}
file: |
roles/target/aarch64-unknown-linux-gnu/release/pool_sv2
roles/target/aarch64-unknown-linux-gnu/release/jd_client
roles/target/aarch64-unknown-linux-gnu/release/jd_server
roles/target/aarch64-unknown-linux-gnu/release/mining_proxy_sv2
roles/target/aarch64-unknown-linux-gnu/release/translator_sv2
roles/target/x86_64-linux-gnu/release/pool_sv2
roles/target/x86_64-linux-gnu/release/jd_client
roles/target/x86_64-linux-gnu/release/jd_server
roles/target/x86_64-linux-gnu/release/mining_proxy_sv2
roles/target/x86_64-linux-gnu/release/translator_sv2
roles/target/aarch64-apple-darwin/release/pool_sv2
roles/target/aarch64-apple-darwin/release/jd_client
roles/target/aarch64-apple-darwin/release/jd_server
roles/target/aarch64-apple-darwin/release/mining_proxy_sv2
roles/target/aarch64-apple-darwin/release/translator_sv2
roles/target/x86_64-apple-darwin/release/pool_sv2
roles/target/x86_64-apple-darwin/release/jd_client
roles/target/x86_64-apple-darwin/release/jd_server
roles/target/x86_64-apple-darwin/release/mining_proxy_sv2
roles/target/x86_64-apple-darwin/release/translator_sv2
roles/target/arm-unknown-linux-gnueabi/release/pool_sv2
roles/target/arm-unknown-linux-gnueabi/release/jd_client
roles/target/arm-unknown-linux-gnueabi/release/jd_server
roles/target/arm-unknown-linux-gnueabi/release/mining_proxy_sv2
roles/target/arm-unknown-linux-gnueabi/release/translator_sv2
asset_name: |
pool_sv2-aarch64-linux-gnu
jd_client-aarch64-linux-gnu
jd_server-aarch64-linux-gnu
mining_proxy_sv2-aarch64-linux-gnu
translator_sv2-aarch64-linux-gnu
pool_sv2-x86_64-linux-gnu
jd_client-x86_64-linux-gnu
jd_server-x86_64-linux-gnu
mining_proxy_sv2-x86_64-linux-gnu
translator_sv2-x86_64-linux-gnu
pool_sv2-aarch64-apple-darwin
jd_client-aarch64-apple-darwin
jd_server-aarch64-apple-darwin
mining_proxy_sv2-aarch64-apple-darwin
translator_sv2-aarch64-apple-darwin
pool_sv2-x86_64-apple-darwin
jd_client-x86_64-apple-darwin
jd_server-x86_64-apple-darwin
mining_proxy_sv2-x86_64-apple-darwin
translator_sv2-x86_64-apple-darwin
pool_sv2-arm-linux-gnueabi
jd_client-arm-linux-gnueabi
jd_server-arm-linux-gnueabi
mining_proxy_sv2-arm-linux-gnueabi
translator_sv2-arm-linux-gnueabi
- name: Upload MacOS x86-64 binaries to release
if: matrix.os == 'macos-latest'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.ACTION_TOKEN }}
file: roles/target/release/translator_sv2
asset_name: translator_sv2-x86_64-apple-darwin
tag: ${{ github.ref }}

- name: Upload MacOS ARM64 binaries to release
if: matrix.os == 'macos-latest'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.ACTION_TOKEN }}
file: roles/target/aarch64-apple-darwin/release/translator_sv2
asset_name: translator_sv2-aarch64-apple-darwin
tag: ${{ github.ref }}

0 comments on commit 760eb08

Please sign in to comment.