Skip to content

Commit

Permalink
ci: test building docs on MSYS2
Browse files Browse the repository at this point in the history
  • Loading branch information
umarcor committed Apr 21, 2021
1 parent ee3f4e0 commit 2eb3465
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 0 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/msys2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: MSYS2

on:
push:
pull_request:
workflow_dispatch:

jobs:

win-build:
runs-on: windows-latest
strategy:
fail-fast: false
max-parallel: 2
matrix:
include: [
{icon: '🟪', installs: 'MINGW32', arch: i686 },
{icon: '🟦', installs: 'MINGW64', arch: x86_64 },
]
name: '${{ matrix.icon }} Docs · ${{ matrix.installs }}'
env:
MINGW_ARCH: ${{ matrix.installs }}
defaults:
run:
shell: msys2 {0}
steps:

- name: '⚙️ git config'
run: git config --global core.autocrlf input
shell: bash

- name: '🧰 Checkout'
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: '⚙️ Install netlistsvg'
shell: bash
run: |
npm install -g netlistsvg
echo "$(dirname $(which node))" >> extra.paths
echo "$(dirname $(which netlistsvg))" >> extra.paths
- name: '${{ matrix.icon }} Setup MSYS2'
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.installs }}
update: true
install: >-
gcc
git
make
mingw-w64-${{ matrix.arch }}-python-lxml
mingw-w64-${{ matrix.arch }}-python-pip
mingw-w64-${{ matrix.arch }}-python-sphinx
mingw-w64-${{ matrix.arch }}-python-wheel
mingw-w64-${{ matrix.arch }}-yosys
- name: '🐍 Install sphinx_symbiflow_theme'
run: pip install -U nmigen git+http://github.com/SymbiFlow/sphinx_symbiflow_theme.git@master#egg=sphinx_symbiflow_theme

- name: '📓 Build Docs'
run: |
#while read item; do PATH="$PATH:$(cygpath -u "$item")"; done <<<$(sed 's#\\#/#g' extra.paths)
PATH="$PATH:/c/Program Files/nodejs/:/c/npm/prefix/"
make -C docs html
- name: '📤 Upload artifact: docs/_build/html'
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.installs }}-docs
path: docs/_build/html
2 changes: 2 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
'sphinxcontrib_hdl_diagrams',
]

hdl_diagram_yosys = 'system'

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

Expand Down

0 comments on commit 2eb3465

Please sign in to comment.