-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
156 additions
and
146 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
name: feature check | ||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
run: | ||
|
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
name: tests | ||
on: | ||
push: | ||
branches: | ||
- "**" | ||
workflow_dispatch: | ||
|
||
env: | ||
RUSTFLAGS: "-Cinstrument-coverage -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code" | ||
|
||
jobs: | ||
test: | ||
name: run | ||
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 | ||
with: | ||
error-on-warn: false | ||
|
||
feature-check: | ||
uses: ./.github/workflows/feature-check.yml | ||
|
||
verify-gen-features: | ||
uses: ./.github/workflows/verify-gen-features.yml | ||
|
||
docs: | ||
name: run | ||
needs: | ||
- test | ||
- clippy | ||
- feature-check | ||
- verify-gen-features | ||
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 "[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 |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
name: verify generated features | ||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
run: | ||
|