From b381df1c53000950805b0d34969631ddf5ad3667 Mon Sep 17 00:00:00 2001 From: James Souter Date: Thu, 30 Jan 2025 14:20:37 +0000 Subject: [PATCH] rollback cocotb workflow to test coverage reports --- .github/workflows/_cocotb_test.yml | 32 ++++++++++++++++++------------ 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/.github/workflows/_cocotb_test.yml b/.github/workflows/_cocotb_test.yml index 037c92a8a..bfca17c01 100644 --- a/.github/workflows/_cocotb_test.yml +++ b/.github/workflows/_cocotb_test.yml @@ -4,27 +4,32 @@ on: jobs: cocotb_test: runs-on: ubuntu-latest - container: - image: ghcr.io/pandablocks/pandablocks-ci-container:latest - options: --privileged - steps: # Git repositories - name: Checkout Source - uses: actions/checkout@v4 + uses: actions/checkout@v2 with: - path: repos/PandABlocks-fpga + path: PandABlocks-fpga + # require history to get back to last tag for version number of branches fetch-depth: 0 - - - name: Checkout rootfs and Give Directory Perms - uses: ./repos/PandABlocks-fpga/.github/actions/setupenv + # Login into ghcr + - name: login to ghcr + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Run cocotb tests - # run tests, create coverage file and make coverage xml paths relative run: | - cd repos/PandABlocks-fpga && ln -s CONFIG.example CONFIG && \ - make cocotb_tests && sed -i 's/\/repos\/PandABlocks-FPGA\///' cocotb_coverage.xml - + docker pull ghcr.io/pandablocks/pandablocks-dev-container:4.0a7 + docker run \ + --net=host \ + -v "${{ github.workspace }}:/repos" \ + -v "${{ github.workspace }}/build:/build" \ + ghcr.io/pandablocks/pandablocks-dev-container:4.0a7 \ + /bin/bash -c \ + "cd PandABlocks-fpga && ln -s CONFIG.example CONFIG && make cocotb_tests && sed -i 's/\/repos\/pandablocks-fpga\///i' cocotb_coverage.xml" - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: @@ -32,3 +37,4 @@ jobs: files: cocotb_coverage.xml # env: # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} +