fayalite/.forgejo/workflows/test.yml

76 lines
2.6 KiB
YAML
Raw Normal View History

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:
test:
runs-on: debian-12
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 \
python3-click \
2024-10-03 08:01:06 +00:00
tcl-dev \
z3 \
zlib1g-dev \
2024-10-04 06:36:39 +00:00
- name: Cache ccache dir
2024-10-05 00:10:06 +00:00
uses: https://code.forgejo.org/actions/cache@v3
2024-10-04 06:36:39 +00:00
with:
2024-10-07 03:57:42 +00:00
path: .ccache
2024-10-04 06:36:39 +00:00
key: ${{ runner.os }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-
2024-10-07 03:57:42 +00:00
- name: Setup ccache
run: |
ccache --set-config=cache_dir="${{ github.workspace }}/.ccache"
ccache --set-config=compression=true
ccache --set-config=compression_level=6
ccache -M 4G
ccache -z
2024-10-03 08:01:06 +00:00
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
echo "$PATH" >> "$GITHUB_PATH"
2024-06-12 05:13:07 +00:00
- run: |
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-03 07:27:28 +00:00
- run: |
git clone --depth=1 --branch=yosys-0.45 https://github.com/YosysHQ/sby.git
make -C sby install
- run: |
2024-10-03 07:44:04 +00:00
git clone --depth=1 --recursive --branch=0.45 https://github.com/YosysHQ/yosys.git
2024-10-04 08:03:17 +00:00
make -C yosys -j2
2024-10-04 06:40:44 +00:00
make -C yosys install
2024-10-03 07:27:28 +00:00
- run: |
wget -O firrtl.tar.gz https://github.com/llvm/circt/releases/download/firtool-1.86.0/firrtl-bin-linux-x64.tar.gz
sha256sum -c - <<<'bf6f4ab18ae76f135c944efbd81e25391c31c1bd0617c58ab0592640abefee14 firrtl.tar.gz'
tar -xvaf firrtl.tar.gz
export PATH="$(realpath firtool-1.86.0/bin):$PATH"
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
- run: cargo build --tests --features=unstable-doc
- run: cargo doc --features=unstable-doc