Skip to content

FORKS are always sorted, use binary_search to find current fork (#1473) #95

FORKS are always sorted, use binary_search to find current fork (#1473)

FORKS are always sorted, use binary_search to find current fork (#1473) #95

name: nightly-build-and-push
on:
workflow_dispatch:
push:
branches:
- nightly
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IMAGE_TAG: ${{ github.sha }}
jobs:
linux_amd64_binary_extraction:
runs-on: ubicloud-standard-30
strategy:
matrix:
include:
- ci_test_mode: 1
ci_test_mode_value: "-ci"
- ci_test_mode: 0
ci_test_mode_value: ""
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Dependencies
run: |
sudo apt update && sudo apt -y install curl gcc cpp cmake clang llvm
sudo apt -y autoremove && sudo apt clean && sudo rm -rf /var/lib/apt/lists/*
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
rustup install 1.79.0
rustup default 1.79.0
- name: Install risc0
uses: ./.github/actions/install-risc0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Build Project
env:
CI_TEST_MODE: ${{ matrix.ci_test_mode }}
run: |
cargo build --release
- name: Copy binary to build-push/nightly
run: |
cp target/release/citrea build-push/nightly/citrea
chmod +x build-push/nightly/citrea
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build Docker image
uses: docker/build-push-action@v6
with:
file: ./build-push/nightly/Dockerfile
context: ./build-push/nightly
tags: ${{ vars.DOCKERHUB_USERNAME }}/citrea-test:${{ env.IMAGE_TAG }}${{ matrix.ci_test_mode_value }}
platforms: linux/amd64
push: true
load: false
provenance: false