Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions .github/workflows/CICD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -653,20 +653,26 @@ jobs:
*) echo "::error::-Cprofile-use missing from RUSTFLAGS" ; exit 1 ;;
esac
test -s "$(cat target/coreutils-pgo/profdata-path.txt)"
- name: Set release profile
if: github.event_name != 'pull_request'
run: echo PROFILE=release >> "${GITHUB_ENV}" && echo PROFILE_ARG=--release >> "${GITHUB_ENV}"
- name: Set debug profile
if: github.event_name == 'pull_request'
run: echo PROFILE=debug >> "${GITHUB_ENV}"
- name: Build coreutils
shell: bash
if: matrix.job.skip-publish != true && matrix.job.check-only != true && matrix.job.target != 'x86_64-pc-windows-msvc'
run: |
## Build
${{ steps.vars.outputs.CARGO_CMD }} ${{ steps.vars.outputs.CARGO_CMD_OPTIONS }} build --release --config=profile.release.strip=true \
${{ steps.vars.outputs.CARGO_CMD }} ${{ steps.vars.outputs.CARGO_CMD_OPTIONS }} build ${PROFILE_ARG} --config=profile.${PROFILE}.strip=true \
--target=${{ matrix.job.target }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} ${{ steps.vars.outputs.CARGO_DEFAULT_FEATURES_OPTION }}
# We don't want to have many duplicated long jobs at here
# So we build individual binaries (including coreutils) for few platforms until we deduplicate many release build for Linux
- name: Build all binaries
if: matrix.job.skip-tests != true && matrix.job.target == 'x86_64-pc-windows-msvc'
shell: bash
run: |
${{ steps.vars.outputs.CARGO_CMD }} ${{ steps.vars.outputs.CARGO_CMD_OPTIONS }} build --release --config=profile.release.strip=true \
${{ steps.vars.outputs.CARGO_CMD }} ${{ steps.vars.outputs.CARGO_CMD_OPTIONS }} build ${PROFILE_ARG} --config=profile.${PROFILE}.strip=true \
--target=${{ matrix.job.target }} \
${{ steps.dep_vars.outputs.CARGO_UTILITY_LIST_OPTIONS }} \
-p coreutils --features=${{ matrix.job.features }}
Expand All @@ -675,7 +681,7 @@ jobs:
shell: bash
run: |
## Package artifact(s)
find target/${{ matrix.job.target }}/release -maxdepth 1 -type f \
find target/${{ matrix.job.target }}/${PROFILE} -maxdepth 1 -type f \
\( -name "*.wasm" -o -name "*.exe" -o -perm -u+x \) \
-exec ln -v {} "${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}/" \;
# README and LICENSE
Expand All @@ -693,8 +699,8 @@ jobs:
if: matrix.job.target == 'x86_64-unknown-linux-gnu' && matrix.job.features == 'feat_os_unix,uudoc'
run: |
mkdir -p share/{man/man1,bash-completion/completions,fish/vendor_completions.d,zsh/site-functions,elvish/lib}
_uudoc=target/${{ matrix.job.target }}/release/uudoc
for bin in $('target/${{ matrix.job.target }}/release/coreutils' --list) coreutils;do
_uudoc=target/${{ matrix.job.target }}/${PROFILE}/uudoc
for bin in $('target/${{ matrix.job.target }}/${PROFILE}/coreutils' --list) coreutils;do
${_uudoc} manpage ${bin} > share/man/man1/${bin}.1
${_uudoc} completion ${bin} bash > share/bash-completion/completions/${bin}.bash
${_uudoc} completion ${bin} fish > share/fish/vendor_completions.d/${bin}.fish
Expand Down
Loading