Skip to content

updated dockerfile

updated dockerfile #29

Workflow file for this run

name: Release Fedora Package
on:
push:
tags:
- 'v*.*.*' # Trigger the workflow when a new tag is pushed
jobs:
build:
runs-on: ubuntu-latest # Using Ubuntu as the host, simulate Fedora in Docker
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build Docker image (Fedora)
run: |
docker buildx build --target target --file Dockerfile.fedora --load -t stone-prover-fedora .
- name: Create container and copy binaries
run: |
docker create --name temp stone-prover-fedora
docker cp temp:/usr/local/bin/cpu_air_prover ./cpu_air_prover
docker cp temp:/usr/local/bin/cpu_air_verifier ./cpu_air_verifier
docker rm temp
- name: Run tests in Fedora container
run: |
docker run stone-prover-fedora bazelisk test //... --cxxopt='-std=c++17'
- name: Package RPM inside Fedora container
run: |
docker run --rm -v $(pwd):/rpmbuild/SOURCES fedora:latest \
bash -c "dnf install -y rpm-build && \
mkdir -p /rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} && \
cp /rpmbuild/SOURCES/stone-prover.spec /rpmbuild/SPECS/ && \
rpmbuild -ba /rpmbuild/SPECS/stone-prover.spec \
--define \"version ${GITHUB_REF#refs/tags/v}\" \
--define \"_topdir /rpmbuild\""
- name: Verify RPM creation
run: docker run --rm fedora:latest ls -la /rpmbuild/RPMS/x86_64/
- name: Upload RPM to GitHub release
uses: softprops/action-gh-release@v2
with:
files: ./RPMS/x86_64/*.rpm # Upload the RPM package to the release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}