Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 26 additions & 10 deletions .github/workflows/bitstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,15 @@ on:
type: string

jobs:
bitstream:
name: Build bitstream
runs-on: ubuntu-22.04-bitstream
timeout-minutes: 240
bitstream_find:
name: Find bitstream
runs-on: ubuntu-22.04
outputs:
bitstreamStrategy: ${{ steps.strategy.outputs.bitstreamStrategy }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Required by get-bitstream-strategy.sh
- name: Prepare environment
uses: ./.github/actions/prepare-env
with:
service_account_json: '${{ secrets.BAZEL_CACHE_CREDS }}'

- name: Configure bitstream strategy
id: strategy
Expand Down Expand Up @@ -56,8 +53,28 @@ jobs:
bitstream_archive=$(./bazelisk.sh outquery "${cached_archive}")
cp -Lv ${bitstream_archive} build-bin.tar

- name: Upload step outputs
if: steps.strategy.outputs.bitstreamStrategy == 'cached'
uses: actions/upload-artifact@v4
with:
name: partial-build-bin-chip_${{ inputs.top_name }}_${{ inputs.design_suffix }}
path: build-bin.tar

bitstream_build:
name: Build bitstream
runs-on: ubuntu-22.04-bitstream
timeout-minutes: 240
needs: bitstream_find
if: needs.bitstream_find.outputs.bitstreamStrategy != 'cached'
steps:
- uses: actions/checkout@v4

- name: Prepare environment
uses: ./.github/actions/prepare-env
with:
service_account_json: '${{ secrets.BAZEL_CACHE_CREDS }}'

- name: Build and splice bitstream with Vivado
if: steps.strategy.outputs.bitstreamStrategy != 'cached'
run: |
bazel_package=//hw/bitstream/vivado
bitstream_target=${bazel_package}:fpga_${{ inputs.design_suffix }}
Expand All @@ -79,7 +96,6 @@ jobs:
./bazelisk.sh build ${archive_target}

- name: Display synthesis & implementation logs
if: steps.strategy.outputs.bitstreamStrategy != 'cached'
run: |
. util/build_consts.sh

Expand Down
Loading