2024-09-22 22:30:05 +00:00
|
|
|
# SPDX-License-Identifier: LGPL-3.0-or-later
|
|
|
|
# See Notices.txt for copyright information
|
2024-06-12 05:13:07 +00:00
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
2024-10-18 04:05:18 +00:00
|
|
|
deps:
|
|
|
|
uses: ./.forgejo/workflows/deps.yml
|
2024-06-12 05:13:07 +00:00
|
|
|
test:
|
|
|
|
runs-on: debian-12
|
2024-10-18 04:05:18 +00:00
|
|
|
needs: deps
|
2024-06-12 05:13:07 +00:00
|
|
|
steps:
|
|
|
|
- uses: https://code.forgejo.org/actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2024-09-22 22:30:53 +00:00
|
|
|
- run: |
|
|
|
|
scripts/check-copyright.sh
|
2024-10-03 07:27:28 +00:00
|
|
|
- run: |
|
|
|
|
apt-get update -qq
|
2024-10-03 08:01:06 +00:00
|
|
|
apt-get install -qq \
|
|
|
|
bison \
|
|
|
|
build-essential \
|
|
|
|
ccache \
|
|
|
|
clang \
|
|
|
|
cvc5 \
|
|
|
|
flex \
|
|
|
|
gawk \
|
|
|
|
git \
|
|
|
|
libboost-filesystem-dev \
|
|
|
|
libboost-python-dev \
|
|
|
|
libboost-system-dev \
|
|
|
|
libffi-dev \
|
|
|
|
libreadline-dev \
|
|
|
|
lld \
|
|
|
|
pkg-config \
|
|
|
|
python3 \
|
2024-10-03 08:44:06 +00:00
|
|
|
python3-click \
|
2024-10-03 08:01:06 +00:00
|
|
|
tcl-dev \
|
|
|
|
z3 \
|
2024-10-18 04:05:18 +00:00
|
|
|
zlib1g-dev
|
2024-06-12 05:13:07 +00:00
|
|
|
- run: |
|
2024-08-07 10:16:29 +00:00
|
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.80.1
|
2024-06-12 05:15:23 +00:00
|
|
|
source "$HOME/.cargo/env"
|
|
|
|
echo "$PATH" >> "$GITHUB_PATH"
|
2024-10-18 04:05:18 +00:00
|
|
|
- uses: https://code.forgejo.org/actions/cache/restore@v3
|
|
|
|
with:
|
|
|
|
path: deps
|
|
|
|
key: ${{ needs.deps.outputs.cache-primary-key }}
|
|
|
|
fail-on-cache-miss: true
|
2024-10-03 07:27:28 +00:00
|
|
|
- run: |
|
2024-10-18 04:05:18 +00:00
|
|
|
make -C deps/z3/build install
|
|
|
|
make -C deps/sby install
|
|
|
|
make -C deps/yosys install
|
|
|
|
export PATH="$(realpath deps/firtool/bin):$PATH"
|
2024-10-03 07:27:28 +00:00
|
|
|
echo "$PATH" >> "$GITHUB_PATH"
|
2024-06-12 05:20:22 +00:00
|
|
|
- uses: https://github.com/Swatinem/rust-cache@v2
|
2024-06-12 05:13:07 +00:00
|
|
|
with:
|
|
|
|
save-if: ${{ github.ref == 'refs/heads/master' }}
|
2024-06-13 20:27:57 +00:00
|
|
|
- run: cargo test
|
2024-10-07 03:08:39 +00:00
|
|
|
- run: cargo build --tests --features=unstable-doc
|
2024-07-18 07:13:28 +00:00
|
|
|
- run: cargo doc --features=unstable-doc
|