Skip to content

Commit

Permalink
[ci] move Windows/MSYS2 jobs to a new workflow named 'Windows'
Browse files Browse the repository at this point in the history
  • Loading branch information
umarcor committed Jun 12, 2021
1 parent 9bbfee4 commit 560d3a0
Show file tree
Hide file tree
Showing 5 changed files with 154 additions and 122 deletions.
24 changes: 24 additions & 0 deletions .github/generate-job-matrix.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env python3

print('::set-output name=matrix::' + str([
{
'board': 'UPduino_v3',
'design': 'MinimalBoot',
'bitstream': 'neorv32_UPduino_v3_MinimalBoot.bin'
}, {
'board': 'UPduino_v3',
'design': 'UP5KDemo',
'bitstream': 'neorv32_UPduino_v3_UP5KDemo.bin'
}, {
'board': 'Fomu',
'design': 'Minimal',
'bitstream': 'neorv32_Fomu_pvt_Minimal.bit'
}, {
'board': 'Fomu',
'design': 'MinimalBoot',
'bitstream': 'neorv32_Fomu_pvt_MinimalBoot.bit'
}, {
'board': 'Fomu',
'design': 'UP5KDemo',
'bitstream': 'neorv32_Fomu_pvt_UP5KDemo.bit'
}]))
70 changes: 4 additions & 66 deletions .github/workflows/Implementation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,32 +23,12 @@ jobs:

steps:

- name: '🧰 Repository Checkout'
uses: actions/checkout@v2

- name: '🔧 Generate examples matrix'
id: generate
shell: python
run: |
print('::set-output name=matrix::' + str([
{
'board': 'UPduino_v3',
'design': 'MinimalBoot',
'bitstream': 'neorv32_UPduino_v3_MinimalBoot.bin'
}, {
'board': 'UPduino_v3',
'design': 'UP5KDemo',
'bitstream': 'neorv32_UPduino_v3_UP5KDemo.bin'
}, {
'board': 'Fomu',
'design': 'Minimal',
'bitstream': 'neorv32_Fomu_pvt_Minimal.bit'
}, {
'board': 'Fomu',
'design': 'MinimalBoot',
'bitstream': 'neorv32_Fomu_pvt_MinimalBoot.bit'
}, {
'board': 'Fomu',
'design': 'UP5KDemo',
'bitstream': 'neorv32_Fomu_pvt_UP5KDemo.bit'
}]))
run: ./.github/generate-job-matrix.py


