Skip to content

Add Properties Section #25

Add Properties Section

Add Properties Section #25

name: "Continuous Integration (CI)"
on:
workflow_dispatch:
pull_request:
push:
tags:
- '*'
branches:
- main
env:
pandoc-version: 3.1.11.1
pandoc-crossref-version: v0.3.17.0c
pandoc-install-dir: /opt/pandoc
jobs:
markdown-to-pdf:
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: "Checkout chipsalliance/firrtl-spec"
uses: actions/checkout@v3
# We use `git describe` which requires tags
with:
fetch-depth: 0
- name: "Install pandoc ${{ env.pandoc-version }}, pandoc-crossref ${{ env.pandoc-crossref-version }}"
shell: bash
run: |
mkdir -p ${{ env.pandoc-install-dir }}/bin
wget https://github.com/jgm/pandoc/releases/download/${{ env.pandoc-version }}/pandoc-${{ env.pandoc-version }}-linux-amd64.tar.gz -O - | tar -zx -C ${{ env.pandoc-install-dir }}/bin --strip-components 2
wget https://github.com/lierdakil/pandoc-crossref/releases/download/${{ env.pandoc-crossref-version }}/pandoc-crossref-Linux.tar.xz -O - | tar -Jx -C ${{ env.pandoc-install-dir }}/bin
echo "${{ env.pandoc-install-dir }}/bin" >> $GITHUB_PATH
- name: "Check Formatting"
shell: bash
run: |
make format
if ! git diff --quiet; then
echo 'Please run `make format` on your change to apply the following formatting fixes:' >> $GITHUB_STEP_SUMMARY
echo '```diff' >> $GITHUB_STEP_SUMMARY
git diff >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
exit 1
fi
- name: "Install Other Dependencies"
shell: bash
run: |
sudo apt-get update
sudo apt-get install graphviz latexmk texlive-latex-extra texlive-latex-recommended texlive-font-utils
- name: "Markdown -> [pandox] -> [TeXLive] -> PDF"
run: make
- name: "Upload Build Directory"
uses: actions/upload-artifact@v3
with:
name: build
path: build
retention-days: 1
- name: "Create Release If Tagged"
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
fail_on_unmatched_files: true
files: |
build/spec.pdf
build/abi.pdf