Skip to content

Commit

Permalink
CI: Add custom ZSTD module workflow
Browse files Browse the repository at this point in the history
Internal-tag: [#52186]
Signed-off-by: Pawel Czarnecki <[email protected]>
  • Loading branch information
lpawelcz committed Jun 20, 2024
1 parent d8cd91a commit 6ffde50
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,7 @@ jobs:
- name: Bazel Test All (opt)
run: |
bazel test -c opt --noshow_progress --test_output=errors -- //xls/...
# Explicitly build the whole XLS excluding rules tagged as 'manual'
bazel build -c opt --noshow_progress --test_output=errors -- //xls/...
# Test everything except ZSTD module, this is done in a separate workflow
bazel test -c opt --noshow_progress --test_output=errors -- //xls/... -//xls/modules/zstd/...
63 changes: 63 additions & 0 deletions .github/workflows/modules-zstd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Modules (ZSTD)
on:
# Avoid triggering on pushes to /all/ open PR branches.
push:
branches:
- main
paths:
- 'xls/modules/zstd/**'
pull_request:
branches:
- main
paths:
- 'xls/modules/zstd/**'
# This lets us trigger manually from the UI.
workflow_dispatch:

jobs:
build:
name: Test ZSTD module (opt)
runs-on:
labels: ubuntu-22.04-64core
timeout-minutes: 600
continue-on-error: true
steps:
- uses: actions/checkout@v2

- name: Restore Nightly Bazel Cache
uses: actions/cache/restore@v4
with:
path: "~/.cache/bazel"
key: bazel-cache-nightly-${{ runner.os }}-${{ github.sha }}
restore-keys: bazel-cache-nightly-${{ runner.os }}-

- name: Install dependencies via apt
run: sudo apt-get install python3-distutils python3-dev python-is-python3 libtinfo5 build-essential liblapack-dev libblas-dev gfortran

- name: Bazel Build Tools (opt)
run: |
bazel build -c opt --test_output=errors -- //xls/dslx:interpreter_main //xls/dslx/ir_convert:ir_converter_main //xls/tools:opt_main //xls/tools:codegen_main
- name: Build ZSTD Module (opt)
run: |
bazel build -c opt --test_output=errors -- //xls/modules/zstd:all
- name: Test ZSTD Module (opt)
run: |
bazel test -c opt --test_output=errors -- //xls/modules/zstd:all
- name: Build ZSTD verilog targets (opt)
run: |
bazel build -c opt -- $(bazel query 'filter(".*_verilog", kind(rule, //xls/modules/zstd/...))')
- name: Build and run ZSTD IR benchmark rules (opt)
run: |
bazel run -c opt -- $(bazel query 'filter(".*_ir_benchmark", kind(rule, //xls/modules/zstd/...))')
- name: Build and run synthesis benchmarks of the ZSTD module (opt)
run: |
bazel run -c opt -- $(bazel query 'filter(".*_benchmark_synth", kind(rule, //xls/modules/zstd/...))')
- name: Build ZSTD place and route targets (opt)
run: |
bazel build -c opt -- $(bazel query 'filter(".*_place_and_route", kind(rule, //xls/modules/zstd/...))')

0 comments on commit 6ffde50

Please sign in to comment.