Skip to content

Commit

Permalink
Fixing job titles, tidying up run commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Shihab Suliman committed May 13, 2024
1 parent 88671af commit a4d7884
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 76 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/_make_boot.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
on:
workflow_call:

env:
WORK_DIR: /__w/PandABlocks-FPGA/PandABlocks-FPGA

jobs:
make_boot:
strategy:
Expand All @@ -28,7 +25,7 @@ jobs:
path: repos/PandABlocks-fpga
fetch-depth: 0

- name: Checkout rootfs, give perms, and adjust path
- name: Checkout rootfs and Give Directory Perms
uses: ./repos/PandABlocks-fpga/.github/actions/setupenv

# Generate bootable image
Expand All @@ -39,7 +36,9 @@ jobs:
timeout-minutes: 60
run: |
echo "boot_files=false" >> $GITHUB_OUTPUT
cd repos/PandABlocks-fpga && ln -s CONFIG.example CONFIG && make WORK_DIR=$WORK_DIR boot APP_NAME=${{ matrix.app }}
cd repos/PandABlocks-fpga
ln -s CONFIG.example CONFIG
make boot APP_NAME=${{ matrix.app }}
if test -f /build/boot*.zip; then
echo "boot_files=true" >> $GITHUB_OUTPUT
fi
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/_make_zpkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,17 @@ jobs:
path: repos/PandABlocks-fpga
fetch-depth: 0

- name: Checkout rootfs, give perms, and adjust path
- name: Checkout rootfs and Give Directory Perms
uses: ./repos/PandABlocks-fpga/.github/actions/setupenv

# Make zpkgs
- name: build carrier_ip and zpkg
id: make_zpkg
run: |
cd repos/PandABlocks-fpga && ln -s CONFIG.example CONFIG && make WORK_DIR=$WORK_DIR carrier_ip APP_NAME=${{ matrix.app }} && make WORK_DIR=$WORK_DIR zpkg APP_NAME=${{ matrix.app }}
exit
cd repos/PandABlocks-fpga
ln -s CONFIG.example CONFIG
make WORK_DIR=$WORK_DIR carrier_ip APP_NAME=${{ matrix.app }}
make WORK_DIR=$WORK_DIR zpkg APP_NAME=${{ matrix.app }}
# Artifacts
- name: Upload zpkg
Expand Down
37 changes: 0 additions & 37 deletions .github/workflows/_test.yml

This file was deleted.

13 changes: 8 additions & 5 deletions .github/workflows/_test_matrix.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
on:
workflow_call:
outputs:
matrix:
value: ${{ jobs.test_matrix.outputs.matrix }}
workflow_call:
outputs:
matrix:
value: ${{ jobs.test_matrix.outputs.matrix }}

env:
WORK_DIR: /__w/PandABlocks-FPGA/PandABlocks-FPGA

jobs:
test_matrix:
Expand All @@ -23,7 +26,7 @@ jobs:
- name: Evaluate number of modules/tests & generate job matrix
id: make_matrix
run: |
bash /__w/PandABlocks-FPGA/PandABlocks-FPGA/repos/PandABlocks-fpga/.github/scripts/Find_Tests.sh "/__w/PandABlocks-FPGA/PandABlocks-FPGA/repos/PandABlocks-fpga/modules" "/__w/PandABlocks-FPGA/PandABlocks-FPGA/repos/PandABlocks-fpga/.github/scripts"
bash $WORK_DIR/repos/PandABlocks-fpga/.github/scripts/Find_Tests.sh "$WORK_DIR/repos/PandABlocks-fpga/modules" "$WORK_DIR/repos/PandABlocks-fpga/.github/scripts"
json_content=$(cat github_tests.json)
echo "::set-output name=matrix::$json_content"
echo "$json_content"
15 changes: 8 additions & 7 deletions .github/workflows/_test_python_autogen.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
on:
workflow_call:

env:
WORK_DIR: /__w/PandABlocks-FPGA/PandABlocks-FPGA

jobs:
test_python_autogen:
Expand All @@ -20,10 +17,14 @@ jobs:
path: repos/PandABlocks-fpga
fetch-depth: 0

- name: Checkout rootfs and give runner perms
- name: Checkout rootfs and Give Directory Perms
uses: ./repos/PandABlocks-fpga/.github/actions/setupenv

# Run tests
- name: Make python and hdl tests
id: python_hdl_tests
run: cd repos/PandABlocks-fpga && ln -s CONFIG.example CONFIG && make WORK_DIR=$WORK_DIR python_tests && make WORK_DIR=$WORK_DIR python_timing && make WORK_DIR=$WORK_DIR autogen
- name: Make Python Tests
run: |
cd repos/PandABlocks-fpga
ln -s CONFIG.example CONFIG
make python_tests
make python_timing
make autogen
38 changes: 19 additions & 19 deletions .github/workflows/code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,7 @@ on:

jobs:

# Generate job matrix to evenly split tests
test_matrix:
uses: ./.github/workflows/_test_matrix.yml

# python and autogen tests
test_python_autogen:
uses: ./.github/workflows/_test_python_autogen.yml

# hdl tests
test:
needs: [test_matrix, test_python_autogen]
uses: ./.github/workflows/_test.yml
with:
matrix: ${{needs.test_matrix.outputs.matrix}}

# Make Boot files
# Make Boot files
make_boot:
uses: ./.github/workflows/_make_boot.yml

Expand All @@ -37,10 +22,25 @@ jobs:

# Optional revert on failed push workflow
undo:
needs: [ make_boot, make_zpkg, test ]
needs: [ make_boot, make_zpkg, test_hdl ]
uses: ./.github/workflows/_undo.yml

# Release on push to tag
release:
needs: [ make_boot, make_zpkg, test, test_matrix, test_python_autogen ]
uses: ./.github/workflows/_release.yml
needs: [ make_boot, make_zpkg, test_hdl, test_matrix, test_python_autogen ]
uses: ./.github/workflows/_release.yml

# Generate job matrix to evenly split tests
test_matrix:
uses: ./.github/workflows/_test_matrix.yml

# python and autogen tests
test_python_autogen:
uses: ./.github/workflows/_test_python_autogen.yml

# hdl tests
test_hdl:
needs: [test_matrix, test_python_autogen]
uses: ./.github/workflows/_test_hdl.yml
with:
matrix: ${{needs.test_matrix.outputs.matrix}}

0 comments on commit a4d7884

Please sign in to comment.