Skip to content

Commit 0492c55

Browse files
authored
ci: test that BUILD_RUST=ON builds (#1459)
1 parent 661f76d commit 0492c55

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

.github/ci/build_rust.sh

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
3+
function get_dependencies {
4+
:
5+
}
6+
7+
function build_nextpnr {
8+
mkdir build
9+
pushd build
10+
cmake .. -DARCH=generic -DWERROR=on -DBUILD_RUST=on
11+
make nextpnr-generic -j`nproc`
12+
popd
13+
}
14+
15+
function run_tests {
16+
export PATH=${GITHUB_WORKSPACE}/.yosys/bin:$PATH
17+
( export NPNR=$(pwd)/build/nextpnr-generic && cd tests/generic/flow && ./run.sh )
18+
}
19+
20+
function run_archcheck {
21+
pushd build
22+
# This isn't strictly necessary, since it's tested by build_generic.sh
23+
# but it can't hurt to run it anyway.
24+
./nextpnr-generic --uarch example --test
25+
popd
26+
}

.github/workflows/arch_ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
arch: [mistral, ice40, ecp5, generic, nexus, machxo2, himbaechel]
12+
arch: [mistral, ice40, ecp5, generic, nexus, machxo2, himbaechel, rust]
1313
runs-on: ubuntu-latest
1414
env:
1515
DEPS_PATH: ${{ github.workspace }}/deps
@@ -30,7 +30,7 @@ jobs:
3030
- name: Install
3131
run: |
3232
sudo apt-get update
33-
sudo apt-get install git make cmake libboost-all-dev python3-dev pypy3 libeigen3-dev tcl-dev lzma-dev libftdi-dev clang bison flex swig qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools iverilog libreadline-dev liblzma-dev
33+
sudo apt-get install git make cmake libboost-all-dev python3-dev pypy3 libeigen3-dev tcl-dev lzma-dev libftdi-dev clang bison flex swig qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools iverilog libreadline-dev liblzma-dev cargo rustc
3434
3535
- name: Cache yosys installation
3636
uses: actions/cache@v4

0 commit comments

Comments
 (0)