Skip to content

Commit

Permalink
update ci to use docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
wsipak committed Oct 11, 2024
1 parent e6e2ec6 commit b372844
Show file tree
Hide file tree
Showing 11 changed files with 63 additions and 406 deletions.
77 changes: 0 additions & 77 deletions .github/workflows/build-verilator.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,60 +8,36 @@ on:

jobs:

Build-Verilator:
name: Build-Verilator
uses: ./.github/workflows/build-verilator.yml

Build-Spike:
name: Build-Spike
uses: ./.github/workflows/build-spike.yml

Get-Renode:
name: Get-Renode
uses: ./.github/workflows/get-renode.yml

Build-OpenOCD:
name: Build-OpenOCD
uses: ./.github/workflows/build-openocd.yml

Test-Regression:
name: Test-Regression
needs: [Build-Verilator]
uses: ./.github/workflows/test-regression.yml

Test-Verification:
name: Test-Verification
needs: [Build-Verilator]
uses: ./.github/workflows/test-verification.yml

Test-Microarchitectural:
name: Test-Microarchitectural
needs: [Build-Verilator]
uses: ./.github/workflows/test-uarch.yml

Test-RISCV-DV:
name: Test-RISCV-DV
needs: [Build-Verilator, Build-Spike, Get-Renode]
uses: ./.github/workflows/test-riscv-dv.yml

Test-RISCOF:
name: Test-RISCOF
needs: [Build-Verilator, Build-Spike]
uses: ./.github/workflows/test-riscof.yml

Test-UVM:
name: Test-UVM
needs: [Build-Verilator]
uses: ./.github/workflows/test-uvm.yml

Test-Renode:
name: Test-Renode
needs: [Get-Renode]
uses: ./.github/workflows/test-renode.yml

Test-OpenOCD:
name: Test-OpenOCD
needs: [Build-Verilator, Build-OpenOCD]
uses: ./.github/workflows/test-openocd.yml

Report-Coverage:
Expand Down
57 changes: 0 additions & 57 deletions .github/workflows/get-renode.yml

This file was deleted.

32 changes: 4 additions & 28 deletions .github/workflows/test-openocd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ jobs:
tests:
name: Run OpenOCD tests
runs-on: ubuntu-latest
container: ghcr.io/antmicro/cores-veer-el2:latest
strategy:
fail-fast: false
matrix:
Expand All @@ -16,7 +17,6 @@ jobs:
env:
DEBIAN_FRONTEND: "noninteractive"
CCACHE_DIR: "/opt/openocd-tests/.cache/"
VERILATOR_VERSION: v5.024

steps:
- name: Install utils
Expand All @@ -31,46 +31,20 @@ jobs:
run: |
date=$(date +"%Y_%m_%d")
time=$(date +"%Y%m%d_%H%M%S_%N")
cache_verilator_restore_key=cache_verilator_
cache_verilator_key=${cache_verilator_restore_key}${{ env.VERILATOR_VERSION }}_${{ env.VERILATOR_COMMIT }}
cache_openocd_restore_key=cache_openocd_
cache_openocd_key=${cache_openocd_restore_key}
cache_test_restore_key=${{ matrix.coverage }}_
cache_test_key=${cache_test_restore_key}${time}
echo "date=$date" | tee -a "$GITHUB_ENV"
echo "time=$time" | tee -a "$GITHUB_ENV"
echo "cache_verilator_restore_key=$cache_verilator_restore_key" | tee -a "$GITHUB_ENV"
echo "cache_verilator_key=$cache_verilator_key" | tee -a "$GITHUB_ENV"
echo "cache_openocd_restore_key=$cache_openocd_restore_key" | tee -a "$GITHUB_ENV"
echo "cache_openocd_key=$cache_openocd_key" | tee -a "$GITHUB_ENV"
echo "cache_test_restore_key=$cache_test_restore_key" | tee -a "$GITHUB_ENV"
echo "cache_test_key=$cache_test_key" | tee -a "$GITHUB_ENV"
- name: Restore Verilator cache
id: cache-verilator-restore
uses: actions/cache/restore@v3
with:
path: |
/opt/verilator
/opt/verilator/.cache
key: ${{ env.cache_verilator_key }}

- name: Restore OpenOCD cache
id: cache-openocd-restore
uses: actions/cache/restore@v3
with:
path: |
/opt/openocd
/opt/openocd/.cache
key: ${{ env.cache_openocd_key }}
restore-keys: ${{ env.cache_openocd_restore_key }}

- name: Setup repository
uses: actions/checkout@v3
with:
submodules: recursive

