730: Clarify (and correct) rules for maps as instances of function types #639
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: build-pr | |
on: | |
pull_request_target: | |
types: [assigned, opened, edited, synchronize, reopened] | |
branches: | |
- master | |
jobs: | |
check_branch: | |
runs-on: ubuntu-latest | |
outputs: | |
branch: ${{ steps.check_step.outputs.branch }} | |
reponame: ${{ steps.check_step.outputs.reponame }} | |
tag: ${{ steps.check_step.outputs.tag }} | |
mbase: ${{ steps.get_mb.outputs.mbase }} | |
steps: | |
- name: Checkout the repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Get branch name, etc. | |
id: check_step | |
run: | | |
raw=${{ github.repository }} | |
reponame=${raw##*/} | |
echo "reponame=$reponame" >> $GITHUB_OUTPUT | |
raw=$(git branch -r --contains ${{ github.ref }}) | |
branch=${raw##*/} | |
echo "branch=$branch" >> $GITHUB_OUTPUT | |
tag="" | |
if [ ${{ github.ref_type }} = "tag" ]; then | |
tag=${{ github.ref_name }} | |
echo "Running in $reponame on $branch for $tag" | |
else | |
echo "Running in $reponame on $branch" | |
fi | |
echo "tag=$tag" >> $GITHUB_OUTPUT | |
- name: Checkout the pull request | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: 0 | |
- name: Get the merge-base for this PR | |
id: get_mb | |
run: | | |
git checkout master | |
mb=$(git merge-base master ${{ github.event.pull_request.head.sha }}) | |
echo "mbase=$mb" >> $GITHUB_OUTPUT | |
build-and-deploy-pr: | |
runs-on: ubuntu-latest | |
needs: check_branch | |
env: | |
HAVE_ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN != '' }} | |
AUTODIFF: ${{ secrets.DIFFURI != '' && secrets.DIFFPW != '' }} | |
PR_NUMBER: ${{ github.event.number }} | |
steps: | |
- name: Install dependencies | |
run: sudo apt-get install tidy rsync graphviz | |
- name: Get the pull request | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Save XML | |
run: | | |
mkdir /tmp/pr-sources | |
mkdir /tmp/pr-sources/{etc,schema,specifications} | |
rsync -ar ./etc/ /tmp/pr-sources/etc/ | |
rsync -ar ./schema/ /tmp/pr-sources/schema/ | |
rsync -ar ./specifications/ /tmp/pr-sources/specifications/ | |
find /tmp/pr-sources -type f -name "*.xsl" -exec rm {} \; | |
- name: Checkout the merge base branch | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ needs.check_branch.outputs.mbase }} | |
- name: Update XML | |
run: rsync -var /tmp/pr-sources/ ./ | |
- name: Build specifications | |
run: | | |
./gradlew | |
- name: Setup DeltaXML | |
if: ${{ env.AUTODIFF == 'true' }} | |
run: | | |
curl -s ${{ secrets.DIFFURI }} | openssl enc -aes-256-cbc -salt -pbkdf2 -d -k ${{ secrets.DIFFPW }} | tar zxf - | |
- name: Make DeltaXML diffs | |
if: ${{ env.AUTODIFF == 'true' }} | |
run: | | |
sh tools/autodiff.sh build/www/xpath-functions-40/Overview.html | |
sh tools/autodiff.sh build/www/xslt-40/Overview.html | |
sh tools/autodiff.sh build/www/xquery-40/xpath-40.html xpath-40-autodiff.html | |
sh tools/autodiff.sh build/www/xquery-40/xquery-40.html xquery-40-autodiff.html | |
sh tools/autodiff.sh build/www/xquery-40/shared-40.html shared-40-autodiff.html | |
sh tools/autodiff.sh build/www/xpath-datamodel-40/Overview.html | |
sh tools/autodiff.sh build/www/xslt-xquery-serialization-40/Overview.html | |
- name: Cleanup DeltaXML | |
if: ${{ env.AUTODIFF == 'true' }} | |
run: | | |
rm -rf tools/deltaxml | |
- name: Deploy | |
if: ${{ env.HAVE_ACCESS_TOKEN == 'true' }} | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: build/www | |
token: ${{ secrets.ACCESS_TOKEN }} | |
branch: gh-pages | |
target-folder: /pr/${{ github.event.number }} |