Skip to content

maybe these won't count towards code coverage..? #34

maybe these won't count towards code coverage..?

maybe these won't count towards code coverage..? #34

Workflow file for this run

name: push ci
on:
push:
branches:
- "**"
workflow_dispatch:
env:
RUSTFLAGS: "-Cinstrument-coverage -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code"
jobs:
test:
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
runs-on:
- ubuntu-22.04
- ubuntu-24.04
- macos-14
steps:
- name: checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: setup rust
run: rustc --version
- name: build
run: cargo build --verbose --features all-unstable,all-addons
- name: test
run: cargo test --verbose --features all-unstable,all-addons
env:
CARGO_INCREMENTAL: "0"
LLVM_PROFILE_FILE: "target/coverage/test-%m-%p.profraw"
- name: fetch/run grcov
run: |
platform=$(uname)
case $platform in
Darwin)
# macos-14 runners run on apple silicon, so aarch64
curl -Lo grcov.bz2 https://github.com/mozilla/grcov/releases/download/v0.8.19/grcov-aarch64-apple-darwin.tar.bz2
;;
Linux)
curl -Lo grcov.bz2 https://github.com/mozilla/grcov/releases/download/v0.8.19/grcov-x86_64-unknown-linux-musl.tar.bz2
;;
*)
echo weird
exit 1
;;
esac
tar xvf grcov.bz2
rm grcov.bz2
./grcov . -s . -t lcov --binary-path ./target/debug/ --branch --ignore-not-existing -o ./target/coverage/tests.lcov
- name: upload to codecov
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
with:
files: target/coverage/*.lcov
token: ${{ secrets.CODECOV_TOKEN }}
clippy:
uses: ./.github/workflows/clippy.yml
feature-check:
uses: ./.github/workflows/feature-check.yml
verify-gen-features:
uses: ./.github/workflows/verify-gen-features.yml
docs:
needs:
- test
- feature-check
- verify-gen-features
# TODO enable when existing warnings have been cleared
# - clippy
runs-on: ubuntu-24.04
steps:
- name: checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: setup rust
run: rustc --version
- name: install fish shell
run: |
sudo add-apt-repository -yn ppa:fish-shell/release-3
sudo apt-get update
sudo apt-get install fish
- name: generate docs
shell: fish {0}
run: |
set -gx RUSTDOCFLAGS "--cfg docsrs --cfg kiwingay -Z unstable-options --enable-index-page --theme "(pwd)"/.cargo/rustdoc-custom-theme/meadow.css"
set -gx KIWINGAY_DEPLOY_COMMIT_SHORT (string sub --length 8 $KIWINGAY_DEPLOY_COMMIT)
cargo doc --verbose --no-deps --features all-unstable,all-addons --lib -p wiwi -p wiwiwiwiwi
env:
KIWINGAY_DEPLOY_COMMIT: ${{ github.sha }}
- name: checkout gh-pages branch
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
path: gh-pages
ref: gh-pages
- name: deploy docs
shell: fish {0}
run: |
rm -rf gh-pages/*
mv gh-pages/.git gh-pages/git
rm -rf gh-pages/.*
mv gh-pages/git gh-pages/.git
cp -R target/doc/* gh-pages
cp -R target/doc/.* gh-pages
cp .gitignore gh-pages/.gitignore
touch gh-pages/.nojekyll
echo wiwi.kiwin.gay > gh-pages/CNAME
set COMMIT_MESSAGE "(automated) deploy from commit "(git rev-parse HEAD)
cd gh-pages
git config --global user.name "smol"
git config --global user.email "107521333+a-tiny-kirin@users.noreply.github.com"
echo https://meadowsys:${{ secrets.GHPAT }}@github.com > .git/credentials
git config --global credential.helper "store --file=.git/credentials"
git config --unset-all http.https://github.com/.extraheader # https://stackoverflow.com/a/69979203
git add -A
git commit -m "$COMMIT_MESSAGE" --allow-empty
git push