Skip to content

Commit

Permalink
Running all jobs on IRIS with NFS mount
Browse files Browse the repository at this point in the history
Make Boot and Test jobs require more attention. Make Boot currently hangs on completion, requiring a timeout and zip file check to successfully end job. Running tests on IRIS takes 3.5X as long.

Running all jobs on IRIS with NFS mount, and removing jobs/scripts related to S3 or rclone

Make Boot and Test jobs require more attention. Make Boot currently hangs on completion, requiring a timeout and zip file check to successfully end job. Running tests on IRIS seem to take 3.5X as long.
  • Loading branch information
Shihab Suliman committed May 2, 2024
1 parent 15738c8 commit 76f8824
Show file tree
Hide file tree
Showing 12 changed files with 98 additions and 403 deletions.
20 changes: 8 additions & 12 deletions .github/actions/setupenv/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,15 @@ description: "Composite action that checks out repos, installs rclone, mounts S3
runs:
using: "composite"
steps:
- name: Checkout Source
uses: actions/checkout@v4
with:
path: PandABlocks-fpga
# require history to get back to last tag for version number of branches
fetch-depth: 0
- name: Checkout PandABlocks-rootfs
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: PandABlocks/PandABlocks-rootfs
path: PandABlocks-rootfs
# Installation of go & temporary rclone patch applied until symlinks issue using rclone mount is resolved (see below):
# https://github.com/rclone/rclone/issues/2975
- name: Install rclone patch
path: repos/PandABlocks-rootfs
fetch-depth: 0

- name: Give runner build perms, and adjust repos config path
shell: bash
run: bash PandABlocks-fpga/.github/scripts/rclone-patch.sh
run: |
sudo mkdir /build
sudo chmod -R 777 /build
35 changes: 0 additions & 35 deletions .github/scripts/mount-s3-bucket.sh

This file was deleted.

28 changes: 0 additions & 28 deletions .github/scripts/rclone-patch.sh

This file was deleted.

64 changes: 30 additions & 34 deletions .github/workflows/_make_boot.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
on:
workflow_call:
secrets:
VIVADO_S3_ACCESS_KEY_ID:
required: true
VIVADO_S3_SECRET_ACCESS_KEY:
required: true

jobs:
make_boot:
Expand All @@ -16,46 +11,47 @@ jobs:
app: PandABox-no-fmc
- platform: zynqmp
app: xu5_st1-no-fmc
runs-on: ubuntu-latest
runs-on:
group: iris_runners
container:
image: docker.io/shihabdls/pandablocks-container-extension:v2.5
options: --privileged

steps:
# Necessary to find action.yml
- name: Checkout Source
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: repos/PandABlocks-fpga
fetch-depth: 0

# Run action.yml
- name: Checkout and install rclone
uses: ./.github/actions/setupenv
- name: Checkout rootfs, give perms, and adjust path
uses: ./repos/PandABlocks-fpga/.github/actions/setupenv

# S3 bucket
- name: Mount Vivado S3 bucket
run: sudo bash PandABlocks-fpga/.github/scripts/mount-s3-bucket.sh ${{ secrets.VIVADO_S3_ACCESS_KEY_ID }} ${{ secrets.VIVADO_S3_SECRET_ACCESS_KEY }}

# Get container image
- name: login to github container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Mount in rclone bucket from runner into conatiner
- name: make boot
# Generate bootable image
- name: Make boot
id: make_boot
continue-on-error: true
#timeout set to expected upper-limit of build
timeout-minutes: 45
run: |
docker pull ghcr.io/pandablocks/pandablocks-dev-container:latest
docker run \
-v "${{ github.workspace }}:/repos" \
-v "${{ github.workspace }}/build:/build" \
-v "/scratch/Xilinx:/scratch/Xilinx" \
ghcr.io/pandablocks/pandablocks-dev-container:latest\
/bin/bash -c \
"cd PandABlocks-fpga && ln -s CONFIG.example CONFIG && make boot APP_NAME=${{ matrix.app }}"
echo "boot_files=false" >> $GITHUB_OUTPUT
cd repos/PandABlocks-fpga && ln -s CONFIG.example CONFIG && make boot WORK_DIR=/__w/PandABlocks-FPGA/PandABlocks-FPGA/repos/PandABlocks-rootfs APP_NAME=${{ matrix.app }}
if test -f /build/boot*.zip; then
echo "boot_files=true" >> $GITHUB_OUTPUT
fi
# Current workflow hangs upon make_boot completion, requiring a timeout
# Envvar boot_files is set true if timeout reached after successful boot build
# Envvar boot_files is set false on boot build error and/or failure to generate zip files
- name: Fail workflow if boot files absent
if: ${{ steps.make_boot.outputs.boot_files == 'false'}}
run: exit 1

# Artifacts
# Upload artifacts if boot files present
- name: Upload boot
if: ${{ steps.make_boot.outputs.boot_files == 'true'}}
uses: actions/upload-artifact@v2
with:
name: zpkgs
path: ./build/boot*.zip
path: /build/boot*.zip
62 changes: 22 additions & 40 deletions .github/workflows/_make_zpkg.yml
Original file line number Diff line number Diff line change
@@ -1,64 +1,46 @@
on:
workflow_call:
secrets:
VIVADO_S3_ACCESS_KEY_ID:
required: true
VIVADO_S3_SECRET_ACCESS_KEY:
required: true

