Additional tree-morph selection strategies #1362
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: "Coverage" | |
on: | |
pull_request: | |
paths: | |
- conjure_oxide/** | |
- solvers/** | |
- crates/** | |
- conjure_oxide/tests/** | |
- tools/coverage.sh | |
- .github/workflows/code-coverage.yml | |
workflow_dispatch: | |
env: | |
rust_release: nightly | |
SCCACHE_GHA_ENABLED: "true" | |
RUSTC_WRAPPER: "sccache" | |
SCCACHE_GHA_VERSION: 5 | |
jobs: | |
doc-coverage: | |
name: "Documentation" | |
timeout-minutes: 20 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v2 | |
- name: Run sccache-cache | |
uses: mozilla-actions/[email protected] | |
- name: Install rust ${{ env.rust_release }} | |
run: rustup update ${{ env.rust_release }} && rustup default ${{ env.rust_release }} | |
- name: Disable rust-lld (to fix linkme) | |
run: | | |
echo RUSTFLAGS=${RUSTFLAGS}\ -Zlinker-features=-lld >> $GITHUB_ENV | |
echo RUSTDOCFLAGS=${RUSTDOCFLAGS}\ -Zlinker-features=-lld >> $GITHUB_ENV | |
if: env.rust_release == 'nightly' | |
- name: Install pandoc | |
uses: pandoc/actions/setup@v1 | |
- name: Generate documentation coverage report | |
run: | | |
echo "# Documentation Coverage Report" >> $GITHUB_STEP_SUMMARY | |
echo "" >> $GITHUB_STEP_SUMMARY | |
./tools/ci/generate-doc-coverage-summary-md.bash >> $GITHUB_STEP_SUMMARY | |
echo "" >> $GITHUB_STEP_SUMMARY | |
echo "PR: [#${{github.event.pull_request.number}}](${{github.event.pull_request.html_url}})" >> $GITHUB_STEP_SUMMARY | |
echo "Commit: [${{github.event.pull_request.head.sha}}](https://github.com/conjure-cp/conjure-oxide/compare/${{github.event.pull_request.head.sha}})" >> $GITHUB_STEP_SUMMARY | |
echo "" >> $GITHUB_STEP_SUMMARY | |
./tools/ci/generate-doc-coverage-report-md.bash >> $GITHUB_STEP_SUMMARY | |
- name: Generate summary | |
run: | | |
./tools/ci/generate-doc-coverage-summary-md.bash > pr-doc-coverage-summary.txt | |
- name: Upload summary as artifact (for later use) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pr-doc-coverage-summary | |
path: pr-doc-coverage-summary.txt | |
overwrite: false | |
coverage: | |
name: "Code" | |
timeout-minutes: 20 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v2 | |
- name: Get Sha | |
id: sha | |
run: | | |
if [[ ${{ github.event_name }} == 'pull_request' ]] | |
then | |
echo -e "sha=${{ github.event.pull_request.head.sha }}" >> "$GITHUB_OUTPUT" | |
echo -e "sha=${{ github.event.pull_request.head.sha }}" | |
else | |
echo -e "sha=${{ github.sha }}" >> "$GITHUB_OUTPUT" | |
echo -e "sha=${{ github.sha }}" | |
fi | |
- name: Run sccache-cache | |
uses: mozilla-actions/[email protected] | |
- name: Install rust ${{ env.rust_release }} | |
run: rustup update ${{ env.rust_release }} && rustup default ${{ env.rust_release }} | |
- name: Disable rust-lld (to fix linkme) | |
run: | | |
echo RUSTFLAGS=${RUSTFLAGS}\ -Zlinker-features=-lld >> $GITHUB_ENV | |
echo RUSTDOCFLAGS=${RUSTDOCFLAGS}\ -Zlinker-features=-lld >> $GITHUB_ENV | |
if: env.rust_release == 'nightly' | |
- uses: ./.github/actions/install-conjure | |
with: | |
os_arch: linux | |
version: 2.5.1 | |
- name: Generate code coverage reports | |
run: | | |
./tools/coverage.sh | |
- run: | | |
mkdir -p deploy/ | |
cp -r target/debug/coverage/* deploy/ # html | |
cp target/debug/lcov.info deploy/ # used for comments | |
echo "${{github.event.pull_request.number}}" > deploy/prnumber | |
- name: Archive code coverage results for deployment | |
uses: actions/upload-artifact@v4 | |
with: | |
name: code-coverage-${{ steps.sha.outputs.sha }} | |
path: deploy/** | |