Skip to content

Commit

Permalink
Update rootstock on 2020-11-10
Browse files Browse the repository at this point in the history
  • Loading branch information
agitter committed Nov 10, 2020
2 parents cfa2a35 + 97b2948 commit 3d73f75
Show file tree
Hide file tree
Showing 24 changed files with 517 additions and 178 deletions.
34 changes: 28 additions & 6 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,33 @@ image: ubuntu
services:
- docker

# Set SPELLCHECK to true to enable Pandoc spellchecking
environment:
SPELLCHECK: true

install:
# Create the message with the triggering commit before install so it is
# available if the build fails
- TRIGGERING_COMMIT=${APPVEYOR_PULL_REQUEST_HEAD_COMMIT:-APPVEYOR_REPO_COMMIT}
- appveyor AddMessage "commit $TRIGGERING_COMMIT"
- JOB_MESSAGE=" for commit $TRIGGERING_COMMIT "
- source ci/install.sh

test_script:
- bash build/build.sh
- MANUSCRIPT_FILENAME=manuscript-$APPVEYOR_BUILD_VERSION-${TRIGGERING_COMMIT:0:7}
- cp output/manuscript.html $MANUSCRIPT_FILENAME.html
- cp output/manuscript.pdf $MANUSCRIPT_FILENAME.pdf
- appveyor PushArtifact $MANUSCRIPT_FILENAME.html
- appveyor PushArtifact $MANUSCRIPT_FILENAME.pdf
- |
if [ "${SPELLCHECK:-}" = "true" ]; then
SPELLING_ERRORS_FILENAME=spelling-errors-$APPVEYOR_BUILD_VERSION-${TRIGGERING_COMMIT:0:7}.txt
cp output/spelling-errors.txt $SPELLING_ERRORS_FILENAME
appveyor PushArtifact $SPELLING_ERRORS_FILENAME
SPELLING_ERROR_LOCATIONS_FILENAME=spelling-error-locations-$APPVEYOR_BUILD_VERSION-${TRIGGERING_COMMIT:0:7}.txt
cp output/spelling-error-locations.txt $SPELLING_ERROR_LOCATIONS_FILENAME
appveyor PushArtifact $SPELLING_ERROR_LOCATIONS_FILENAME
fi
build: off

Expand All @@ -46,6 +59,16 @@ cache:
on_success:
- echo "Artifacts available from $APPVEYOR_URL/project/$APPVEYOR_ACCOUNT_NAME/$APPVEYOR_PROJECT_SLUG/builds/$APPVEYOR_BUILD_ID/artifacts"
- echo "Updated PDF available from $APPVEYOR_URL/api/buildjobs/$APPVEYOR_JOB_ID/artifacts/$MANUSCRIPT_FILENAME.pdf"
- appveyor AddMessage "$JOB_MESSAGE is now complete."
- |
if [ "${SPELLCHECK:-}" = "true" ]; then
SPELLING_ERROR_COUNT=($(wc -l $SPELLING_ERROR_LOCATIONS_FILENAME))
appveyor AddMessage " <details><summary>Found $SPELLING_ERROR_COUNT potential spelling error(s). Preview:</summary>$(head -n 100 $SPELLING_ERROR_LOCATIONS_FILENAME)"
appveyor AddMessage "... </details>"
fi
on_failure:
- appveyor AddMessage "$JOB_MESSAGE failed."

# The following lines can be safely deleted, which will disable AppVeyorBot
# notifications in GitHub pull requests
Expand All @@ -55,7 +78,6 @@ on_success:
notifications:
- provider: GitHubPullRequest
template: "AppVeyor [build {{buildVersion}}]({{buildUrl}})
{{#jobs}}{{#messages}} for {{message}} by @{{&commitAuthorUsername}}{{/messages}}{{/jobs}}
{{#passed}} is now complete. The rendered manuscript from this build is temporarily available for download at:\n\n{{/passed}}
{{#failed}} failed.{{/failed}}
{{#jobs}}{{#artifacts}}- [`{{fileName}}`]({{permalink}})\n{{/artifacts}}{{/jobs}}"
{{#jobs}}{{#messages}}{{{message}}}{{/messages}}{{/jobs}}
{{#passed}}The rendered manuscript from this build is temporarily available for download at:\n\n
{{#jobs}}{{#artifacts}}- [`{{fileName}}`]({{permalink}})\n{{/artifacts}}{{/jobs}}{{/passed}}"
19 changes: 16 additions & 3 deletions .github/workflows/manubot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,38 @@ jobs:
runs-on: ubuntu-latest
env:
GITHUB_PULL_REQUEST_SHA: ${{ github.event.pull_request.head.sha }}
SPELLCHECK: true
steps:
- name: Set Environment Variables
run: |
TRIGGERING_SHA=${GITHUB_PULL_REQUEST_SHA:-$GITHUB_SHA}
TRIGGERING_SHA_7=${TRIGGERING_SHA::7}
echo "::set-env name=TRIGGERING_SHA_7::$TRIGGERING_SHA_7"
echo "TRIGGERING_SHA_7=${TRIGGERING_SHA::7}" >> $GITHUB_ENV
echo "TRIGGERING_SHA: $TRIGGERING_SHA"
- name: Checkout Repository
uses: actions/checkout@v2
with:
# fetch entire commit history to support get_rootstock_commit
fetch-depth: 0
- name: Cache
uses: actions/cache@v1
with:
path: ci/cache
key: ci-cache-${{ github.ref }}
restore-keys: |
ci-cache-refs/heads/master
- name: Install Environment
uses: goanpeca/setup-miniconda@v1
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: manubot
environment-file: build/environment.yml
auto-activate-base: false
miniconda-version: 'latest'
- name: Install Spellcheck
shell: bash --login {0}
run: |
if [ "${SPELLCHECK:-}" = "true" ]; then
bash ci/install-spellcheck.sh
fi
- name: Build Manuscript
shell: bash --login {0}
run: bash build/build.sh
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ webpage/v
# Manubot cache directory
ci/cache

# Pandoc filters downloaded during continuous integration setup
build/pandoc/filters/spellcheck.lua

# Python
__pycache__/
*.pyc
Expand Down
Loading

0 comments on commit 3d73f75

Please sign in to comment.