Merge pull request #707 from enjoy-digital/github-actions
ci: migrate from Travis CI to Github Actions.
This commit is contained in:
commit
fe12821a64
|
@ -0,0 +1,43 @@
|
|||
name: ci
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
# Checkout Repository
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# Install Tools
|
||||
- name: Install Tools
|
||||
run: |
|
||||
sudo apt-get install wget build-essential python3
|
||||
pip3 install setuptools
|
||||
pip3 install requests
|
||||
|
||||
# Install (n)Migen / LiteX / Cores
|
||||
- name: Install LiteX
|
||||
run: |
|
||||
wget https://raw.githubusercontent.com/enjoy-digital/litex/master/litex_setup.py
|
||||
python3 litex_setup.py init install --user
|
||||
|
||||
# Install RISC-V GCC
|
||||
- name: Install RISC-V GCC
|
||||
run: |
|
||||
wget https://raw.githubusercontent.com/enjoy-digital/litex/master/litex_setup.py
|
||||
python3 litex_setup.py gcc
|
||||
ls $PWD/../riscv64-*/bin/
|
||||
export PATH=$PATH:$(echo $PWD/../riscv64-*/bin/)
|
||||
riscv64-unknown-elf-gcc --version
|
||||
|
||||
# Install Project
|
||||
- name: Install Project
|
||||
run: python3 setup.py develop --user
|
||||
|
||||
# Test
|
||||
- name: Run Tests
|
||||
run: |
|
||||
export GITHUB_ACTIONS=1
|
||||
python3 setup.py test
|
49
.travis.yml
49
.travis.yml
|
@ -1,49 +0,0 @@
|
|||
jobs:
|
||||
include:
|
||||
- os: linux
|
||||
dist: xenial
|
||||
language: python
|
||||
python: "3.6"
|
||||
- os: linux
|
||||
dist: xenial
|
||||
language: python
|
||||
python: "3.7"
|
||||
- os: linux
|
||||
dist: xenial
|
||||
language: python
|
||||
python: "3.8"
|
||||
- os: osx
|
||||
osx_image: xcode10.2 # Includes Python 3.7
|
||||
language: shell
|
||||
- os: windows
|
||||
language: shell
|
||||
before_install:
|
||||
- choco info python3
|
||||
- choco install python3
|
||||
- export PATH=/c/Python38/:$PATH
|
||||
- cp -a /c/Python38/python.exe /c/Python38/python3.exe
|
||||
allow_failures:
|
||||
- os: windows
|
||||
language: shell
|
||||
|
||||
install:
|
||||
# Get Migen / LiteX / Cores
|
||||
- cd ~/
|
||||
- pip3 install requests
|
||||
- cp $TRAVIS_BUILD_DIR/litex_setup.py .
|
||||
- python3 litex_setup.py init install
|
||||
# Install the LiteX version being tested
|
||||
- cd $TRAVIS_BUILD_DIR
|
||||
- python3 setup.py install
|
||||
|
||||
before_script:
|
||||
# Get RISC-V toolchain
|
||||
- cd ~/
|
||||
- python3 litex_setup.py gcc
|
||||
- ls $PWD/riscv64-*/bin/
|
||||
- export PATH=$PATH:$(echo $PWD/riscv64-*/bin/)
|
||||
- riscv64-unknown-elf-gcc --version
|
||||
|
||||
script:
|
||||
- cd $TRAVIS_BUILD_DIR
|
||||
- python3 setup.py test
|
|
@ -3,7 +3,7 @@
|
|||
```
|
||||
Copyright 2012-2020 / Enjoy-Digital
|
||||
```
|
||||
[![](https://travis-ci.com/enjoy-digital/litex.svg?branch=master)](https://travis-ci.com/enjoy-digital/litex)
|
||||
[![](https://github.com/enjoy-digital/litex/workflows/ci/badge.svg)](https://github.com/enjoy-digital/litex/actions)
|
||||
![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)
|
||||
|
||||
> **Note:** In release 2020.04, LiteX switched to Python modules instead of Git submodules. Existing users will have to reinstall LiteX following the [installation guide](https://github.com/enjoy-digital/litex/wiki/Installation#litex-installation-guide).
|
||||
|
|
|
@ -14,7 +14,7 @@ from migen import *
|
|||
from litex.soc.integration.builder import *
|
||||
|
||||
|
||||
RUNNING_ON_TRAVIS = (os.getenv('TRAVIS', 'false').lower() == 'true')
|
||||
RUNNING_ON_GITHUB_ACTIONS = (os.getenv("GITHUB_ACTIONS", None) is not None)
|
||||
|
||||
|
||||
def build_test(socs):
|
||||
|
@ -175,7 +175,7 @@ litex/boards/targets/simple.py litex.boards.platforms.arty \
|
|||
def test_variants_vexriscv(self):
|
||||
self.run_variants("vexriscv", ('standard', 'minimal', 'lite', 'lite+debug', 'full+debug'))
|
||||
|
||||
@unittest.skipIf(RUNNING_ON_TRAVIS, "No nMigen/Yosys on Travis-CI")
|
||||
@unittest.skipIf(RUNNING_ON_GITHUB_ACTIONS, "No nMigen/Yosys on Travis-CI")
|
||||
def test_variants_minerva(self):
|
||||
self.run_variants("minerva", ('standard',))
|
||||
|
||||
|
@ -186,10 +186,10 @@ litex/boards/targets/simple.py litex.boards.platforms.arty \
|
|||
for cpu, variants in cpu_variants.items():
|
||||
self.run_variants(cpu, variants)
|
||||
|
||||
@unittest.skipIf(RUNNING_ON_TRAVIS, "No lm32 toolchain on Travis-CI")
|
||||
@unittest.skipIf(RUNNING_ON_GITHUB_ACTIONS, "No lm32 toolchain on Travis-CI")
|
||||
def test_variants_lm32(self):
|
||||
self.run_variants('lm32', ('standard', 'minimal', 'lite'))
|
||||
|
||||
@unittest.skipIf(RUNNING_ON_TRAVIS, "No or1k toolchain on Travis-CI")
|
||||
@unittest.skipIf(RUNNING_ON_GITHUB_ACTIONS, "No or1k toolchain on Travis-CI")
|
||||
def test_variants_mor1kx(self):
|
||||
self.run_variants('mor1kx', ('standard', 'linux'))
|
||||
|
|
Loading…
Reference in New Issue