File tree Expand file tree Collapse file tree 3 files changed +67
-42
lines changed
Expand file tree Collapse file tree 3 files changed +67
-42
lines changed Original file line number Diff line number Diff line change @@ -26,35 +26,40 @@ jobs:
2626 runs_on : ubuntu-latest,
2727 target : x86_64-unknown-linux-gnu,
2828 arch : x86_64,
29- suffix : " "
29+ suffix : " " ,
30+ rustflags : " -C target-cpu=x86-64-v3 -C link-arg=-Wl,-O3"
3031 }
3132 - {
3233 os_name : Linux-aarch64,
3334 runs_on : ubuntu-latest,
3435 target : aarch64-unknown-linux-gnu,
3536 arch : aarch64,
36- suffix : " "
37+ suffix : " " ,
38+ rustflags : " -C target-cpu=neoverse-n1 -C link-arg=-Wl,-O3"
3739 }
3840 - {
3941 os_name : macOS-x86_64,
4042 runs_on : macos-latest,
4143 target : x86_64-apple-darwin,
4244 arch : x86_64,
43- suffix : " "
45+ suffix : " " ,
46+ rustflags : " -C target-cpu=x86-64-v3"
4447 }
4548 - {
4649 os_name : macOS-aarch64,
4750 runs_on : macos-latest,
4851 target : aarch64-apple-darwin,
4952 arch : aarch64,
50- suffix : " "
53+ suffix : " " ,
54+ rustflags : " -C target-cpu=apple-m1"
5155 }
5256 - {
5357 os_name : Windows-x86_64,
5458 runs_on : windows-latest,
5559 target : x86_64-pc-windows-msvc,
5660 arch : x86_64,
57- suffix : " .exe"
61+ suffix : " .exe" ,
62+ rustflags : " -C target-cpu=x86-64-v3"
5863 }
5964
6065 steps :
8085
8186 - name : Build
8287 shell : bash
88+ env :
89+ CARGO_PROFILE_RELEASE_OPT_LEVEL : " 3"
90+ CARGO_PROFILE_RELEASE_LTO : " fat"
91+ CARGO_PROFILE_RELEASE_CODEGEN_UNITS : " 1"
92+ CARGO_PROFILE_RELEASE_PANIC : " abort"
93+ CARGO_PROFILE_RELEASE_INCREMENTAL : " false"
94+ CARGO_PROFILE_RELEASE_STRIP : " none"
95+ RUSTFLAGS : ${{ matrix.platform.rustflags }}
8396 run : |
8497 if [ "${{ matrix.platform.target }}" = "aarch64-unknown-linux-gnu" ]; then
8598 export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
Original file line number Diff line number Diff line change 4242 shared-key : rust-${{ runner.os }}-x86_64-unknown-linux-gnu
4343 save-if : ${{ github.ref == 'refs/heads/main' }}
4444
45- - name : cargo build --release
45+ - name : Build (max runtime performance)
46+ env :
47+ CARGO_PROFILE_RELEASE_OPT_LEVEL : " 3"
48+ CARGO_PROFILE_RELEASE_LTO : " fat"
49+ CARGO_PROFILE_RELEASE_CODEGEN_UNITS : " 1"
50+ CARGO_PROFILE_RELEASE_PANIC : " abort"
51+ CARGO_PROFILE_RELEASE_INCREMENTAL : " false"
52+ CARGO_PROFILE_RELEASE_STRIP : " none"
53+ RUSTFLAGS : " -C target-cpu=x86-64-v3 -C link-arg=-Wl,-O3"
4654 run : cargo build --release --target x86_64-unknown-linux-gnu
4755
4856 - name : Package artifact (Linux-x86_64)
You can’t perform that action at this time.
0 commit comments