mirror of
https://github.com/vacp2p/linea-monorepo.git
synced 2026-01-08 15:13:50 -05:00
Co-authored-by: Franklin Delehelle <franklin.delehelle@odena.eu> Co-authored-by: Alexandre Belling <alexandrebelling8@gmail.com> Co-authored-by: Pedro Novais <jpvnovais@gmail.com> Co-authored-by: Roman Vaseev <4833306+Filter94@users.noreply.github.com> Co-authored-by: Bradley Bown <bradbown@googlemail.com> Co-authored-by: Victorien Gauch <85494462+VGau@users.noreply.github.com> Co-authored-by: Nikolai Golub <nikolai.golub@consensys.net> Co-authored-by: The Dark Jester <thedarkjester@users.noreply.github.com> Co-authored-by: jonesho <81145364+jonesho@users.noreply.github.com> Co-authored-by: Gaurav Ahuja <gauravahuja9@gmail.com> Co-authored-by: Azam Soleimanian <49027816+Soleimani193@users.noreply.github.com> Co-authored-by: Andrei A <andrei.alexandru@consensys.net> Co-authored-by: Arijit Dutta <37040536+arijitdutta67@users.noreply.github.com> Co-authored-by: Gautam Botrel <gautam.botrel@gmail.com> Co-authored-by: Ivo Kubjas <ivo.kubjas@consensys.net> Co-authored-by: gusiri <dreamerty@postech.ac.kr> Co-authored-by: FlorianHuc <florian.huc@gmail.com> Co-authored-by: Arya Tabaie <arya.pourtabatabaie@gmail.com> Co-authored-by: Julink <julien.fontanel@consensys.net> Co-authored-by: Bogdan Ursu <bogdanursuoffice@gmail.com> Co-authored-by: Jakub Trąd <jakubtrad@gmail.com> Co-authored-by: Alessandro Sforzin <alessandro.sforzin@consensys.net> Co-authored-by: Olivier Bégassat <olivier.begassat.cours@gmail.com> Co-authored-by: Steve Huang <97596526+stevehuangc7s@users.noreply.github.com> Co-authored-by: bkolad <blazejkolad@gmail.com> Co-authored-by: fadyabuhatoum1 <139905934+fadyabuhatoum1@users.noreply.github.com> Co-authored-by: Blas Rodriguez Irizar <rodrigblas@gmail.com> Co-authored-by: Eduardo Andrade <eduardofandrade@gmail.com> Co-authored-by: Ivo Kubjas <tsimmm@gmail.com> Co-authored-by: Ludcour <ludovic.courcelas@consensys.net> Co-authored-by: m4sterbunny <harrie.bickle@consensys.net> Co-authored-by: Alex Panayi <145478258+alexandrospanayi@users.noreply.github.com> Co-authored-by: Diana Borbe - ConsenSys <diana.borbe@consensys.net> Co-authored-by: ThomasPiellard <thomas.piellard@gmail.com>
128 lines
4.5 KiB
YAML
128 lines
4.5 KiB
YAML
name: Release Blob Compressor binaries
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: 'Version (e.g. v1.2.3)'
|
|
required: true
|
|
default: 'v0.0.0'
|
|
draft-release:
|
|
description: 'Draft Release'
|
|
required: false
|
|
default: false
|
|
type: boolean
|
|
pre-release:
|
|
description: 'Pre Release'
|
|
required: false
|
|
default: false
|
|
type: boolean
|
|
|
|
jobs:
|
|
|
|
build-linux:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
- name: Install Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: 1.22.x
|
|
|
|
- name: Build the linux artefacts
|
|
env:
|
|
CGO_ENABLED: 1
|
|
GOOS: "linux"
|
|
VERSION: ${{ github.event.inputs.version }}
|
|
SRC_SHNARF: "./lib/shnarf_calculator/shnarf_calculator.go"
|
|
TARGET_SHNARF: "shnarf_calculator"
|
|
SRC_COMPRESSOR: "./lib/compressor/libcompressor.go"
|
|
TARGET_COMPRESSOR: "blob_compressor"
|
|
run: |
|
|
cd prover
|
|
mkdir target
|
|
GOARCH="amd64" go build -tags=nocorset -buildmode=c-shared -o ./target/${TARGET_SHNARF}_${VERSION}_linux_x86_64.so ${SRC_SHNARF}
|
|
GOARCH="amd64" go build -tags=nocorset -buildmode=c-shared -o ./target/${TARGET_COMPRESSOR}_${VERSION}_linux_x86_64.so ${SRC_COMPRESSOR}
|
|
|
|
- name: Cache built binaries
|
|
uses: actions/upload-artifact@master
|
|
with:
|
|
name: linux-artefacts
|
|
path: ./prover/target
|
|
|
|
build-mac-os:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
- name: Install Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: 1.22.x
|
|
- name: Build the MacOS artefacts
|
|
env:
|
|
CGO_ENABLED: 1
|
|
GOOS: "darwin"
|
|
VERSION: ${{ github.event.inputs.version }}
|
|
SRC_SHNARF: "./lib/shnarf_calculator/shnarf_calculator.go"
|
|
TARGET_SHNARF: "shnarf_calculator"
|
|
SRC_COMPRESSOR: "./lib/compressor/libcompressor.go"
|
|
TARGET_COMPRESSOR: "blob_compressor"
|
|
run: |
|
|
cd prover
|
|
mkdir target
|
|
GOARCH="amd64" go build -tags=nocorset -buildmode=c-shared -o ./target/${TARGET_SHNARF}_${VERSION}_darwin_x86_64.dylib ${SRC_SHNARF}
|
|
GOARCH="arm64" go build -tags=nocorset -buildmode=c-shared -o ./target/${TARGET_SHNARF}_${VERSION}_darwin_arm64.dylib ${SRC_SHNARF}
|
|
GOARCH="amd64" go build -tags=nocorset -buildmode=c-shared -o ./target/${TARGET_COMPRESSOR}_${VERSION}_darwin_x86_64.dylib ${SRC_COMPRESSOR}
|
|
GOARCH="arm64" go build -tags=nocorset -buildmode=c-shared -o ./target/${TARGET_COMPRESSOR}_${VERSION}_darwin_arm64.dylib ${SRC_COMPRESSOR}
|
|
|
|
- name: Cache built binaries
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: darwin-artefacts
|
|
path: ./prover/target
|
|
|
|
release_artefacts:
|
|
name: Release artefacts
|
|
needs: [ build-linux, build-mac-os]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Load cached binaries
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
merge-multiple: true
|
|
- name: List artifacts
|
|
run: |
|
|
ls -la ./
|
|
- name: Zip the release files
|
|
run: |
|
|
zip -r linea-blob-libs-${{ github.event.inputs.version }}.zip .
|
|
- name: Get current date
|
|
id: current_date
|
|
run: echo "::set-output name=date::$(date --utc +'%Y-%m-%dT%H:%M:%SZ')"
|
|
shell: bash
|
|
- name: Create Release
|
|
id: create_release
|
|
uses: actions/create-release@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
tag_name: blob-libs-${{ github.event.inputs.version }}
|
|
release_name: Blob libs ${{ github.event.inputs.version }}
|
|
draft: ${{ github.event.inputs.draft-release }}
|
|
prerelease: ${{ github.event.inputs.pre-release }}
|
|
body: |
|
|
Go lang blob binaries ${{ github.event.inputs.version }}
|
|
commit: ${{ github.sha }}
|
|
date: ${{ steps.current_date.outputs.date }}
|
|
- name: Upload Release Asset
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: ./linea-blob-libs-${{ github.event.inputs.version }}.zip
|
|
asset_name: linea-blob-libs-${{ github.event.inputs.version }}.zip
|
|
asset_content_type: application/zip
|