Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve build binaries pipeline #2121

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 16 additions & 17 deletions .github/workflows/build-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
tags:
- 'v*'
workflow_dispatch:
pull_request:
branches:
- main
paths:
- .github/workflows/build-binaries.yml
derrix060 marked this conversation as resolved.
Show resolved Hide resolved

jobs:
build:
Expand All @@ -13,11 +18,9 @@ jobs:
matrix:
include:
- os: ubuntu-latest
architecture: amd64
- os: macOS-latest
architecture: amd64
- os: macos-13
derrix060 marked this conversation as resolved.
Show resolved Hide resolved
- os: ubuntu-arm64-4-core
architecture: arm64
- os: macos-latest
runs-on: ${{ matrix.os }}

steps:
Expand All @@ -27,9 +30,11 @@ jobs:
fetch-depth: 0

- name: Get latest tag
id: tag
run: echo "TAG=$(git describe --tags)" >> $GITHUB_ENV

- name: Get artifact name
run: echo "ARTIFACT_NAME=juno-${{ env.TAG }}-${{ runner.os }}-$(uname -m)" >> $GITHUB_ENV

- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: sudo apt-get update -qq && sudo apt-get install -y upx-ucl build-essential cargo git golang libjemalloc-dev libjemalloc2 -y
Expand All @@ -47,27 +52,21 @@ jobs:
run: |
make juno
upx build/juno
mv build/juno juno-${{ env.TAG }}-${{ runner.os }}-${{ matrix.architecture }}
mv build/juno ${{ env.ARTIFACT_NAME }}

- name: Generate Checksum
id: checksum
run: |
if [[ "${{ runner.os }}" == "macOS" ]]; then
shasum -a 256 juno-${{ env.TAG }}-${{ runner.os }}-${{ matrix.architecture }} > juno-${{ env.TAG }}-${{ runner.os }}-${{ matrix.architecture }}.sha256
shasum -a 256 ${{ env.ARTIFACT_NAME }} > ${{ env.ARTIFACT_NAME }}.sha256
else
sha256sum juno-${{ env.TAG }}-${{ runner.os }}-${{ matrix.architecture }} > juno-${{ env.TAG }}-${{ runner.os }}-${{ matrix.architecture }}.sha256
sha256sum ${{ env.ARTIFACT_NAME }} > ${{ env.ARTIFACT_NAME }}.sha256
fi

- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: juno-${{ env.TAG }}-${{ runner.os }}-${{ matrix.architecture }}
name: ${{ env.ARTIFACT_NAME }}
path: |
juno-${{ env.TAG }}-${{ runner.os }}-${{ matrix.architecture }}
juno-${{ env.TAG }}-${{ runner.os }}-${{ matrix.architecture }}.sha256

- name: Cleanup
if: matrix.os == 'self-hosted'
run: |
rm juno-${{ env.TAG }}-${{ runner.os }}-${{ matrix.architecture }}
rm juno-${{ env.TAG }}-${{ runner.os }}-${{ matrix.architecture }}.sha256
${{ env.ARTIFACT_NAME }}
${{ env.ARTIFACT_NAME }}.sha256
Loading