fayalite/.forgejo/workflows/test.yml

65 lines
2 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-03-02 17:43:29 -08:00
- uses: https://git.libre-chip.org/mirrors/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 \
cvc5 \
flex \
gawk \
git \
libboost-filesystem-dev \
libboost-python-dev \
libboost-system-dev \
libffi-dev \
libreadline-dev \
lld \
pkg-config \
python3 \
python3-click \
2024-10-03 01:01:06 -07:00
tcl-dev \
z3 \
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-03-02 17:43:29 -08:00
- uses: https://git.libre-chip.org/mirrors/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: |
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 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