fayalite/.forgejo/workflows/test.yml

81 lines
2.7 KiB
YAML
Raw Normal View History

2024-09-22 15:30:05 -07:00
# SPDX-License-Identifier: LGPL-3.0-or-later
# See Notices.txt for copyright information
2024-06-11 22:13:07 -07:00
on: [push, pull_request]
jobs:
deps:
2025-08-24 16:14:03 -07:00
runs-on: debian-12
uses: ./.forgejo/workflows/deps.yml
2024-06-11 22:13:07 -07:00
test:
runs-on: debian-12
needs: deps
2024-06-11 22:13:07 -07:00
steps:
2025-10-09 23:48:17 -07:00
- uses: actions/checkout@v3
2024-06-11 22:13:07 -07:00
with:
fetch-depth: 0
2024-09-22 15:30:53 -07:00
- run: |
scripts/check-copyright.sh
2024-10-03 00:27:28 -07:00
- run: |
apt-get update -qq
2024-10-03 01:01:06 -07:00
apt-get install -qq \
bison \
build-essential \
ccache \
clang \
2025-10-10 17:58:25 -07:00
cmake \
2024-10-03 01:01:06 -07:00
cvc5 \
2025-10-10 17:58:25 -07:00
default-jre-headless \
2024-10-03 01:01:06 -07:00
flex \
2025-10-10 17:58:25 -07:00
g++ \
2024-10-03 01:01:06 -07:00
gawk \
git \
2025-10-10 17:58:25 -07:00
libantlr4-runtime-dev \
2024-10-03 01:01:06 -07:00
libboost-filesystem-dev \
2025-10-10 17:58:25 -07:00
libboost-iostreams-dev \
libboost-program-options-dev \
2024-10-03 01:01:06 -07:00
libboost-python-dev \
libboost-system-dev \
2025-10-10 17:58:25 -07:00
libboost-thread-dev \
libeigen3-dev \
2024-10-03 01:01:06 -07:00
libffi-dev \
libreadline-dev \
lld \
2025-10-10 17:58:25 -07:00
openfpgaloader \
2024-10-03 01:01:06 -07:00
pkg-config \
python3 \
python3-click \
2025-10-10 17:58:25 -07:00
python3-venv \
2024-10-03 01:01:06 -07:00
tcl-dev \
2025-10-10 17:58:25 -07:00
uuid-dev \
zlib1g-dev
2024-06-11 22:13:07 -07:00
- run: |
2025-08-24 15:13:16 -07:00
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.89.0
2024-06-11 22:15:23 -07:00
source "$HOME/.cargo/env"
rustup component add rust-src
2024-06-11 22:15:23 -07:00
echo "$PATH" >> "$GITHUB_PATH"
2025-10-09 23:48:17 -07:00
- uses: actions/cache/restore@v3
with:
path: deps
key: ${{ needs.deps.outputs.cache-primary-key }}
fail-on-cache-miss: true
2024-10-03 00:27:28 -07:00
- run: |
2025-10-10 17:58:25 -07:00
source deps/venv/bin/activate
echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> "$FORGEJO_ENV"
echo "$VIRTUAL_ENV/bin" >> "$FORGEJO_PATH"
make -C deps/prjxray/build install
make -C deps/z3/build install
make -C deps/sby install
make -C deps/yosys install
2025-10-10 17:58:25 -07:00
make -C deps/nextpnr-xilinx/build install
export PATH="$(realpath deps/firtool/bin):$PATH"
2024-10-03 00:27:28 -07:00
echo "$PATH" >> "$GITHUB_PATH"
2025-03-02 17:43:29 -08:00
- uses: https://git.libre-chip.org/mirrors/rust-cache@v2
2024-06-11 22:13:07 -07:00
with:
save-if: ${{ github.ref == 'refs/heads/master' }}
2024-06-13 13:27:57 -07:00
- run: cargo test
- run: cargo build --tests --features=unstable-doc
2024-12-01 20:21:26 -08:00
- run: cargo test --doc --features=unstable-doc
- run: cargo doc --features=unstable-doc
2025-04-09 21:11:09 -07:00
- run: FAYALITE_TEST_HASHER=always_zero cargo test --test=module --features=unstable-doc,unstable-test-hasher
2025-10-10 17:58:25 -07:00
- run: cargo run --example=blinky -- yosys-nextpnr-xray --nextpnr-xilinx-chipdb-dir deps/nextpnr-xilinx/xilinx --prjxray-db-dir deps/prjxray-db --device xc7a100ticsg324-1L -o target/blinky-out --clock-frequency=$((1000*1000*100))