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
1019
+
# run: git checkout ${{ github.head_ref }}
1020
+
- name: Initialize workflow variables
1021
+
id: vars
1022
+
shell: bash
1023
+
run: |
1024
+
## VARs setup
1025
+
outputs() { step_id="${{ github.action }}"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; }
1026
+
# toolchain
1027
+
TOOLCHAIN="nightly" ## default to "nightly" toolchain (required for certain required unstable compiler flags) ## !maint: refactor when stable channel has needed support
1028
+
# * specify gnu-type TOOLCHAIN for windows; `grcov` requires gnu-style code coverage data files
1029
+
case ${{ matrix.job.os }} in windows-*) TOOLCHAIN="$TOOLCHAIN-x86_64-pc-windows-gnu" ;; esac;
1030
+
# * use requested TOOLCHAIN if specified
1031
+
if [ -n "${{ matrix.job.toolchain }}" ]; then TOOLCHAIN="${{ matrix.job.toolchain }}" ; fi
1032
+
outputs TOOLCHAIN
1033
+
# target-specific options
1034
+
# * CARGO_FEATURES_OPTION
1035
+
CARGO_FEATURES_OPTION='--all-features' ; ## default to '--all-features' for code coverage
1036
+
if [ -n "${{ matrix.job.features }}" ]; then CARGO_FEATURES_OPTION='--features=${{ matrix.job.features }}' ; fi
1037
+
outputs CARGO_FEATURES_OPTION
1038
+
# * CODECOV_FLAGS
1039
+
CODECOV_FLAGS=$( echo "${{ matrix.job.os }}" | sed 's/[^[:alnum:]]/_/g' )
1040
+
outputs CODECOV_FLAGS
1041
+
- name: Install/setup prerequisites
1042
+
shell: bash
1043
+
run: |
1044
+
## Install/setup prerequisites
1045
+
case '${{ matrix.job.os }}' in
1046
+
macos-latest) brew install coreutils ;; # needed for testing
1047
+
esac
1048
+
case '${{ matrix.job.os }}' in
1049
+
ubuntu-latest)
1050
+
# pinky is a tool to show logged-in users from utmp, and gecos fields from /etc/passwd.
1051
+
# In GitHub Action *nix VMs, no accounts log in, even the "runner" account that runs the commands. The account also has empty gecos fields.
1052
+
# 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?)
1101
+
# 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