aboutsummaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/ci/build_mistral.sh24
-rw-r--r--.github/workflows/mistral_ci.yml33
2 files changed, 57 insertions, 0 deletions
diff --git a/.github/ci/build_mistral.sh b/.github/ci/build_mistral.sh
new file mode 100644
index 00000000..7046462f
--- /dev/null
+++ b/.github/ci/build_mistral.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+function get_dependencies {
+ # Fetch mistral
+ mkdir -p ${MISTRAL_PATH}
+ git clone --recursive https://github.com/Ravenslofty/mistral.git ${MISTRAL_PATH}
+ pushd ${MISTRAL_PATH}
+ git reset --hard ${MISTRAL_REVISION}
+ popd
+}
+
+function build_nextpnr {
+ mkdir build
+ pushd build
+ cmake .. -DARCH=mistral -DMISTRAL_ROOT=${MISTRAL_PATH}
+ make nextpnr-mistral -j`nproc`
+ popd
+}
+
+function run_archcheck {
+ pushd build
+ ./nextpnr-mistral --mistral ${MISTRAL_PATH} --device 5CEBA2F17A7 --test
+ popd
+}
diff --git a/.github/workflows/mistral_ci.yml b/.github/workflows/mistral_ci.yml
new file mode 100644
index 00000000..877e374d
--- /dev/null
+++ b/.github/workflows/mistral_ci.yml
@@ -0,0 +1,33 @@
+name: Mistral CI tests
+
+on: [push, pull_request]
+
+jobs:
+ Build-nextpnr:
+ runs-on: ubuntu-latest
+ steps:
+
+ - uses: actions/checkout@v2
+ with:
+ submodules: recursive
+
+ - uses: actions/setup-python@v2
+
+ - name: Install
+ run: |
+ sudo apt-get update
+ sudo apt-get install git make cmake libboost-all-dev python3-dev libeigen3-dev tcl-dev lzma-dev clang bison flex swig
+
+ - name: ccache
+ uses: hendrikmuhs/ccache-action@v1
+
+ - name: Execute build nextpnr
+ env:
+ MISTRAL_PATH: ${{ github.workspace }}/deps/mistral
+ MISTRAL_REVISION: 7d4e6d2cca1ec05de3be0c9fef6acaed8089d329
+ run: |
+ export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
+ source ./.github/ci/build_mistral.sh
+ get_dependencies
+ build_nextpnr
+ run_archcheck