- name: install SiteSpawner package
shell: bash
run: |
python3 -m venv .venv
.venv/bin/python3 -m pip install tools/SiteSpawner
Expand All @@ -79,6 +53,7 @@ jobs:
python3 -m pip install tools/SiteSpawner
- name: Build verilated simulation
shell: bash
run: |
export PATH=/opt/verilator/bin:/opt/openocd/bin:$PATH
export RV_ROOT=$(pwd)
Expand All @@ -91,6 +66,7 @@ jobs:
-f ${RV_ROOT}/testbench/openocd_scripts/jtag_cg.tcl
- name: Prepare coverage data
shell: bash
run: |
export PATH=/opt/verilator/bin:$PATH
export RV_ROOT=$(pwd)
Expand Down
21 changes: 6 additions & 15 deletions .github/workflows/test-regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ jobs:
regression-tests:
name: Regression tests
runs-on: ubuntu-latest
container: ghcr.io/antmicro/cores-veer-el2:latest
strategy:
matrix:
bus: ["axi", "ahb"]
Expand All @@ -21,7 +22,6 @@ jobs:
env:
DEBIAN_FRONTEND: "noninteractive"
CCACHE_DIR: "/opt/regression/.cache/"
VERILATOR_VERSION: v5.024

steps:
- name: Install utils
Expand All @@ -37,28 +37,14 @@ jobs:
run: |
date=$(date +"%Y_%m_%d")
time=$(date +"%Y%m%d_%H%M%S_%N")
cache_verilator_restore_key=cache_verilator_
cache_verilator_key=${cache_verilator_restore_key}${{ env.VERILATOR_VERSION }}_${{ env.VERILATOR_COMMIT }}
cache_test_restore_key=${{ matrix.test }}_${{ matrix.coverage }}_
cache_test_key=${cache_test_restore_key}${time}
echo "date=$date" | tee -a "$GITHUB_ENV"
echo "time=$time" | tee -a "$GITHUB_ENV"
echo "cache_verilator_restore_key=$cache_verilator_restore_key" | tee -a "$GITHUB_ENV"
echo "cache_verilator_key=$cache_verilator_key" | tee -a "$GITHUB_ENV"
echo "cache_test_restore_key=$cache_test_restore_key" | tee -a "$GITHUB_ENV"
echo "cache_test_key=$cache_test_key" | tee -a "$GITHUB_ENV"
- name: Restore verilator cache
id: cache-verilator-restore
uses: actions/cache/restore@v3
with:
path: |
/opt/verilator
/opt/verilator/.cache
key: ${{ env.cache_verilator_key }}

- name: Setup tests cache
uses: actions/cache@v3
id: cache-test-setup
Expand All @@ -74,6 +60,7 @@ jobs:
submodules: recursive

- name: install SiteSpawner package
shell: bash
run: |
python3 -m venv .venv
.venv/bin/python3 -m pip install tools/SiteSpawner
Expand All @@ -82,6 +69,7 @@ jobs:
python3 -m pip install tools/SiteSpawner
- name: Setup environment
shell: bash
run: |
echo "/opt/verilator/bin" >> $GITHUB_PATH
RV_ROOT=`pwd`
Expand All @@ -92,13 +80,16 @@ jobs:
echo "TEST_PATH=$TEST_PATH" >> $GITHUB_ENV
- name: Run tests
shell: bash
run: |
export PATH=/opt/verilator/bin:$PATH
export RV_ROOT=`pwd`
.github/scripts/run_regression_test.sh $TEST_PATH ${{ matrix.bus }} ${{ matrix.test}} ${{ matrix.coverage }} ${{ matrix.priv }}
- name: Prepare coverage data
shell: bash
run: |
source .venv/bin/activate
sis -d convert --dat-dir ${TEST_PATH}/
mkdir -p results
mv ${TEST_PATH}/coverage.info \
Expand Down
25 changes: 1 addition & 24 deletions .github/workflows/test-renode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,40 +6,17 @@ on:
jobs:
tests:
runs-on: ubuntu-latest
container: ghcr.io/antmicro/cores-veer-el2:latest
strategy:
fail-fast: false
env:
RENODE_VERSION: latest
DEBIAN_FRONTEND: "noninteractive"
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Cache Metadata
id: cache_metadata
run: |
date=$(date +"%Y_%m_%d")
time=$(date +"%Y%m%d_%H%M%S_%N")
cache_renode_restore_key=cache_renode_
cache_renode_key=${cache_renode_restore_key}${{ env.RENODE_VERSION }}
echo "date=$date" | tee -a "$GITHUB_ENV"
echo "time=$time" | tee -a "$GITHUB_ENV"
echo "cache_renode_restore_key=$cache_renode_restore_key" | tee -a "$GITHUB_ENV"
echo "cache_renode_key=$cache_renode_key" | tee -a "$GITHUB_ENV"
- name: Restore Renode cache
id: cache-renode-restore
uses: actions/cache/restore@v3
with:
path: |
/opt/renode
key: ${{ env.cache_renode_key }}
restore-keys: ${{ env.cache_renode_restore_key }}
fail-on-cache-miss: true

- name: Install dependencies
run: |
sudo apt -qqy update && sudo apt -qqy --no-install-recommends install \
Expand Down
Loading

0 comments on commit b372844

Please sign in to comment.