Skip to content

Commit

Permalink
Update release-bin.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
xyephy authored Apr 18, 2024
1 parent 27d2d19 commit bb994ed
Showing 1 changed file with 171 additions and 80 deletions.
251 changes: 171 additions & 80 deletions .github/workflows/release-bin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,157 +13,248 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-20.04
target: x86_64-unknown-linux-gnu
- os: ubuntu-20.04
target: aarch64-unknown-linux-gnu
- os: ubuntu-20.04
target: arm-unknown-linux-gnueabi
- os: macos-latest
target: x86_64-apple-darwin
- os: macos-latest
target: aarch64-apple-darwin
os: [ubuntu-20.04, macos-latest]
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
target: ${{ matrix.target }}

- name: Compile
run: |
cargo build --release --locked --manifest-path=roles/pool/Cargo.toml --target=${{ matrix.target }}
- name: Compile Native
run: cargo build --release --locked --manifest-path=roles/pool/Cargo.toml

- name: Upload binaries to release
- 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.GITHUB_TOKEN }}
file: roles/target/${{ matrix.os }}-${{ matrix.target }}/release/pool_sv2
asset_name: pool_sv2-${{ matrix.os }}-${{ matrix.target }}
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:
include:
- os: ubuntu-20.04
targets: [x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu, arm-unknown-linux-gnueabi]
- os: macos-latest
targets: [x86_64-apple-darwin, aarch64-apple-darwin]
os: [ ubuntu-20.04, macos-latest ]
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
target: ${{ matrix.targets }}

- name: Compile
run: |
for target in ${{ join(matrix.targets, ' ') }}; do
cargo build --release --locked --manifest-path=roles/jd-client/Cargo.toml --target=$target
done
- 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 binaries to release
- name: Upload Linux x86-64 binaries to release
if: matrix.os == 'ubuntu-20.04'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: roles/target/${{ matrix.target }}/release/jd-client
asset_name: jd-client-${{ matrix.target }}
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:
include:
- os: ubuntu-20.04
targets: [x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu, arm-unknown-linux-gnueabi]
- os: macos-latest
targets: [x86_64-apple-darwin, aarch64-apple-darwin]
os: [ ubuntu-20.04, macos-latest ]
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
target: ${{ matrix.targets }}

- name: Compile
run: |
for target in ${{ join(matrix.targets, ' ') }}; do
cargo build --release --locked --manifest-path=roles/jds/Cargo.toml --target=$target
done
- name: Compile Native
run: cargo build --release --locked --manifest-path=roles/jd-server/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-server/Cargo.toml --target=aarch64-apple-darwin

- name: Upload binaries to release
- name: Upload Linux x86-64 binaries to release
if: matrix.os == 'ubuntu-20.04'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: roles/target/${{ matrix.target }}/release/jds
asset_name: jds-${{ matrix.target }}
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:
include:
- os: ubuntu-20.04
targets: [x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu, arm-unknown-linux-gnueabi]
- os: macos-latest
targets: [x86_64-apple-darwin, aarch64-apple-darwin]
os: [ ubuntu-20.04, macos-latest ]
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
target: ${{ matrix.targets }}

- name: Compile
run: |
for target in ${{ join(matrix.targets, ' ') }}; do
cargo build --release --locked --manifest-path=roles/proxy/Cargo.toml --target=$target
done
- 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: Upload binaries to release
- name: Upload Linux x86-64 binaries to release
if: matrix.os == 'ubuntu-20.04'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: roles/target/${{ matrix.target }}/release/proxy
asset_name: proxy-${{ matrix.target }}
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:
include:
- os: ubuntu-20.04
targets: [x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu, arm-unknown-linux-gnueabi]
- os: macos-latest
targets: [x86_64-apple-darwin, aarch64-apple-darwin]
os: [ ubuntu-20.04, macos-latest ]
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
target: ${{ matrix.targets }}

- name: Compile
run: |
for target in ${{ join(matrix.targets, ' ') }}; do
cargo build --release --locked --manifest-path=roles/translator/Cargo.toml --target=$target
done
- 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'
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 }}

- 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 binaries to release
- name: Upload MacOS ARM64 binaries to release
if: matrix.os == 'macos-latest'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: roles/target/${{ matrix.target }}/release/translator
asset_name: translator-${{ matrix.target }}
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 bb994ed

Please sign in to comment.