fix arm64 binaries and Dockerfile #55
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-22.04, macos-14] | |
arch: [x64, aarch64] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up environment | |
run: | | |
echo "Setting up environment for ${{ matrix.arch }}" | |
if [ "${{ matrix.arch }}" == "x64" ]; then | |
echo "TARGET_ARCH=x86_64" >> $GITHUB_ENV | |
elif [ "${{ matrix.arch }}" == "aarch64" ]; then | |
echo "TARGET_ARCH=aarch64" >> $GITHUB_ENV | |
fi | |
- name: Build | |
run: | | |
chmod +x ./build.sh | |
./build.sh | |
- name: Test | |
run: | | |
chmod +x ./test.sh | |
./test.sh | |
- name: Set output | |
id: vars | |
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | |
- name: Extract files and build DEB package | |
if: matrix.os == 'ubuntu-22.04' | |
run: | | |
chmod +x ./package_deb.sh | |
./package_deb.sh ${{ steps.vars.outputs.tag }} | |
- name: Extract files and build RPM package | |
if: matrix.os == 'fedora-40' | |
run: | | |
chmod +x ./package_rpm.sh | |
./package_rpm.sh ${{ steps.vars.outputs.tag }} | |
- name: Rename binaries ubuntu | |
if: matrix.os == 'ubuntu-22.04' | |
run: | | |
echo "Renaming binaries to include architecture" | |
mv /tmp/stone-prover/build/bazelbin/src/starkware/main/cpu/cpu_air_prover ./cpu_air_prover-linux-${TARGET_ARCH} | |
mv /tmp/stone-prover/build/bazelbin/src/starkware/main/cpu/cpu_air_verifier ./cpu_air_verifier-linux-${TARGET_ARCH} | |
mv /tmp/stone-prover/stone-prover.deb /tmp/stone-prover/stone-prover-linux-${TARGET_ARCH}.deb | |
- name: Rename binaries macos | |
if: matrix.os == 'macos-14' | |
run: | | |
echo "Renaming binaries to include architecture" | |
mv /tmp/stone-prover/build/bazelbin/src/starkware/main/cpu/cpu_air_prover ./cpu_air_prover-macos-${TARGET_ARCH} | |
mv /tmp/stone-prover/build/bazelbin/src/starkware/main/cpu/cpu_air_verifier ./cpu_air_verifier-macos-${TARGET_ARCH} | |
- name: Verify file existence#2 | |
run: | | |
ls -la ./ | |
ls -la /tmp/stone-prover/ | |
- name: Upload files to a GitHub release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
./cpu_air* | |
/tmp/stone-prover/*.deb | |