60 lines
1.3 KiB
YAML
60 lines
1.3 KiB
YAML
|
name: Scala CI
|
||
|
|
||
|
on: [push, pull_request]
|
||
|
|
||
|
jobs:
|
||
|
build:
|
||
|
runs-on: ubuntu-latest
|
||
|
timeout-minutes: 90
|
||
|
|
||
|
steps:
|
||
|
- uses: actions/checkout@v2
|
||
|
with:
|
||
|
submodules: 'recursive'
|
||
|
|
||
|
- name: Set up JDK 11
|
||
|
uses: actions/setup-java@v2
|
||
|
with:
|
||
|
java-version: '11'
|
||
|
distribution: 'adopt'
|
||
|
|
||
|
- name: Cache pip
|
||
|
uses: actions/cache@v2
|
||
|
with:
|
||
|
path: ~/.cache/pip
|
||
|
key: ${{ runner.os }}-pip-v2
|
||
|
restore-keys: |
|
||
|
${{ runner.os }}-pip-
|
||
|
|
||
|
- name: Cache SBT
|
||
|
uses: actions/cache@v2
|
||
|
with:
|
||
|
path: |
|
||
|
~/.ivy2/cache
|
||
|
~/.sbt
|
||
|
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }}
|
||
|
|
||
|
- name: Cache tools
|
||
|
id: tools
|
||
|
uses: actions/cache@v2
|
||
|
with:
|
||
|
path: |
|
||
|
~/tools
|
||
|
key: ${{ runner.os }}-tools_v2
|
||
|
|
||
|
- name: Setup env
|
||
|
run: echo "$HOME/tools/bin" >> $GITHUB_PATH
|
||
|
|
||
|
- name: Install cached tools
|
||
|
if: steps.tools.outputs.cache-hit != 'true'
|
||
|
run: source tools.sh && (cd ~/ && install_verilator)
|
||
|
|
||
|
- name: Install uncached tools
|
||
|
run: (cd .. && git clone https://github.com/SpinalHDL/SpinalHDL.git -b dev)
|
||
|
|
||
|
- name: Compile tests
|
||
|
run: sbt "+test:compile"
|
||
|
|
||
|
- name: Run tests
|
||
|
run: sbt "+test"
|