|
| 1 | +name: MSYS2 |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + pull_request: |
| 6 | + workflow_dispatch: |
| 7 | + |
| 8 | +jobs: |
| 9 | + |
| 10 | + win-build: |
| 11 | + runs-on: windows-latest |
| 12 | + strategy: |
| 13 | + fail-fast: false |
| 14 | + max-parallel: 2 |
| 15 | + matrix: |
| 16 | + include: [ |
| 17 | + {icon: '🟪', installs: 'MINGW32', arch: i686 }, |
| 18 | + {icon: '🟦', installs: 'MINGW64', arch: x86_64 }, |
| 19 | + ] |
| 20 | + name: '${{ matrix.icon }} Docs · ${{ matrix.installs }}' |
| 21 | + env: |
| 22 | + MINGW_ARCH: ${{ matrix.installs }} |
| 23 | + defaults: |
| 24 | + run: |
| 25 | + shell: msys2 {0} |
| 26 | + steps: |
| 27 | + |
| 28 | + - name: '⚙️ git config' |
| 29 | + run: git config --global core.autocrlf input |
| 30 | + shell: bash |
| 31 | + |
| 32 | + - name: '🧰 Checkout' |
| 33 | + uses: actions/checkout@v2 |
| 34 | + with: |
| 35 | + fetch-depth: 0 |
| 36 | + |
| 37 | + - name: '⚙️ Install netlistsvg' |
| 38 | + shell: bash |
| 39 | + run: | |
| 40 | + npm install -g netlistsvg |
| 41 | + echo "$(dirname $(which node))" >> extra.paths |
| 42 | + echo "$(dirname $(which netlistsvg))" >> extra.paths |
| 43 | +
|
| 44 | + - name: '${{ matrix.icon }} Setup MSYS2' |
| 45 | + uses: msys2/setup-msys2@v2 |
| 46 | + with: |
| 47 | + msystem: ${{ matrix.installs }} |
| 48 | + update: true |
| 49 | + install: >- |
| 50 | + gcc |
| 51 | + git |
| 52 | + make |
| 53 | + mingw-w64-${{ matrix.arch }}-python-lxml |
| 54 | + mingw-w64-${{ matrix.arch }}-python-pip |
| 55 | + mingw-w64-${{ matrix.arch }}-python-sphinx |
| 56 | + mingw-w64-${{ matrix.arch }}-python-wheel |
| 57 | + mingw-w64-${{ matrix.arch }}-yosys |
| 58 | +
|
| 59 | + - name: '🐍 Install sphinx_symbiflow_theme' |
| 60 | + run: pip install -U nmigen git+http://github.com/SymbiFlow/sphinx_symbiflow_theme.git@master#egg=sphinx_symbiflow_theme |
| 61 | + |
| 62 | + - name: '📓 Build Docs' |
| 63 | + run: | |
| 64 | + #while read item; do PATH="$PATH:$(cygpath -u "$item")"; done <<<$(sed 's#\\#/#g' extra.paths) |
| 65 | + PATH="$PATH:/c/Program Files/nodejs/:/c/npm/prefix/" |
| 66 | + make -C docs html |
| 67 | +
|
| 68 | + - name: '📤 Upload artifact: docs/_build/html' |
| 69 | + uses: actions/upload-artifact@v2 |
| 70 | + with: |
| 71 | + name: ${{ matrix.installs }}-docs |
| 72 | + path: docs/_build/html |
0 commit comments