Skip to content

Commit

Permalink
Test run without implementation
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Czyz <[email protected]>
  • Loading branch information
mczyz-antmicro committed Mar 29, 2024
1 parent 1f2dfaa commit 1ba6644
Showing 1 changed file with 45 additions and 29 deletions.
74 changes: 45 additions & 29 deletions .github/workflows/xls-modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ jobs:
uses: actions/cache@v4
with:
path: "~/.cache/bazel"
key: ${{env.CACHE_KEY}}
restore-keys: ${{env.CACHE_RESTORE_KEY}}
key: ${{ env.CACHE_KEY }}
restore-keys: ${{ env.CACHE_RESTORE_KEY }}

- name: Increase build space
run: |
Expand Down Expand Up @@ -73,9 +73,8 @@ jobs:
//xls/dslx:interpreter_main \
//xls/dslx/ir_convert:ir_converter_main \
//xls/tools:opt_main \
//xls/tools:codegen_main
//xls/tools:codegen_main \
//xls/dslx:dslx_fmt
config-matrix:
needs: build
Expand Down Expand Up @@ -109,19 +108,35 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Free disk
id: free-disk
uses: ./.github/actions/free-disk
- name: Increase build space
run: |
echo "Before cleanup"
df -H
sudo rm -rf /usr/share/dotnet/*
sudo rm -rf /usr/local/lib/android/*
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
echo "After cleanup"
df -H
- name: Implement CSR
id: implementation
uses: ./.github/actions/implementation
- name: Bazel Cache
uses: actions/cache@v4
with:
xls_module: ${{ matrix.module.xls_module }}
rule_ir: ${{ matrix.module.rule_ir }}
rule_verilog: ${{ matrix.module.rule_verilog }}
rule_synthesis: ${{ matrix.module.rule_synthesis }}
rule_pnr: ${{ matrix.module.rule_pnr }}
path: "~/.cache/bazel"
key: ${{env.CACHE_KEY}}
restore-keys: ${{env.CACHE_RESTORE_KEY}}

# - name: Implement CSR
# id: implementation
# uses: ./.github/actions/implementation
# with:
# xls_module: ${{ matrix.module.xls_module }}
# rule_ir: ${{ matrix.module.rule_ir }}
# rule_verilog: ${{ matrix.module.rule_verilog }}
# rule_synthesis: ${{ matrix.module.rule_synthesis }}
# rule_pnr: ${{ matrix.module.rule_pnr }}

test:
needs: build
Expand All @@ -142,18 +157,16 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Free disk
id: free-disk
uses: ./.github/actions/free-disk

- name: Test ${{ matrix.dslx_test }}
id: test
uses: ./.github/actions/test
- name: Bazel Cache
uses: actions/cache@v4
with:
xls_module: "xls/modules/dma"
rule_test: ${{ matrix.dslx_test }}

path: "~/.cache/bazel"
key: ${{env.CACHE_KEY}}
restore-keys: ${{env.CACHE_RESTORE_KEY}}

- name: Test
run: |
bazel run -c opt --test_output=errors -- ${{env.XLS_MODULE}}:${{ matrix.dslx_test }}
format:
name: Format
Expand All @@ -162,9 +175,12 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Build formatter
run: |
bazel build -c opt --test_output=errors -- //xls/dslx:dslx_fmt
- name: Bazel Cache
uses: actions/cache@v4
with:
path: "~/.cache/bazel"
key: ${{env.CACHE_KEY}}
restore-keys: ${{env.CACHE_RESTORE_KEY}}

# Once https://github.com/google/xls/issues/1285 is implemented,
# we could replace these with a single rule
Expand Down

0 comments on commit 1ba6644

Please sign in to comment.