Skip to content

Commit 83e2822

Browse files
compile all with cargo and no flags except target cpu (#263)
1 parent 75f165d commit 83e2822

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

.github/workflows/upload_artifacts_workflow.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,9 @@ jobs:
1717
run: |
1818
echo "SHORT_HASH=${COMMIT_SHA:0:7}" >> $GITHUB_ENV
1919
20-
- name: Install cross
21-
run: cargo install cross
22-
2320
- name: Build all generic binaries
2421
run: |
25-
RUSTFLAGS="-C opt-level=3 -C codegen-units=1 -C embed-bitcode -C lto=fat -Zdylib-lto" cargo build --release
22+
cargo build --release
2623
2724
- name: Authenticate with GCS
2825
uses: "google-github-actions/auth@v2"
@@ -52,7 +49,7 @@ jobs:
5249

5350
- name: Build stwo_run_and_prove for znver5 architecture
5451
run: |
55-
RUSTFLAGS="-C target-cpu=znver5 -C opt-level=3 -C codegen-units=1 -C embed-bitcode -C lto=fat -Zdylib-lto" cross build --release --bin stwo_run_and_prove
52+
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
5653
5754
- name: Upload stwo_run_and_prove_znver5 binary to GCP
5855
id: upload_stwo_run_and_prove_znver5
@@ -63,7 +60,7 @@ jobs:
6360

6461
- name: Build stwo_run_and_prove for znver3 architecture
6562
run: |
66-
RUSTFLAGS="-C target-cpu=znver3 -C opt-level=3 -C codegen-units=1 -C embed-bitcode -C lto=fat -Zdylib-lto" cross build --release --bin stwo_run_and_prove
63+
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
6764
6865
- name: Upload stwo_run_and_prove_znver3 binary to GCP
6966
id: upload_stwo_run_and_prove_znver3
@@ -74,7 +71,7 @@ jobs:
7471

7572
- name: Build stwo_run_and_prove for emeraldrapids architecture
7673
run: |
77-
RUSTFLAGS="-C target-cpu=emeraldrapids -C opt-level=3 -C codegen-units=1 -C embed-bitcode -C lto=fat -Zdylib-lto" cross build --release --bin stwo_run_and_prove
74+
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
7875
7976
- name: Upload stwo_run_and_prove_emeraldrapids binary to GCP
8077
id: upload_stwo_run_and_prove_emeraldrapids
@@ -85,11 +82,22 @@ jobs:
8582

8683
- name: Build stwo_run_and_prove for sapphirerapids architecture
8784
run: |
88-
RUSTFLAGS="-C target-cpu=sapphirerapids -C opt-level=3 -C codegen-units=1 -C embed-bitcode -C lto=fat -Zdylib-lto" cross build --release --bin stwo_run_and_prove
85+
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
8986
9087
- name: Upload stwo_run_and_prove_sapphirerapids binary to GCP
9188
id: upload_stwo_run_and_prove_sapphirerapids
9289
uses: "google-github-actions/upload-cloud-storage@v2"
9390
with:
9491
path: "target/x86_64-unknown-linux-gnu/release/stwo_run_and_prove"
9592
destination: "stwo_run_and_prove_sapphirerapids_artifacts/${{ env.SHORT_HASH }}/release"
93+
94+
- name: Build stwo_run_and_prove for graniterapids architecture
95+
run: |
96+
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
97+
98+
- name: Upload stwo_run_and_prove_graniterapids binary to GCP
99+
id: upload_stwo_run_and_prove_graniterapids
100+
uses: "google-github-actions/upload-cloud-storage@v2"
101+
with:
102+
path: "target/x86_64-unknown-linux-gnu/release/stwo_run_and_prove"
103+
destination: "stwo_run_and_prove_graniterapids_artifacts/${{ env.SHORT_HASH }}/release"

0 commit comments

Comments
 (0)