All-in-one:
Expand Down Expand Up @@ -79,45 +59,3 @@ jobs:
path: |
setups/examples/${{ matrix.bitstream }}
setups/osflow/${{ matrix.board }}/*-report.txt
MSYS2:
needs: Matrix
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
platform: [
{icon: '⬛', installs: 'MINGW32', arch: i686, pkg: 'mcode' },
{icon: '🟦', installs: 'MINGW64', arch: x86_64, pkg: 'llvm' },
]
example: ${{ fromJson(needs.Matrix.outputs.matrix) }}
name: '${{ matrix.platform.icon }} ${{ matrix.platform.installs }} | ${{ matrix.example.board }} · ${{ matrix.example.design }}'
defaults:
run:
shell: msys2 {0}
steps:

- name: '${{ matrix.platform.icon }} Setup MSYS2'
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.platform.installs }}
update: true
install: >
make
mingw-w64-${{ matrix.platform.arch }}-yosys
mingw-w64-${{ matrix.platform.arch }}-nextpnr
mingw-w64-${{ matrix.platform.arch }}-icestorm
- name: '⚙️ git config'
run: git config --global core.autocrlf input
shell: bash

- name: '🧰 Checkout'
uses: actions/checkout@v2
with:
# The command 'git describe' (used for version) needs the history.
fetch-depth: 0

- name: '🚧 Generate ${{ matrix.example.board }} ${{ matrix.example.design }} bitstream'
run: make -C setups/examples BOARD=${{ matrix.example.board }} ${{ matrix.example.design }}
54 changes: 0 additions & 54 deletions .github/workflows/Processor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,57 +96,3 @@ jobs:
uses: VUnit/vunit_action@master
with:
cmd: ./sim/run.py --ci-mode -v


VUnit-MSYS2:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include: [
{icon: '⬛', installs: 'MINGW32', arch: i686, pkg: 'mcode' },
{icon: '🟦', installs: 'MINGW64', arch: x86_64, pkg: 'llvm' },
]
name: '${{ matrix.icon }} ${{ matrix.installs }} | VUnit'
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:
# The command 'git describe' (used for version) needs the history.
fetch-depth: 0

- name: '${{ matrix.icon }} Setup MSYS2'
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.installs }}
update: true
install: >
make
mingw-w64-${{ matrix.arch }}-ghdl-${{ matrix.pkg }}
mingw-w64-${{ matrix.arch }}-python-pip
mingw-w64-${{ matrix.arch }}-riscv64-unknown-elf-gcc
- name: '⚙️ Build and install Processor Check software'
run: |
make -C sw/example/processor_check \
RISCV_TOOLCHAIN=riscv64-unknown-elf \
clean_all \
USER_FLAGS+=-DRUN_CHECK \
USER_FLAGS+=-DUART0_SIM_MODE \
MARCH=-march=rv32imac \
info \
all
- name: '🐍 Install VUnit'
run: pip install vunit_hdl

- name: '🚧 Run Processor Hardware Tests with VUnit'
run: ./sim/run.py --ci-mode -v
122 changes: 122 additions & 0 deletions .github/workflows/Windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: Windows

on:
push:
branches:
- master
schedule:
- cron: '0 0 * * 5'
workflow_dispatch:

jobs:


Matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.generate.outputs.matrix }}

steps:

- name: '🧰 Repository Checkout'
uses: actions/checkout@v2

- name: '🔧 Generate examples matrix'
id: generate
run: ./.github/generate-job-matrix.py


Implementation:
needs: Matrix
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
platform: [
{icon: '⬛', installs: 'MINGW32', arch: i686, pkg: 'mcode' },
{icon: '🟦', installs: 'MINGW64', arch: x86_64, pkg: 'llvm' },
]
example: ${{ fromJson(needs.Matrix.outputs.matrix) }}
name: '${{ matrix.platform.icon }} ${{ matrix.platform.installs }} | ${{ matrix.example.board }} · ${{ matrix.example.design }}'
defaults:
run:
shell: msys2 {0}
steps:

- name: '${{ matrix.platform.icon }} Setup MSYS2'
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.platform.installs }}
update: true
install: >
make
mingw-w64-${{ matrix.platform.arch }}-yosys
mingw-w64-${{ matrix.platform.arch }}-nextpnr
mingw-w64-${{ matrix.platform.arch }}-icestorm
- name: '⚙️ git config'
run: git config --global core.autocrlf input
shell: bash

- name: '🧰 Checkout'
uses: actions/checkout@v2
with:
# The command 'git describe' (used for version) needs the history.
fetch-depth: 0

- name: '🚧 Generate ${{ matrix.example.board }} ${{ matrix.example.design }} bitstream'
run: make -C setups/examples BOARD=${{ matrix.example.board }} ${{ matrix.example.design }}


Processor:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include: [
{icon: '⬛', installs: 'MINGW32', arch: i686, pkg: 'mcode' },
{icon: '🟦', installs: 'MINGW64', arch: x86_64, pkg: 'llvm' },
]
name: '${{ matrix.icon }} ${{ matrix.installs }} | VUnit'
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:
# The command 'git describe' (used for version) needs the history.
fetch-depth: 0

- name: '${{ matrix.icon }} Setup MSYS2'
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.installs }}
update: true
install: >
make
mingw-w64-${{ matrix.arch }}-ghdl-${{ matrix.pkg }}
mingw-w64-${{ matrix.arch }}-python-pip
mingw-w64-${{ matrix.arch }}-riscv64-unknown-elf-gcc
- name: '⚙️ Build and install Processor Check software'
run: |
make -C sw/example/processor_check \
RISCV_TOOLCHAIN=riscv64-unknown-elf \
clean_all \
USER_FLAGS+=-DRUN_CHECK \
USER_FLAGS+=-DUART0_SIM_MODE \
MARCH=-march=rv32imac \
info \
all
- name: '🐍 Install VUnit'
run: pip install vunit_hdl

- name: '🚧 Run Processor Hardware Tests with VUnit'
run: ./sim/run.py --ci-mode -v
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[![GitHub Pages](https://img.shields.io/website.svg?label=stnolting.github.io%2Fneorv32&longCache=true&style=flat-square&url=http%3A%2F%2Fstnolting.github.io%2Fneorv32%2Findex.html&logo=GitHub)](https://stnolting.github.io/neorv32)
[![Processor](https://img.shields.io/github/workflow/status/stnolting/neorv32/Processor/master?longCache=true&style=flat-square&label=Processor&logo=Github%20Actions&logoColor=fff)](https://github.com/stnolting/neorv32/actions?query=workflow%3AProcessor)
[![riscv-arch-test](https://img.shields.io/github/workflow/status/stnolting/neorv32/riscv-arch-test/master?longCache=true&style=flat-square&label=riscv-arch-test&logo=Github%20Actions&logoColor=fff)](https://github.com/stnolting/neorv32/actions?query=workflow%3Ariscv-arch-test)
[![Documentation](https://img.shields.io/github/workflow/status/stnolting/neorv32/Documentation/master?longCache=true&style=flat-square&label=Documentation&logo=Github%20Actions&logoColor=fff)](https://github.com/stnolting/neorv32/actions?query=workflow%3ADocumentation)

[![riscv-arch-test](https://img.shields.io/github/workflow/status/stnolting/neorv32/riscv-arch-test/master?longCache=true&style=flat-square&label=riscv-arch-test&logo=Github%20Actions&logoColor=fff)](https://github.com/stnolting/neorv32/actions?query=workflow%3Ariscv-arch-test)
[![Processor](https://img.shields.io/github/workflow/status/stnolting/neorv32/Processor/master?longCache=true&style=flat-square&label=Processor&logo=Github%20Actions&logoColor=fff)](https://github.com/stnolting/neorv32/actions?query=workflow%3AProcessor)
[![Implementation](https://img.shields.io/github/workflow/status/stnolting/neorv32/Implementation/master?longCache=true&style=flat-square&label=Implementation&logo=Github%20Actions&logoColor=fff)](https://github.com/stnolting/neorv32/actions?query=workflow%3AImplementation)
[![Windows](https://img.shields.io/github/workflow/status/stnolting/neorv32/Windows/master?longCache=true&style=flat-square&label=Windows&logo=Github%20Actions&logoColor=fff)](https://github.com/stnolting/neorv32/actions?query=workflow%3AWindows)

[![NEORV32](https://github.com/raw/stnolting/neorv32/master/docs/figures/neorv32_logo_dark.png)](https://github.com/stnolting/neorv32)

Expand Down

0 comments on commit 560d3a0

Please sign in to comment.