You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# - name: Reattach HEAD ## may be needed for accurate code coverage info
955
-
# run: git checkout ${{ github.head_ref }}
956
-
- name: Initialize workflow variables
957
-
id: vars
958
-
shell: bash
959
-
run: |
960
-
## VARs setup
961
-
outputs() { step_id="${{ github.action }}"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; }
962
-
# toolchain
963
-
TOOLCHAIN="nightly" ## default to "nightly" toolchain (required for certain required unstable compiler flags) ## !maint: refactor when stable channel has needed support
964
-
# * specify gnu-type TOOLCHAIN for windows; `grcov` requires gnu-style code coverage data files
965
-
case ${{ matrix.job.os }} in windows-*) TOOLCHAIN="$TOOLCHAIN-x86_64-pc-windows-gnu" ;; esac;
966
-
# * use requested TOOLCHAIN if specified
967
-
if [ -n "${{ matrix.job.toolchain }}" ]; then TOOLCHAIN="${{ matrix.job.toolchain }}" ; fi
968
-
outputs TOOLCHAIN
969
-
# target-specific options
970
-
# * CARGO_FEATURES_OPTION
971
-
CARGO_FEATURES_OPTION='--all-features' ; ## default to '--all-features' for code coverage
972
-
if [ -n "${{ matrix.job.features }}" ]; then CARGO_FEATURES_OPTION='--features=${{ matrix.job.features }}' ; fi
973
-
outputs CARGO_FEATURES_OPTION
974
-
# * CODECOV_FLAGS
975
-
CODECOV_FLAGS=$( echo "${{ matrix.job.os }}" | sed 's/[^[:alnum:]]/_/g' )
976
-
outputs CODECOV_FLAGS
977
-
- name: Install/setup prerequisites
978
-
shell: bash
979
-
run: |
980
-
## Install/setup prerequisites
981
-
case '${{ matrix.job.os }}' in
982
-
macos-latest) brew install coreutils ;; # needed for testing
983
-
esac
984
-
case '${{ matrix.job.os }}' in
985
-
ubuntu-latest)
986
-
# pinky is a tool to show logged-in users from utmp, and gecos fields from /etc/passwd.
987
-
# In GitHub Action *nix VMs, no accounts log in, even the "runner" account that runs the commands. The account also has empty gecos fields.
988
-
# To work around this for pinky tests, we create a fake login entry for the GH runner account...
outputs() { step_id="${{ github.action }}"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; }
# GRCOV_IGNORE_OPTION='--ignore build.rs --ignore "vendor/*" --ignore "/*" --ignore "[a-zA-Z]:/*"' ## `grcov` ignores these params when passed as an environment variable (why?)
1037
-
# GRCOV_EXCLUDE_OPTION='--excl-br-line "^\s*((debug_)?assert(_eq|_ne)?!|#\[derive\()"' ## `grcov` ignores these params when passed as an environment variable (why?)
0 commit comments