compile all with cargo and no flags except target cpu (#263) #257
This file contains hidden or 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: Upload-Artifacts | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| artifacts-push: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Get commit hash prefix for PR update | |
| env: | |
| COMMIT_SHA: ${{ github.sha }} | |
| run: | | |
| echo "SHORT_HASH=${COMMIT_SHA:0:7}" >> $GITHUB_ENV | |
| - name: Build all generic binaries | |
| run: | | |
| cargo build --release | |
| - name: Authenticate with GCS | |
| uses: "google-github-actions/auth@v2" | |
| with: | |
| credentials_json: ${{ secrets.SA_GPS_ARTIFACTS_BUCKET_WRITER_ACCESS_KEY }} | |
| - name: Upload cairo_program_runner x86_64 binary to GCP | |
| id: upload_cairo_program_runner_x86 | |
| uses: "google-github-actions/upload-cloud-storage@v2" | |
| with: | |
| path: "target/release/cairo_program_runner" | |
| destination: "cairo_program_runner_artifacts/${{ env.SHORT_HASH }}/release" | |
| - name: Upload stwo_vm_runner x86_64 binary to GCP | |
| id: upload_stwo_vm_runner_x86 | |
| uses: "google-github-actions/upload-cloud-storage@v2" | |
| with: | |
| path: "target/release/stwo_vm_runner" | |
| destination: "stwo_vm_runner_artifacts/${{ env.SHORT_HASH }}/release" | |
| - name: Upload stwo_run_and_prove binary to GCP | |
| id: upload_stwo_run_and_prove | |
| uses: "google-github-actions/upload-cloud-storage@v2" | |
| with: | |
| path: "target/release/stwo_run_and_prove" | |
| destination: "stwo_run_and_prove_artifacts/${{ env.SHORT_HASH }}/release" | |
| - name: Build stwo_run_and_prove for znver5 architecture | |
| run: | | |
| CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS="-C target-cpu=znver5" cargo build --release --target x86_64-unknown-linux-gnu --bin stwo_run_and_prove | |
| - name: Upload stwo_run_and_prove_znver5 binary to GCP | |
| id: upload_stwo_run_and_prove_znver5 | |
| uses: "google-github-actions/upload-cloud-storage@v2" | |
| with: | |
| path: "target/x86_64-unknown-linux-gnu/release/stwo_run_and_prove" | |
| destination: "stwo_run_and_prove_znver5_artifacts/${{ env.SHORT_HASH }}/release" | |
| - name: Build stwo_run_and_prove for znver3 architecture | |
| run: | | |
| CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS="-C target-cpu=znver3" cargo build --release --target x86_64-unknown-linux-gnu --bin stwo_run_and_prove | |
| - name: Upload stwo_run_and_prove_znver3 binary to GCP | |
| id: upload_stwo_run_and_prove_znver3 | |
| uses: "google-github-actions/upload-cloud-storage@v2" | |
| with: | |
| path: "target/x86_64-unknown-linux-gnu/release/stwo_run_and_prove" | |
| destination: "stwo_run_and_prove_znver3_artifacts/${{ env.SHORT_HASH }}/release" | |
| - name: Build stwo_run_and_prove for emeraldrapids architecture | |
| run: | | |
| CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS="-C target-cpu=emeraldrapids" cargo build --release --target x86_64-unknown-linux-gnu --bin stwo_run_and_prove | |
| - name: Upload stwo_run_and_prove_emeraldrapids binary to GCP | |
| id: upload_stwo_run_and_prove_emeraldrapids | |
| uses: "google-github-actions/upload-cloud-storage@v2" | |
| with: | |
| path: "target/x86_64-unknown-linux-gnu/release/stwo_run_and_prove" | |
| destination: "stwo_run_and_prove_emeraldrapids_artifacts/${{ env.SHORT_HASH }}/release" | |
| - name: Build stwo_run_and_prove for sapphirerapids architecture | |
| run: | | |
| CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS="-C target-cpu=sapphirerapids" cargo build --release --target x86_64-unknown-linux-gnu --bin stwo_run_and_prove | |
| - name: Upload stwo_run_and_prove_sapphirerapids binary to GCP | |
| id: upload_stwo_run_and_prove_sapphirerapids | |
| uses: "google-github-actions/upload-cloud-storage@v2" | |
| with: | |
| path: "target/x86_64-unknown-linux-gnu/release/stwo_run_and_prove" | |
| destination: "stwo_run_and_prove_sapphirerapids_artifacts/${{ env.SHORT_HASH }}/release" | |
| - name: Build stwo_run_and_prove for graniterapids architecture | |
| run: | | |
| CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS="-C target-cpu=graniterapids" cargo build --release --target x86_64-unknown-linux-gnu --bin stwo_run_and_prove | |
| - name: Upload stwo_run_and_prove_graniterapids binary to GCP | |
| id: upload_stwo_run_and_prove_graniterapids | |
| uses: "google-github-actions/upload-cloud-storage@v2" | |
| with: | |
| path: "target/x86_64-unknown-linux-gnu/release/stwo_run_and_prove" | |
| destination: "stwo_run_and_prove_graniterapids_artifacts/${{ env.SHORT_HASH }}/release" |