mirror of
https://github.com/ouch-org/ouch.git
synced 2025-06-05 02:55:31 +00:00
chore: use new Cargo profile in CI for shorter compilation
new profile is called `fast` and it's not as fast as `release`, but should be fast enough for CI and compiles faster
This commit is contained in:
parent
162dfbd29f
commit
97b4608693
@ -126,17 +126,18 @@ jobs:
|
||||
# there's no way to run tests for ARM64 Windows for now
|
||||
if: matrix.target != 'aarch64-pc-windows-msvc'
|
||||
run: |
|
||||
${{ env.CARGO }} +stable test --release --target ${{ matrix.target }} $EXTRA_CARGO_FLAGS
|
||||
${{ env.CARGO }} +stable test --profile fast --target ${{ matrix.target }} $EXTRA_CARGO_FLAGS
|
||||
|
||||
- name: Build artifacts (binary and completions)
|
||||
- name: Build release artifacts (binary and completions)
|
||||
if: ${{ inputs.upload_artifacts }}
|
||||
run: |
|
||||
${{ env.CARGO }} +stable build --release --target ${{ matrix.target }} $EXTRA_CARGO_FLAGS
|
||||
env:
|
||||
OUCH_ARTIFACTS_FOLDER: artifacts
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
- name: Upload release artifacts
|
||||
if: ${{ inputs.upload_artifacts }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ouch-${{ matrix.target }}-${{ steps.concat-features.outputs.FEATURES }}
|
||||
path: |
|
||||
|
@ -73,8 +73,17 @@ default = ["use_zlib", "use_zstd_thin", "unrar"]
|
||||
use_zlib = ["flate2/zlib", "gzp/deflate_zlib", "zip/deflate-zlib"]
|
||||
use_zstd_thin = ["zstd/thin"]
|
||||
|
||||
# For generating binaries for releases
|
||||
[profile.release]
|
||||
lto = true
|
||||
codegen-units = 1
|
||||
opt-level = 3
|
||||
strip = true
|
||||
|
||||
# When we need a fast binary that compiles slightly faster `release` (useful for CI)
|
||||
[profile.fast]
|
||||
inherits = "release"
|
||||
lto = false
|
||||
opt-level = 2
|
||||
incremental = true
|
||||
codegen-units = 16
|
||||
|
Loading…
x
Reference in New Issue
Block a user