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