jobs:
make_zpkg:
strategy:
fail-fast: false
matrix:
app: [
"PandABox-no-fmc",
"PandABox-fmc_24vio",
"PandABox-fmc_acq427",
"PandABox-fmc_acq430",
"PandABox-fmc_lback-sfp_lback",
"ZedBoard-no-fmc",
]
runs-on: ubuntu-latest
"PandABox-no-fmc",
"PandABox-fmc_24vio",
"PandABox-fmc_acq427",
"PandABox-fmc_acq430",
"PandABox-fmc_lback-sfp_lback",
"ZedBoard-no-fmc",
]
runs-on:
group: iris_runners
container:
image: docker.io/shihabdls/pandablocks-container-extension:v2.5
options: --privileged

steps:
# Necessary to find action.yml
- name: Checkout Source
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: repos/PandABlocks-fpga
fetch-depth: 0

# Run action.yml
- name: Checkout and install rclone
uses: ./.github/actions/setupenv

# S3 bucket
- name: Mount Vivado S3 bucket
run: sudo bash PandABlocks-fpga/.github/scripts/mount-s3-bucket.sh ${{ secrets.VIVADO_S3_ACCESS_KEY_ID }} ${{ secrets.VIVADO_S3_SECRET_ACCESS_KEY }}

# Get container image
- name: login to github container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout rootfs, give perms, and adjust path
uses: ./repos/PandABlocks-fpga/.github/actions/setupenv

# Mount in rclone bucket from runner into conatiner
# Make zpkgs
- name: build carrier_ip and zpkg
id: make_zpkg
run: |
docker pull ghcr.io/pandablocks/pandablocks-dev-container:latest
docker run \
--net=host \
-v "${{ github.workspace }}:/repos" \
-v "${{ github.workspace }}/build:/build" \
-v "/scratch/Xilinx:/scratch/Xilinx" \
ghcr.io/pandablocks/pandablocks-dev-container:latest\
/bin/bash -c \
"cd PandABlocks-fpga && ln -s CONFIG.example CONFIG && make carrier_ip APP_NAME=${{ matrix.app }} && make zpkg APP_NAME=${{ matrix.app }} "
cd repos/PandABlocks-fpga && ln -s CONFIG.example CONFIG && make WORK_DIR=/__w/PandABlocks-FPGA/PandABlocks-FPGA/repos/PandABlocks-rootfs carrier_ip APP_NAME=${{ matrix.app }} && make zpkg APP_NAME=${{ matrix.app }}
exit
# Artifacts
- name: Upload zpkg
uses: actions/upload-artifact@v2
with:
name: zpkgs
path: ./build/panda-fpga@*.zpg
path: /build/panda-fpga@*.zpg
44 changes: 15 additions & 29 deletions .github/workflows/_make_zpkg_aws.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
on:
workflow_call:
inputs:
label:
required: true
type: string

jobs:
make_zpkg_aws:
Expand All @@ -12,43 +8,33 @@ jobs:
matrix:
app:
["xu5_st1-no-fmc","xu5_st1-fmc_acq430"]
name: make zpkg on aws
runs-on: ${{ inputs.label }}
runs-on:
group: iris_runners
container:
image: docker.io/shihabdls/pandablocks-container-extension:v2.5
options: --privileged

steps:
# Necessary to find action.yml
- name: Checkout Source
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: repos/PandABlocks-fpga
fetch-depth: 0

# Run action.yml
- name: Checkout and install rclone
uses: ./.github/actions/setupenv
- name: Checkout rootfs, give perms, and adjust path
uses: ./repos/PandABlocks-fpga/.github/actions/setupenv

# Get container image
- name: login to github container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Mount in rclone bucket from vm into conatiner
# Make large zpkgs
- name: build carrier_ip and zpkg
id: make_zpkg_aws
run: |
sudo docker pull ghcr.io/pandablocks/pandablocks-dev-container:latest
sudo docker run \
--net=host \
-v "${{ github.workspace }}:/repos" \
-v "${{ github.workspace }}/build:/build" \
-v "/scratch/Xilinx:/scratch/Xilinx" \
ghcr.io/pandablocks/pandablocks-dev-container:latest\
/bin/bash -c \
"cd PandABlocks-fpga && ln -s CONFIG.example CONFIG && make carrier_ip APP_NAME=${{ matrix.app }} && make zpkg APP_NAME=${{ matrix.app }}"
cd repos/PandABlocks-fpga && ln -s CONFIG.example CONFIG && make WORK_DIR=/__w/PandABlocks-FPGA/PandABlocks-FPGA/repos/PandABlocks-rootfs carrier_ip APP_NAME=${{ matrix.app }} && make zpkg APP_NAME=${{ matrix.app }}
exit
# Artifacts
- name: Upload zpkg
uses: actions/upload-artifact@v2
with:
name: zpkgs
path: ./build/panda-fpga@*.zpg
path: /build/panda-fpga@*.zpg
40 changes: 0 additions & 40 deletions .github/workflows/_setup_aws_runner.yml

This file was deleted.

Loading

0 comments on commit 76f8824

Please sign in to comment.