From: whitequark Date: Wed, 22 Jul 2020 08:11:59 +0000 (+0000) Subject: CI: replace Travis with GitHub Actions. X-Git-Tag: 24jan2021_ls180~10 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d71e19e27c2a57037c30b838b13d30426a2173f6;p=nmigen.git CI: replace Travis with GitHub Actions. Fixes #445. --- diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 1a2e5ff..1545d72 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -4,6 +4,37 @@ on: types: [opened, reopened, synchronize] name: CI jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.6', '3.7', '3.8', pypy3] + steps: + - name: Check out source code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + sudo add-apt-repository ppa:sri-csl/formal-methods + sudo apt-get update + sudo apt-get install yices2 + pip install setuptools setuptools_scm wheel coverage codecov yowasp-yosys nmigen-yosys + pip install -e . + - name: Preserve wasmtime cache + uses: actions/cache@v1 + with: + path: ~/.cache/wasmtime + key: ${{ runner.os }}-wasmtime + - name: Run tests + run: | + export NMIGEN_USE_YOSYS=builtin YOSYS=yowasp-yosys SBY=yowasp-sby SMTBMC=yowasp-yosys-smtbmc + python -m unittest discover + codecov document: runs-on: ubuntu-latest steps: diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 5b62d85..0000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -dist: bionic -language: python -python: - - "3.6" - - "3.7" - - "3.8" - - "pypy3" -cache: - directories: - - "$HOME/.local" - - "$HOME/.cache/wasmtime" -before_install: - - if ! yices -V; then (git clone https://github.com/SRI-CSL/yices2.git && cd yices2 && autoconf && ./configure --prefix=$HOME/.local && make && make install); fi - - pip install coverage codecov pyvcd Jinja2 yowasp-yosys nmigen-yosys - - export NMIGEN_USE_YOSYS=builtin YOSYS=yowasp-yosys -install: - - python setup.py develop -script: - - coverage run -m unittest discover - - codecov -matrix: - fast_finish: true