From bb994ed3493d0ac8287bc3cfdc74b8b73e459700 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A2=D0=BE=D0=BB=D0=BB=D0=B8?= Date: Thu, 18 Apr 2024 18:59:43 +0300 Subject: [PATCH] Update release-bin.yaml --- .github/workflows/release-bin.yaml | 251 ++++++++++++++++++++--------- 1 file changed, 171 insertions(+), 80 deletions(-) diff --git a/.github/workflows/release-bin.yaml b/.github/workflows/release-bin.yaml index e7cf635d72..acc9666239 100644 --- a/.github/workflows/release-bin.yaml +++ b/.github/workflows/release-bin.yaml @@ -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 }}