Skip to content

Commit

Permalink
add ARM architecture support on release-bin.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
xyephy committed Apr 17, 2024
1 parent e3f0bac commit 6fe98e4
Showing 1 changed file with 70 additions and 165 deletions.
235 changes: 70 additions & 165 deletions .github/workflows/release-bin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,248 +13,153 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-latest]
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]
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
target: ${{ matrix.targets }}

- name: Compile Native
run: cargo build --release --locked --manifest-path=roles/pool/Cargo.toml
- name: Compile
run: |
for target in ${{ join(matrix.targets, ' ') }}; do
cargo build --release --locked --manifest-path=roles/pool/Cargo.toml --target=$target
done
- 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/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'
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_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.GITHUB_TOKEN }}
file: roles/target/aarch64-apple-darwin/release/pool_sv2
asset_name: pool_sv2-aarch64-apple-darwin
file: roles/target/${{ matrix.target }}/release/pool_sv2
asset_name: pool_sv2-${{ matrix.target }}
tag: ${{ github.ref }}

release_jdc:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04, macos-latest ]
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]
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
target: ${{ matrix.targets }}

- 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.GITHUB_TOKEN }}
file: roles/target/release/jd_client
asset_name: jd_client-x86_64-linux-gnu
tag: ${{ github.ref }}
- 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: Upload MacOS x86-64 binaries to release
if: matrix.os == 'macos-latest'
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_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.GITHUB_TOKEN }}
file: roles/target/aarch64-apple-darwin/release/jd_client
asset_name: jd_client-aarch64-apple-darwin
file: roles/target/${{ matrix.target }}/release/jd-client
asset_name: jd-client-${{ matrix.target }}
tag: ${{ github.ref }}

release_jds:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04, macos-latest ]
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]
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
target: ${{ matrix.targets }}

- 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 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/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.GITHUB_TOKEN }}
file: roles/target/release/jd_server
asset_name: jd_server-x86_64-apple-darwin
tag: ${{ github.ref }}
- name: Compile
run: |
for target in ${{ join(matrix.targets, ' ') }}; do
cargo build --release --locked --manifest-path=roles/jds/Cargo.toml --target=$target
done
- name: Upload MacOS ARM64 binaries to release
if: matrix.os == 'macos-latest'
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: roles/target/aarch64-apple-darwin/release/jd_server
asset_name: jd_server-aarch64-apple-darwin
file: roles/target/${{ matrix.target }}/release/jds
asset_name: jds-${{ matrix.target }}
tag: ${{ github.ref }}

release_proxy:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04, macos-latest ]
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]
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
target: ${{ matrix.targets }}

- 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 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/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.GITHUB_TOKEN }}
file: roles/target/release/mining_proxy_sv2
asset_name: mining_proxy_sv2-x86_64-apple-darwin
tag: ${{ github.ref }}
- name: Compile
run: |
for target in ${{ join(matrix.targets, ' ') }}; do
cargo build --release --locked --manifest-path=roles/proxy/Cargo.toml --target=$target
done
- name: Upload MacOS ARM64 binaries to release
if: matrix.os == 'macos-latest'
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: roles/target/aarch64-apple-darwin/release/mining_proxy_sv2
asset_name: mining_proxy_sv2-aarch64-apple-darwin
file: roles/target/${{ matrix.target }}/release/proxy
asset_name: proxy-${{ matrix.target }}
tag: ${{ github.ref }}

release_translator:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04, macos-latest ]
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]
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
target: ${{ matrix.targets }}

- 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.GITHUB_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.GITHUB_TOKEN }}
file: roles/target/release/translator_sv2
asset_name: translator_sv2-x86_64-apple-darwin
tag: ${{ github.ref }}
- name: Compile
run: |
for target in ${{ join(matrix.targets, ' ') }}; do
cargo build --release --locked --manifest-path=roles/translator/Cargo.toml --target=$target
done
- name: Upload MacOS ARM64 binaries to release
if: matrix.os == 'macos-latest'
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: roles/target/aarch64-apple-darwin/release/translator_sv2
asset_name: translator_sv2-aarch64-apple-darwin
file: roles/target/${{ matrix.target }}/release/translator
asset_name: translator-${{ matrix.target }}
tag: ${{ github.ref }}

0 comments on commit 6fe98e4

Please sign in to comment.