aboutsummaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorMarcelina Koƛcielnicka <mwk@0x04.net>2021-03-17 19:32:50 +0100
committerMarcelina Koƛcielnicka <mwk@0x04.net>2021-03-18 22:27:45 +0100
commit3a12617ec0713aeb81fbf4beede804545f762a1f (patch)
tree90d2a3114fcf6ba1bd531552be2a05a9c80afee3 /.github
parent3aa10e90ba1d57e4d01c199396a52fbd1a66fa7e (diff)
downloadyosys-3a12617ec0713aeb81fbf4beede804545f762a1f.tar.gz
yosys-3a12617ec0713aeb81fbf4beede804545f762a1f.tar.bz2
yosys-3a12617ec0713aeb81fbf4beede804545f762a1f.zip
Add simple CI using github actions.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/test.yml87
1 files changed, 87 insertions, 0 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 000000000..401589cd8
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,87 @@
+name: Build and run tests
+
+on: [push, pull_request]
+
+jobs:
+ test-linux:
+ runs-on: ubuntu-latest
+ steps:
+
+ - uses: actions/checkout@v2
+
+ - name: Install dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install g++ gperf build-essential bison flex libreadline-dev gawk tcl-dev libffi-dev git graphviz xdot pkg-config python python3 libboost-system-dev libboost-python-dev libboost-filesystem-dev zlib1g-dev
+
+ - name: Get iverilog
+ run: |
+ git clone git://github.com/steveicarus/iverilog.git
+
+ - name: Cache iverilog
+ id: cache-iverilog
+ uses: actions/cache@v2
+ with:
+ path: iverilog-bin
+ key: ${{ runner.os }}-${{ hashFiles('iverilog/.git/refs/heads/master') }}
+
+ - name: Build iverilog
+ if: steps.cache-iverilog.outputs.cache-hit != 'true'
+ run: |
+ mkdir iverilog-bin
+ cd iverilog
+ autoconf
+ CC=gcc CXX=g++ ./configure --prefix=$PWD/../iverilog-bin
+ make -j$(nproc)
+ make install
+
+ - name: Build yosys
+ run: |
+ make -j$(nproc)
+
+ - name: Run tests
+ run: |
+ PATH=$PWD/iverilog-bin/bin:$PATH make -j$(nproc) test
+
+ test-osx:
+ runs-on: macos-latest
+ steps:
+
+ - uses: actions/checkout@v2
+
+ - name: Install dependencies
+ run: |
+ brew update
+ brew tap Homebrew/bundle
+ brew bundle
+
+ - name: Get iverilog
+ run: |
+ git clone git://github.com/steveicarus/iverilog.git
+
+ - name: Cache iverilog
+ id: cache-iverilog
+ uses: actions/cache@v2
+ with:
+ path: iverilog-bin
+ key: ${{ runner.os }}-${{ hashFiles('iverilog/.git/refs/heads/master') }}
+
+ - name: Build iverilog
+ if: steps.cache-iverilog.outputs.cache-hit != 'true'
+ run: |
+ export PATH="$(brew --prefix bison)/bin:$PATH"
+ mkdir iverilog-bin
+ cd iverilog
+ autoconf
+ CC=gcc CXX=g++ ./configure --prefix=$PWD/../iverilog-bin
+ make -j$(sysctl -n hw.ncpu)
+ make install
+
+ - name: Build yosys
+ run: |
+ export PATH="$(brew --prefix bison)/bin:$PATH"
+ make -j$(sysctl -n hw.ncpu)
+
+ - name: Run tests
+ run: |
+ PATH=$PWD/iverilog-bin/bin:$PATH make -j$(sysctl -n hw.ncpu) test