@@ -14,10 +14,10 @@ jobs:
1414 os : [ubuntu-latest, macOS-latest, windows-latest]
1515 steps :
1616 - uses : actions/checkout@v6
17- - uses : dtolnay/rust-toolchain@stable
1817 - name : Install dependencies
18+ if : runner.os == 'Linux'
1919 shell : bash
20- run : case ${{ matrix.os }} in ubuntu-*) sudo apt-get update --quiet && sudo apt-get install --quiet --no-install-recommends --assume-yes libclang-dev libc6-dev libsmartcols-dev libmount-dev ;; esac;
20+ run : sudo apt-get update --quiet && sudo apt-get install --quiet --no-install-recommends --assume-yes libclang-dev libc6-dev libsmartcols-dev libmount-dev
2121 - run : cargo check
2222
2323 test :
@@ -28,21 +28,19 @@ jobs:
2828 os : [ubuntu-latest, macOS-latest, windows-latest]
2929 steps :
3030 - uses : actions/checkout@v6
31- - uses : dtolnay/rust-toolchain@stable
3231 - name : Install dependencies
3332 shell : bash
34- run : case ${{ matrix.os }} in ubuntu-*) sudo apt-get update --quiet && sudo apt-get install --quiet --no-install-recommends --assume-yes libclang-dev libc6-dev libsmartcols-dev libmount-dev ;; esac;
33+ if : runner.os == 'Linux'
34+ run : sudo apt-get update --quiet && sudo apt-get install --quiet --no-install-recommends --assume-yes libclang-dev libc6-dev libsmartcols-dev libmount-dev
3535 - run : cargo test
3636
3737 fmt :
3838 name : cargo fmt --all -- --check
3939 runs-on : ubuntu-latest
4040 steps :
4141 - uses : actions/checkout@v6
42- - uses : dtolnay/rust-toolchain@stable
4342 - run : sudo apt-get update --quiet
4443 - run : sudo apt-get install --quiet --no-install-recommends --assume-yes libclang-dev libc6-dev libsmartcols-dev libmount-dev
45- - run : rustup component add rustfmt
4644 - run : cargo fmt --all -- --check
4745
4846 clippy :
@@ -53,11 +51,10 @@ jobs:
5351 os : [ubuntu-latest, macOS-latest, windows-latest]
5452 steps :
5553 - uses : actions/checkout@v6
56- - uses : dtolnay/rust-toolchain@stable
5754 - name : Install dependencies
5855 shell : bash
59- run : case ${{ matrix .os }} in ubuntu-*) sudo apt-get update --quiet && sudo apt-get install --quiet --no-install-recommends --assume-yes libclang-dev libc6-dev libsmartcols-dev libmount-dev ;; esac;
60- - run : rustup component add clippy
56+ if : runner .os == 'Linux'
57+ run : sudo apt-get update --quiet && sudo apt-get install --quiet --no-install-recommends --assume-yes libclang-dev libc6-dev libsmartcols-dev libmount-dev
6158 - run : cargo clippy -- -D warnings
6259
6360 coverage :
@@ -78,10 +75,10 @@ jobs:
7875 run : |
7976 ## VARs setup
8077 outputs() { step_id="vars"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT; done; }
81- # toolchain
82- TOOLCHAIN="nightly" ## default to "nightly" toolchain (required for certain required unstable compiler flags) ## !maint: refactor when stable channel has needed support
78+ # unlock nightly features
79+ echo "RUSTC_BOOTSTRAP=1" >> "${GITHUB_ENV}"
8380 # * specify gnu-type TOOLCHAIN for windows; `grcov` requires gnu-style code coverage data files
84- case ${{ matrix.job.os }} in windows-*) TOOLCHAIN="$TOOLCHAIN-x86_64-pc-windows-gnu" ;; esac;
81+ rustc.exe --version && TOOLCHAIN="$TOOLCHAIN-x86_64-pc-windows-gnu" ||:
8582 # * use requested TOOLCHAIN if specified
8683 if [ -n "${{ matrix.job.toolchain }}" ]; then TOOLCHAIN="${{ matrix.job.toolchain }}" ; fi
8784 outputs TOOLCHAIN
9289
9390 - name : Install dependencies
9491 shell : bash
95- run : case ${{ matrix.job.os }} in ubuntu-*) sudo apt-get update --quiet && sudo apt-get install --quiet --no-install-recommends --assume-yes libclang-dev libc6-dev libsmartcols-dev libmount-dev ;; esac;
92+ if : runner.os == 'Linux'
93+ run : sudo apt-get update --quiet && sudo apt-get install --quiet --no-install-recommends --assume-yes libclang-dev libc6-dev libsmartcols-dev libmount-dev
9694
97- - name : rust toolchain ~ install
98- uses : dtolnay/rust-toolchain@nightly
9995 - name : Install llvm-tools-preview
10096 run : rustup component add llvm-tools-preview
10197 - name : Test
@@ -110,12 +106,13 @@ jobs:
110106 id : build_grcov
111107 shell : bash
112108 run : |
113- git clone https://github.com/mozilla/grcov.git ~/grcov/
109+ git clone --depth=1 https://github.com/mozilla/grcov.git ~/grcov/
114110 cd ~/grcov
115111 # Hardcode the version of crossbeam-epoch. See
116112 # https://github.com/uutils/coreutils/issues/3680
117- sed -i -e "s|tempfile =|crossbeam-epoch = \"=0.9.8\"\ntempfile =|" Cargo.toml
118- cargo install --path .
113+ # sed -i does not on macOS
114+ sed -i.bak -e "s|tempfile =|crossbeam-epoch = \"=0.9.8\"\ntempfile =|" Cargo.toml
115+ cargo install --path . --locked
119116 cd -
120117# Uncomment when the upstream issue
121118# https://github.com/mozilla/grcov/issues/849 is fixed
0 commit comments