generate Arty A7 100T .bit file for blinky example in CI
All checks were successful
/ test (pull_request) Successful in 5m2s

This commit is contained in:
Jacob Lifshay 2025-10-14 03:28:31 -07:00
parent 97878e100a
commit faf1e5113c
Signed by: programmerjake
SSH key fingerprint: SHA256:HnFTLGpSm4Q4Fj502oCFisjZSoakwEuTsJJMSke63RQ
2 changed files with 3 additions and 185 deletions

View file

@ -1,126 +0,0 @@
# SPDX-License-Identifier: LGPL-3.0-or-later
# See Notices.txt for copyright information
on:
workflow_call:
outputs:
cache-primary-key:
value: ${{ jobs.deps.outputs.cache-primary-key }}
jobs:
deps:
runs-on: debian-12
outputs:
cache-primary-key: ${{ steps.restore-deps.outputs.cache-primary-key }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/cache/restore@v3
id: restore-deps
with:
path: deps
key: ${{ github.repository }}-deps-${{ runner.os }}-${{ hashFiles('.forgejo/workflows/deps.yml') }}
lookup-only: true
- name: Install Apt packages
if: steps.restore-deps.outputs.cache-hit != 'true'
run: |
apt-get update -qq
apt-get install -qq \
bison \
build-essential \
ccache \
clang \
cmake \
cvc5 \
default-jre-headless \
flex \
g++ \
gawk \
git \
libantlr4-runtime-dev \
libboost-filesystem-dev \
libboost-iostreams-dev \
libboost-program-options-dev \
libboost-python-dev \
libboost-system-dev \
libboost-thread-dev \
libeigen3-dev \
libffi-dev \
libreadline-dev \
lld \
openfpgaloader \
pkg-config \
python3 \
python3-click \
python3-venv \
tcl-dev \
uuid-dev \
zlib1g-dev
- name: Create venv
if: steps.restore-deps.outputs.cache-hit != 'true'
run: |
python3 -m venv deps/venv
source deps/venv/bin/activate
echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> "$FORGEJO_ENV"
echo "$VIRTUAL_ENV/bin" >> "$FORGEJO_PATH"
- name: Build prjxray
if: steps.restore-deps.outputs.cache-hit != 'true'
run: |
git clone https://github.com/SymbiFlow/prjxray.git deps/prjxray
(cd deps/prjxray; git checkout c9f02d8576042325425824647ab5555b1bc77833)
(cd deps/prjxray; git submodule update --init --recursive)
mkdir -p deps/prjxray/build
(cd deps/prjxray/build; cmake ..)
(cd deps/prjxray/build; make -j$(nproc))
(cd deps/prjxray/build; make install)
(cd deps/prjxray; pip install -r requirements.txt)
- name: Get prjxray-db
if: steps.restore-deps.outputs.cache-hit != 'true'
run: |
git clone https://github.com/openXC7/prjxray-db.git deps/prjxray-db
(cd deps/prjxray-db; git checkout 381966a746cb4cf4a7f854f0e53caa3bf74fbe62)
- name: Build xcfasm
if: steps.restore-deps.outputs.cache-hit != 'true'
run: |
git clone https://github.com/chipsalliance/f4pga-xc-fasm.git deps/f4pga-xc-fasm
(cd deps/f4pga-xc-fasm; git checkout 25dc605c9c0896204f0c3425b52a332034cf5e5c)
(cd deps/f4pga-xc-fasm; pip install -e .)
- name: Build nextpnr-xilinx
if: steps.restore-deps.outputs.cache-hit != 'true'
run: |
git clone https://github.com/openXC7/nextpnr-xilinx.git deps/nextpnr-xilinx
(cd deps/nextpnr-xilinx; git checkout 724db28b41e68568690a5ea1dd9ce5082362bb91)
(cd deps/nextpnr-xilinx; git submodule update --init --recursive)
mkdir -p deps/nextpnr-xilinx/build
(cd deps/nextpnr-xilinx/build; cmake -DARCH=xilinx -DUSE_OPENMP=ON -DBUILD_GUI=OFF ..)
(cd deps/nextpnr-xilinx/build; make -j$(nproc))
(cd deps/nextpnr-xilinx/build; make install)
- name: Install Firtool
if: steps.restore-deps.outputs.cache-hit != 'true'
run: |
mkdir -p deps
wget -O deps/firrtl.tar.gz https://github.com/llvm/circt/releases/download/firtool-1.86.0/firrtl-bin-linux-x64.tar.gz
sha256sum -c - <<<'bf6f4ab18ae76f135c944efbd81e25391c31c1bd0617c58ab0592640abefee14 deps/firrtl.tar.gz'
tar -C deps -xvaf deps/firrtl.tar.gz
rm -rf deps/firtool
mv deps/firtool-1.86.0 deps/firtool
- name: Get SymbiYosys
if: steps.restore-deps.outputs.cache-hit != 'true'
run: |
git clone --depth=1 --branch=yosys-0.45 https://git.libre-chip.org/mirrors/sby deps/sby
- name: Build Z3
if: steps.restore-deps.outputs.cache-hit != 'true'
run: |
git clone --depth=1 --recursive --branch=z3-4.13.3 https://git.libre-chip.org/mirrors/z3 deps/z3
(cd deps/z3; PYTHON=python3 ./configure --prefix=/usr/local)
make -C deps/z3/build -j"$(nproc)"
- name: Build Yosys
if: steps.restore-deps.outputs.cache-hit != 'true'
run: |
git clone --depth=1 --recursive --branch=0.45 https://git.libre-chip.org/mirrors/yosys deps/yosys
make -C deps/yosys -j"$(nproc)"
- uses: actions/cache/save@v3
if: steps.restore-deps.outputs.cache-hit != 'true'
with:
path: deps
key: ${{ steps.restore-deps.outputs.cache-primary-key }}

View file

@ -3,72 +3,16 @@
on: [push, pull_request]
jobs:
deps:
runs-on: debian-12
uses: ./.forgejo/workflows/deps.yml
test:
runs-on: debian-12
needs: deps
container:
image: git.libre-chip.org/libre-chip/fayalite-deps:latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: |
scripts/check-copyright.sh
- run: |
apt-get update -qq
apt-get install -qq \
bison \
build-essential \
ccache \
clang \
cmake \
cvc5 \
default-jre-headless \
flex \
g++ \
gawk \
git \
libantlr4-runtime-dev \
libboost-filesystem-dev \
libboost-iostreams-dev \
libboost-program-options-dev \
libboost-python-dev \
libboost-system-dev \
libboost-thread-dev \
libeigen3-dev \
libffi-dev \
libreadline-dev \
lld \
openfpgaloader \
pkg-config \
python3 \
python3-click \
python3-venv \
tcl-dev \
uuid-dev \
zlib1g-dev
- run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.89.0
source "$HOME/.cargo/env"
rustup component add rust-src
echo "$PATH" >> "$GITHUB_PATH"
- uses: actions/cache/restore@v3
with:
path: deps
key: ${{ needs.deps.outputs.cache-primary-key }}
fail-on-cache-miss: true
- run: |
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
make -C deps/nextpnr-xilinx/build install
export PATH="$(realpath deps/firtool/bin):$PATH"
echo "$PATH" >> "$GITHUB_PATH"
- uses: https://git.libre-chip.org/mirrors/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/master' }}
@ -77,4 +21,4 @@ jobs:
- run: cargo test --doc --features=unstable-doc
- run: cargo doc --features=unstable-doc
- run: FAYALITE_TEST_HASHER=always_zero cargo test --test=module --features=unstable-doc,unstable-test-hasher
- 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))
- run: cargo run --example blinky yosys-nextpnr-xray --nextpnr-xilinx-chipdb-dir /opt/fayalite-deps/nextpnr-xilinx/xilinx --prjxray-db-dir /opt/fayalite-deps/prjxray-db --device xc7a100ticsg324-1L -o target/blinky-out --clock-frequency=$((1000*1000*100))