[Draft] Add appendix about migration #199
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 DocBook xslTNG PR | |
on: | |
pull_request_target: | |
types: [assigned, opened, edited, synchronize, reopened] | |
branches: | |
- main | |
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 }} | |
steps: | |
- name: Checkout | |
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 | |
build-pr: | |
name: Build xslTNG on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
needs: check_branch | |
env: | |
HAVE_ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN != '' }} | |
CIWORKFLOW: yes | |
CI_SHA1: ${{ github.sha }} | |
CI_BUILD_NUM: ${{ github.run_number }} | |
CI_PROJECT_USERNAME: ${{ github.repository_owner }} | |
CI_PROJECT_REPONAME: ${{ needs.check_branch.outputs.reponame }} | |
CI_BRANCH: ${{ needs.check_branch.outputs.branch }} | |
CI_TAG: ${{ needs.check_branch.outputs.tag }} | |
strategy: | |
matrix: | |
os: [macos-11, ubuntu-20.04] | |
steps: | |
- name: Install platform-independent Python modules | |
run: | | |
python3 -m pip install pygments==2.14.0 click cython | |
# Test the build on Mac | |
- name: Install dependencies on Mac | |
if: matrix.os == 'macos-11' | |
run: | | |
brew install rsync libxml2 libxslt sass/sass/sass | |
python3 -m pip install saxonche | |
python3 -m pip install --no-binary lxml html5-parser | |
- name: Checkout the pull request on Mac | |
if: matrix.os == 'macos-11' | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: 0 | |
- name: Get the latest releases (authenticated request on Mac) | |
if: ${{ matrix.os == 'macos-11' && env.HAVE_ACCESS_TOKEN == 'true' }} | |
run: | | |
mkdir -p build | |
# Don’t attempt to use continuation lines here because Windows | |
curl --request GET --url https://api.github.com/repos/${{ github.repository }}/releases --header 'authorization: Bearer ${{ secrets.ACCESS_TOKEN }}' -o build/releases.json | |
- name: Build on Mac | |
if: matrix.os == 'macos-11' | |
run: | | |
./gradlew -PrequireCompileSuccess=true dist | |
# Test the build on Windows | |
- name: Install dependencies on Windows | |
if: matrix.os == 'windows-2019' | |
uses: crazy-max/ghaction-chocolatey@v2 | |
with: | |
args: install sass | |
- name: Checkout the pull request on Windows | |
if: matrix.os == 'windows-2019' | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: 0 | |
- name: Get the latest releases (authenticated request on Windows) | |
if: ${{ matrix.os == 'windows-2019' && env.HAVE_ACCESS_TOKEN == 'true' }} | |
run: | | |
mkdir -p build | |
# Don’t attempt to use continuation lines here because Windows | |
curl --request GET --url https://api.github.com/repos/${{ github.repository }}/releases --header 'authorization: Bearer ${{ secrets.ACCESS_TOKEN }}' -o build/releases.json | |
- name: Build on Windows | |
if: matrix.os == 'windows-2019' | |
run: | | |
./gradlew -PrequireCompileSuccess=true -PrequireTestSuccess=false dist | |
# Test the build on Linux | |
- name: Install dependencies on Linux | |
if: matrix.os == 'ubuntu-20.04' | |
run: | | |
sudo apt-get update | |
sudo apt-get install epubcheck rsync libxml2-dev libxslt-dev | |
curl -o /tmp/dart.tar.gz -L https://github.com/sass/dart-sass/releases/download/1.56.0/dart-sass-1.56.0-linux-x64.tar.gz | |
cd /tmp && tar zxf dart.tar.gz && sudo mv dart-sass/sass /usr/local/bin | |
python3 -m pip install saxonche | |
python3 -m pip install --no-binary lxml html5-parser | |
- name: Checkout the pull request on Linux | |
if: matrix.os == 'ubuntu-20.04' | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: 0 | |
- name: Get the latest releases (authenticated request on Linux) | |
if: ${{ matrix.os == 'ubuntu-20.04' && env.HAVE_ACCESS_TOKEN == 'true' }} | |
run: | | |
mkdir -p build | |
# Don’t attempt to use continuation lines here because Windows | |
curl --request GET --url https://api.github.com/repos/${{ github.repository }}/releases --header 'authorization: Bearer ${{ secrets.ACCESS_TOKEN }}' -o build/releases.json | |
- name: Build on Linux | |
if: matrix.os == 'ubuntu-20.04' | |
run: | | |
./gradlew -PrequireCompileSuccess=true dist |