[Hotfix] Temporary for Linux musl release. #5462
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- mainnet | |
paths-ignore: | |
- 'docs/**' | |
- 'documentation/**' | |
env: | |
RUST_BACKTRACE: 0 | |
jobs: | |
codecov: | |
name: Code Coverage | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Install Rust Stable | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
components: rustfmt | |
- name: Set up rust-cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Test | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --all --locked --profile ci --features only_testnet | |
env: | |
CARGO_INCREMENTAL: "0" | |
- name: Install dependencies for code coverage | |
run: | | |
sudo apt-get update | |
sudo apt-get -y install binutils-dev libcurl4-openssl-dev zlib1g-dev libdw-dev libiberty-dev | |
- name: Generate coverage report | |
run: | | |
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz | |
tar xzf master.tar.gz | |
cd kcov-master | |
mkdir build && cd build | |
cmake .. && make | |
make install DESTDIR=../../kcov-build | |
cd ../.. | |
rm -rf kcov-master | |
for file in target/ci/deps/*-*; do if [[ "$file" != *\.* ]]; then mkdir -p "target/cov/$(basename $file)"; ./kcov-build/usr/local/bin/kcov --exclude-pattern=/.cargo,/usr/lib --exclude-region='@kcov_skip(start):@kcov_skip(end)' --verify "target/cov/$(basename $file)" "$file"; fi done | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |