Skip to content

uh, try rewriting clock timer builder with typestate pattern? #68

uh, try rewriting clock timer builder with typestate pattern?

uh, try rewriting clock timer builder with typestate pattern? #68

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
- name: test
run: cargo test --verbose
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
docs:
needs:
- test
# 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 --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 "[email protected]"
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