Skip to content

v1.14.22-jito

v1.14.22-jito #37

Workflow file for this run

name: Build and upload assets
on:
release:
types: [created]
permissions:
contents: write
packages: write
jobs:
output-release:
runs-on: ubuntu-latest
name: Ouput release attributes
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set release ID as output
id: release
run: |
echo "release_url=${{ github.event.release.url }}" >> $GITHUB_OUTPUT
echo "release_name=${{ github.event.release.name }}" >> $GITHUB_OUTPUT
echo "release_id=${{ github.event.release.id }}" >> $GITHUB_OUTPUT
echo "release_upload_url=${{ github.event.release.upload_url }}" >> $GITHUB_OUTPUT
echo "release_assets_url=${{ github.event.release.assets_url }}" >> $GITHUB_OUTPUT
build-ubuntu-2204:
runs-on: ubuntu-22.04-16-cores
needs: output-release
steps:
- name: Install deps
run: |
rm -f /home/runner/.cargo/bin/rustfmt
rm -f /home/runner/.cargo/bin/cargo-fmt
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source ${HOME}/.cargo/env
rustup component add rustfmt
rustup update
sudo apt-get update
sudo apt-get -y install jq libssl-dev libudev-dev pkg-config zlib1g-dev llvm clang cmake make libprotobuf-dev protobuf-compiler
echo "${HOME}/.cargo/bin" >> $GITHUB_PATH
- uses: actions/checkout@v3
with:
repository: 'jito-foundation/jito-solana'
ref: ${{ github.event.release.name }}
submodules: 'recursive'
- name: Build
run: |
CI_COMMIT=$(git rev-parse HEAD) scripts/cargo-install-all.sh --validator-only ${HOME}/.local/share/solana/install/releases/${{ github.event.release.name }}
- name: Create tarball
run: |
tar cvzf solana-${{ github.event.release.name }}-ubuntu-2204.tgz --directory=${HOME}/.local/share/solana/install/releases/${{ github.event.release.name }}/bin ./
- name: Upload tarball to release
run: |
UPLOAD_URL=$(curl -sH "Authorization: ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/${GITHUB_REPOSITORY}/releases/tags/${{ github.event.release.name }}" \
| jq -r '.upload_url' | cut -d'{' -f1)
FILE=solana-${{ github.event.release.name }}-ubuntu-2204.tgz
curl -X POST \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
-H "Content-Type: $(file -b --mime-type ${FILE})" \
-H "Content-Length: $(wc -c <${FILE} | xargs)" \
-T "${FILE}" \
"${UPLOAD_URL}?name=$(basename ${FILE})" | cat
build-ubuntu-2004:
runs-on: ubuntu-20.04-16-cores
needs: output-release
steps:
- name: Install deps
run: |
rm -f /home/runner/.cargo/bin/rustfmt
rm -f /home/runner/.cargo/bin/cargo-fmt
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source ${HOME}/.cargo/env
rustup component add rustfmt
rustup update
sudo apt-get update
sudo apt-get -y install jq libssl-dev libudev-dev pkg-config zlib1g-dev llvm clang cmake make libprotobuf-dev protobuf-compiler
echo "${HOME}/.cargo/bin" >> $GITHUB_PATH
- uses: actions/checkout@v3
with:
repository: 'jito-foundation/jito-solana'
ref: ${{ github.event.release.name }}
submodules: 'recursive'
- name: Build
run: |
CI_COMMIT=$(git rev-parse HEAD) scripts/cargo-install-all.sh --validator-only ${HOME}/.local/share/solana/install/releases/${{ github.event.release.name }}
- name: Create tarball
run: |
tar cvzf solana-${{ github.event.release.name }}-ubuntu-2004.tgz --directory=${HOME}/.local/share/solana/install/releases/${{ github.event.release.name }}/bin ./
- name: Upload tarball to release
run: |
UPLOAD_URL=$(curl -sH "Authorization: ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/${GITHUB_REPOSITORY}/releases/tags/${{ github.event.release.name }}" \
| jq -r '.upload_url' | cut -d'{' -f1)
FILE=solana-${{ github.event.release.name }}-ubuntu-2004.tgz
curl -X POST \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
-H "Content-Type: $(file -b --mime-type ${FILE})" \
-H "Content-Length: $(wc -c <${FILE} | xargs)" \
-T "${FILE}" \
"${UPLOAD_URL}?name=$(basename ${FILE})" | cat
build-docker:
runs-on: ubuntu-22.04
needs: output-release
steps:
- uses: actions/checkout@v3
with:
repository: 'jito-foundation/jito-solana'
ref: ${{ github.event.release.name }}
submodules: 'recursive'
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build
run: |
set -x
CI="" ./sdk/docker-solana/build.sh
docker tag solanalabs/solana:"${CI_TAG}" ghcr.io/kilnfi/jito-solana:"${CI_TAG}"
docker push ghcr.io/kilnfi/jito-solana:"${CI_TAG}"
env:
CI_TAG: ${{ github.event.release.name }}