Skip to content

Commit

Permalink
updated all again
Browse files Browse the repository at this point in the history
  • Loading branch information
bruhhgnik committed Oct 2, 2024
1 parent 80ee13e commit 05d6b48
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/release-fedora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release Fedora Package
on:
push:
tags:
- 'v*.*.*'
- 'v*.*.*' # Trigger the workflow when a new tag is pushed

jobs:
build:
Expand All @@ -13,24 +13,29 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

# Free disk space to ensure there's enough room for Docker operations
- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
# Set up Docker Buildx for building multi-stage Dockerfile
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Build and package
# Build the Docker image using the new multi-stage Dockerfile and run tests
- name: Build and test using Docker
run: |
docker buildx build --target target --load -t stone-prover:latest .
docker create --name temp stone-prover:latest
docker buildx build --target test --load -t stone-prover-test . # Build and run the test stage
docker buildx build --target target --load -t stone-prover-prod . # Build the production image
docker create --name temp stone-prover-prod
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
# Package the binaries into an RPM using Fedora
- name: Package RPM
run: |
docker run --rm -v $(pwd):/rpmbuild/SOURCES fedora:latest \
Expand All @@ -40,10 +45,11 @@ jobs:
rpmbuild -ba /rpmbuild/SPECS/stone-prover.spec \
--define \"version ${GITHUB_REF#refs/tags/v}\" \
--define \"_topdir /rpmbuild\""
# Upload the generated RPM file to the GitHub release
- name: Upload RPM to GitHub release
uses: softprops/action-gh-release@v1
with:
files: ./RPMS/x86_64/*.rpm
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 05d6b48

Please sign in to comment.