Dan Thesis: Add some jot notes to intro section to remember to flesh out #4216
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
on: | |
push: | |
pull_request: | |
branches: master | |
workflow_dispatch: | |
name: Build | |
defaults: | |
run: | |
shell: bash | |
working-directory: code | |
env: | |
is_deployment: ${{ github.ref == 'refs/heads/master' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') }} | |
jobs: | |
auto-cancel: | |
if: | | |
github.event_name == 'pull_request' | |
|| github.event_name == 'workflow_dispatch' | |
|| (github.event_name == 'push' && (github.ref == 'refs/heads/master' || contains(github.event.head_commit.message, '[workflow-trigger]'))) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/cancel-workflow-action@0.9.0 | |
with: | |
access_token: ${{ github.token }} | |
build: | |
needs: auto-cancel | |
name: "Build & Deploy" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: "Update apt package list" | |
run: sudo apt-get update | |
- name: "Install system requirements" | |
run: sudo apt-get install -y libgmp-dev python3 graphviz doxygen fonts-lmodern texlive-bibtex-extra texlive-latex-extra texlive-science texlive-xetex texlive-luatex g++ default-jdk mono-devel inkscape | |
- name: "Install Stack" | |
uses: haskell/actions/setup@v1 | |
with: | |
enable-stack: true | |
stack-no-global: true | |
stack-version: 'latest' | |
- name: "Cache dependencies" | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.stack | |
~/.cabal/packages | |
~/.cabal/store | |
code/.stack-work/ | |
code/website/.stack-work/ | |
~/.local/bin/graphmod | |
key: ${{ runner.os }}-store-${{ hashFiles('code/stack.yaml') }} | |
- name: "Clean previous run" | |
run: make clean | |
- name: "Update PATH" | |
run: | | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
echo "$HOME/.swift/usr/bin" >> $GITHUB_PATH | |
- name: "HLint" | |
run: make hot_hlint | |
- name: "Install dependencies" | |
run: make stackArgs="--no-terminal" deps | |
- name: "Build" | |
run: make code stackArgs="--no-terminal" GHCFLAGS="-Werror" | |
- name: "Test built artifacts against stable" | |
run: make stackArgs="--no-terminal" GHCFLAGS="-Werror" NOISY=yes | |
- name: "Compile generated TeX artifacts" | |
run: make tex SUMMARIZE_TEX=yes | |
- name: "Compile generated software artifacts" | |
run: make gool | |
- name: "Create Doxygen for generated software artifacts" | |
run: make doxygen | |
- name: "Generate Haddock docs (as test)" | |
run: make docs | |
if: ${{ !fromJSON(env.is_deployment) }} | |
- name: "Generate Haddock docs (full + std)" | |
run: FULL=1 make docs | |
if: ${{ fromJSON(env.is_deployment) }} | |
- name: "Generate module dependency graphs" | |
run: make graphs | |
- name: "Analyze Drasil code" | |
run: make analysis | |
- name: "Convert analysis graphs into dot and circo SVGs" # only needed in deployments, not required for tests | |
run: make convertAnalyzed | |
if: ${{ fromJSON(env.is_deployment) }} | |
- name: "Build website generator" | |
run: make website | |
- name: "Build website" | |
run: | | |
LABEL_FILE=/tmp/ci_build_failures \ | |
MANAGED_LABEL_FILE=/tmp/ci_managed_labels \ | |
ALL_FUNCTIONS_FILE=$(mktemp) \ | |
SHELL_OPTS_FILE=$(mktemp) \ | |
bash scripts/deploy_wrapper.bash | |
- name: "Deploy 🚀" | |
if: ${{ fromJSON(env.is_deployment) }} | |
uses: JamesIves/github-pages-deploy-action@4.1.3 | |
with: | |
git-config-name: ${{ secrets.BOT_NAME }} | |
git-config-email: ${{ secrets.BOT_EMAIL }} | |
token: ${{ secrets.BOT_TOKEN }} | |
branch: gh-pages | |
folder: code/deploy | |
commit-message: "${{ secrets.BOT_NAME }} deploy of master@${{ github.sha }}" |