Skip to content

Commit

Permalink
[ci] move CW305 bitstream build to GitHub actions
Browse files Browse the repository at this point in the history
Signed-off-by: Gary Guo <[email protected]>
  • Loading branch information
nbdd0121 committed Oct 25, 2024
1 parent 2113bb1 commit d0918cd
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 35 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

env:
VIVADO_VERSION: "2021.1"

jobs:
quick_lint:
name: Lint (quick)
Expand Down Expand Up @@ -175,6 +178,41 @@ jobs:
- name: Test
run: ./ci/scripts/run-english-breakfast-verilator-tests.sh

# Build CW305 variant of the English Breakfast toplevel design using Vivado
chip_englishbreakfast_cw305:
name: CW305's Bitstream
runs-on: ubuntu-22.04-bitstream
needs: quick_lint
steps:
- uses: actions/checkout@v4
- name: Install dependencies
uses: ./.github/actions/install-deps
- name: Build bitstream
run: |
. util/build_consts.sh
# Build CW305 test rom required by `build-bitstream-vivado.sh`
rom_path="sw/device/lib/testing/test_rom"
ci/bazelisk.sh build "//${rom_path}:test_rom_fpga_cw305" \
--features=-rv32_bitmanip \
--copt=-DOT_IS_ENGLISH_BREAKFAST_REDUCED_SUPPORT_FOR_INTERNAL_USE_ONLY_
vmem="$(ci/bazelisk.sh cquery --output=files "//${rom_path}:test_rom_fpga_cw305" \
--features=-rv32_bitmanip \
--copt=-DOT_IS_ENGLISH_BREAKFAST_REDUCED_SUPPORT_FOR_INTERNAL_USE_ONLY_
)"
mkdir -p "build-bin/${rom_path}"
cp "$vmem" "build-bin/${rom_path}"
realpath "build-bin/${rom_path}"
module load "xilinx/vivado/${VIVADO_VERSION}"
ci/scripts/build-bitstream-vivado.sh top_englishbreakfast cw305
- name: Upload bitstream
uses: actions/upload-artifact@v4
with:
name: chip_englishbreakfast_cw305
path: build-bin/hw/top_englishbreakfast/lowrisc_systems_chip_englishbreakfast_cw305_0.1.bit
overwrite: true

build_docker_containers:
name: Build Docker Containers
runs-on: ubuntu-20.04
Expand Down
35 changes: 0 additions & 35 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -349,41 +349,6 @@ jobs:
top_name: earlgrey
design_suffix: cw340

- job: chip_englishbreakfast_cw305
displayName: CW305's Bitstream
# Build CW305 variant of the English Breakfast toplevel design using Vivado
dependsOn: lint
condition: and(succeeded(), eq(dependencies.lint.outputs['DetermineBuildType.onlyDocChanges'], '0'), eq(dependencies.lint.outputs['DetermineBuildType.onlyDvChanges'], '0'), eq(dependencies.lint.outputs['DetermineBuildType.onlyCdcChanges'], '0'))
pool: ci-public-eda
timeoutInMinutes: 120 # 2 hours
steps:
- template: ci/checkout-template.yml
- template: ci/install-package-dependencies.yml
- bash: |
set -e
. util/build_consts.sh
# Build CW305 test rom required by `build-bitstream-vivado.sh`
rom_path="sw/device/lib/testing/test_rom"
ci/bazelisk.sh build "//${rom_path}:test_rom_fpga_cw305" \
--features=-rv32_bitmanip \
--copt=-DOT_IS_ENGLISH_BREAKFAST_REDUCED_SUPPORT_FOR_INTERNAL_USE_ONLY_
vmem="$(ci/bazelisk.sh cquery --output=files "//${rom_path}:test_rom_fpga_cw305" \
--features=-rv32_bitmanip \
--copt=-DOT_IS_ENGLISH_BREAKFAST_REDUCED_SUPPORT_FOR_INTERNAL_USE_ONLY_
)"
mkdir -p "${BUILD_ROOT}/build-bin/${rom_path}"
cp "$vmem" "${BUILD_ROOT}/build-bin/${rom_path}"
realpath "${BUILD_ROOT}/build-bin/${rom_path}"
module load "xilinx/vivado/$(VIVADO_VERSION)"
ci/scripts/build-bitstream-vivado.sh top_englishbreakfast cw305
displayName: Build bitstream
- template: ci/upload-artifacts-template.yml
parameters:
includePatterns:
- "/hw/top_englishbreakfast/lowrisc_systems_chip_englishbreakfast_cw305_0.1.bit"

- job: cache_bitstreams
displayName: Cache bitstreams to GCP
pool:
Expand Down

0 comments on commit d0918cd

Please sign in to comment.