From 76f882417f66e52299e9f53f221ad302b66cfd70 Mon Sep 17 00:00:00 2001 From: Shihab Suliman Date: Thu, 2 May 2024 10:45:31 +0100 Subject: [PATCH] Running all jobs on IRIS with NFS mount 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. --- .github/actions/setupenv/action.yml | 20 ++++---- .github/scripts/mount-s3-bucket.sh | 35 -------------- .github/scripts/rclone-patch.sh | 28 ----------- .github/workflows/_make_boot.yml | 64 ++++++++++++------------- .github/workflows/_make_zpkg.yml | 62 +++++++++--------------- .github/workflows/_make_zpkg_aws.yml | 44 ++++++----------- .github/workflows/_setup_aws_runner.yml | 40 ---------------- .github/workflows/_start_aws_runner.yml | 55 --------------------- .github/workflows/_stop_runner.yml | 40 ---------------- .github/workflows/_test.yml | 45 +++++------------ .github/workflows/code.yml | 63 +++--------------------- CONFIG.example | 5 +- 12 files changed, 98 insertions(+), 403 deletions(-) delete mode 100755 .github/scripts/mount-s3-bucket.sh delete mode 100644 .github/scripts/rclone-patch.sh delete mode 100644 .github/workflows/_setup_aws_runner.yml delete mode 100644 .github/workflows/_start_aws_runner.yml delete mode 100644 .github/workflows/_stop_runner.yml diff --git a/.github/actions/setupenv/action.yml b/.github/actions/setupenv/action.yml index 5c8ffbdc1..9b272ec22 100644 --- a/.github/actions/setupenv/action.yml +++ b/.github/actions/setupenv/action.yml @@ -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 \ No newline at end of file diff --git a/.github/scripts/mount-s3-bucket.sh b/.github/scripts/mount-s3-bucket.sh deleted file mode 100755 index 6e0bafd6d..000000000 --- a/.github/scripts/mount-s3-bucket.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -# Grants access to the s3 bucket containing vivado - - S3_ACCESS_KEY_ID=$1 - S3_SECRET_ACCESS_KEY=$2 - -sudo mkdir -p /scratch/Xilinx -sudo chmod a+w /scratch -mkdir -p $HOME/.config/rclone - -cat >> $HOME/.config/rclone/rclone.conf < ~/.passwd-s3fs -# chmod 600 ~/.passwd-s3fs -# s3fs dls-controls-fpga-vivado /scratch/Xilinx -o passwd_file=${HOME}/.passwd-s3fs -o url=https://s3.echo.stfc.ac.uk -o use_path_request_style -o ro diff --git a/.github/scripts/rclone-patch.sh b/.github/scripts/rclone-patch.sh deleted file mode 100644 index 1395d54f7..000000000 --- a/.github/scripts/rclone-patch.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash -# Installation of go & temporary rclone patch applied until symlinks issue using rclone mount is resolved (see below): -# https://github.com/rclone/rclone/issues/2975 - -if [[ -z "$HOME" ]]; then - export HOME=/root -fi - -#Install go -curl -OL https://golang.org/dl/go1.17.linux-amd64.tar.gz -sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.17.linux-amd64.tar.gz -export PATH=$PATH:/usr/local/go/bin -go version - -#Install rclone patch -git clone https://github.com/PandABlocks/rclone.git -cd rclone -git checkout traack_symlinks -make -./rclone version -cd $HOME/go/bin/ -sudo cp rclone /usr/bin/ -sudo chown root:root /usr/bin/rclone -sudo chmod 755 /usr/bin/rclone -sudo mkdir -p /usr/local/share/man/man1 -sudo cp rclone /usr/local/share/man/man1/ -sudo mandb -rclone version diff --git a/.github/workflows/_make_boot.yml b/.github/workflows/_make_boot.yml index f681ffd38..0b7882d70 100644 --- a/.github/workflows/_make_boot.yml +++ b/.github/workflows/_make_boot.yml @@ -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: @@ -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 \ No newline at end of file diff --git a/.github/workflows/_make_zpkg.yml b/.github/workflows/_make_zpkg.yml index c89d031c6..7bdcc44f8 100644 --- a/.github/workflows/_make_zpkg.yml +++ b/.github/workflows/_make_zpkg.yml @@ -1,10 +1,5 @@ on: workflow_call: - secrets: - VIVADO_S3_ACCESS_KEY_ID: - required: true - VIVADO_S3_SECRET_ACCESS_KEY: - required: true jobs: make_zpkg: @@ -12,53 +7,40 @@ jobs: 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 \ No newline at end of file diff --git a/.github/workflows/_make_zpkg_aws.yml b/.github/workflows/_make_zpkg_aws.yml index cdf8a0689..4a0d9302a 100644 --- a/.github/workflows/_make_zpkg_aws.yml +++ b/.github/workflows/_make_zpkg_aws.yml @@ -1,9 +1,5 @@ on: workflow_call: - inputs: - label: - required: true - type: string jobs: make_zpkg_aws: @@ -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 \ No newline at end of file diff --git a/.github/workflows/_setup_aws_runner.yml b/.github/workflows/_setup_aws_runner.yml deleted file mode 100644 index bf3c57816..000000000 --- a/.github/workflows/_setup_aws_runner.yml +++ /dev/null @@ -1,40 +0,0 @@ -on: - workflow_call: - inputs: - label: - required: true - type: string - secrets: - VIVADO_S3_ACCESS_KEY_ID: - required: true - VIVADO_S3_SECRET_ACCESS_KEY: - required: true - -jobs: - # Build rclone and mount S3 bucket - setup_aws_runner: - name: setup rclone and mount on runner - runs-on: ${{ inputs.label }} - steps: - # Necessary to find action.yml - - name: Checkout Source - uses: actions/checkout@v2 - with: - 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 }} - diff --git a/.github/workflows/_start_aws_runner.yml b/.github/workflows/_start_aws_runner.yml deleted file mode 100644 index ca47e6b99..000000000 --- a/.github/workflows/_start_aws_runner.yml +++ /dev/null @@ -1,55 +0,0 @@ -on: - workflow_call: - secrets: - AWS_ACCESS_KEY_ID: - required: true - AWS_SECRET_ACCESS_KEY: - required: true - AWS_REGION: - required: true - GH_PERSONAL_ACCESS_TOKEN: - required: true - AWS_AMI_ID: - required: true - AWS_SUBNET_ID: - required: true - AWS_SECURITY_GROUP_ID: - required: true - outputs: - label: - value: ${{ jobs.start-runner.outputs.label }} - ec2-instance-id: - value: ${{ jobs.start-runner.outputs.ec2-instance-id }} - -# Seting up AWS runners for high memory apps -jobs: - start-runner: - name: Start self hosted aws runner - runs-on: ubuntu-latest - outputs: - label: ${{ steps.start-ec2-runner.outputs.label }} - ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }} - steps: - - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ secrets.AWS_REGION }} - - - name: Start EC2 runner - id: start-ec2-runner - uses: machulav/ec2-github-runner@v2 - with: - mode: start - github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} - ec2-image-id: ${{ secrets.AWS_AMI_ID }} - ec2-instance-type: t3.xlarge - subnet-id: ${{ secrets.AWS_SUBNET_ID }} - security-group-id: ${{ secrets.AWS_SECURITY_GROUP_ID }} - aws-resource-tags: > - [ - {"Key": "Name", "Value": "ec2-github-runner"}, - {"Key": "GitHubRepository", "Value": "${{ github.repository }}"} - ] diff --git a/.github/workflows/_stop_runner.yml b/.github/workflows/_stop_runner.yml deleted file mode 100644 index 43727abe9..000000000 --- a/.github/workflows/_stop_runner.yml +++ /dev/null @@ -1,40 +0,0 @@ -on: - workflow_call: - inputs: - label: - required: true - type: string - ec2-instance-id: - required: true - type: string - secrets: - AWS_ACCESS_KEY_ID: - required: true - AWS_SECRET_ACCESS_KEY: - required: true - AWS_REGION: - required: true - GH_PERSONAL_ACCESS_TOKEN: - required: true - -jobs: - stop-runner: - name: Stop self hosted EC2 runnner - runs-on: ubuntu-latest - if: ${{ always() }} - steps: - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ secrets.AWS_REGION }} - - - name: Stop EC2 runner - uses: machulav/ec2-github-runner@v2 - continue-on-error: true - with: - mode: stop - github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} - label: ${{ inputs.label }} - ec2-instance-id: ${{ inputs.ec2-instance-id }} diff --git a/.github/workflows/_test.yml b/.github/workflows/_test.yml index fe8c87240..1d7b35dc6 100644 --- a/.github/workflows/_test.yml +++ b/.github/workflows/_test.yml @@ -1,45 +1,26 @@ on: workflow_call: - secrets: - VIVADO_S3_ACCESS_KEY_ID: - required: true - VIVADO_S3_SECRET_ACCESS_KEY: - required: true + jobs: test: - runs-on: ubuntu-latest + runs-on: + group: iris_runners + container: + image: docker.io/shihabdls/pandablocks-container-extension:v2.3 + 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 # Run tests - name: Make python and hdl tests - 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 python_tests && make python_timing && \ - make autogen && make hdl_test" + id: python_hdl_tests + run: cd repos/PandABlocks-fpga && ln -s CONFIG.example CONFIG && make WORK_DIR=/__w/PandABlocks-FPGA/PandABlocks-FPGA/repos/PandABlocks-rootfs python_tests && make WORK_DIR=/__w/PandABlocks-FPGA/PandABlocks-FPGA/repos/PandABlocks-rootfs python_timing && make WORK_DIR=/__w/PandABlocks-FPGA/PandABlocks-FPGA/repos/PandABlocks-rootfs autogen && make hdl_test \ No newline at end of file diff --git a/.github/workflows/code.yml b/.github/workflows/code.yml index 3fc2bc3a5..a8cb2960a 100644 --- a/.github/workflows/code.yml +++ b/.github/workflows/code.yml @@ -14,73 +14,24 @@ jobs: # Make Boot files make_boot: uses: ./.github/workflows/_make_boot.yml - secrets: - VIVADO_S3_ACCESS_KEY_ID: ${{ secrets.VIVADO_S3_ACCESS_KEY_ID }} - VIVADO_S3_SECRET_ACCESS_KEY: ${{ secrets.VIVADO_S3_SECRET_ACCESS_KEY }} # Make zpkg for FPGA apps make_zpkg: uses: ./.github/workflows/_make_zpkg.yml - secrets: - VIVADO_S3_ACCESS_KEY_ID: ${{ secrets.VIVADO_S3_ACCESS_KEY_ID }} - VIVADO_S3_SECRET_ACCESS_KEY: ${{ secrets.VIVADO_S3_SECRET_ACCESS_KEY }} - - # Setting up AWS runners for high memory apps - start-runner: - uses: ./.github/workflows/_start_aws_runner.yml - secrets: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_REGION: ${{ secrets.AWS_REGION }} - GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} - AWS_AMI_ID: ${{ secrets.AWS_AMI_ID }} - AWS_SUBNET_ID: ${{ secrets.AWS_SUBNET_ID }} - AWS_SECURITY_GROUP_ID: ${{ secrets.AWS_SECURITY_GROUP_ID }} - - setup-aws-runner: - needs: start-runner - uses: ./.github/workflows/_setup_aws_runner.yml - with: - label: ${{ needs.start-runner.outputs.label }} - secrets: - VIVADO_S3_ACCESS_KEY_ID: ${{ secrets.VIVADO_S3_ACCESS_KEY_ID }} - VIVADO_S3_SECRET_ACCESS_KEY: ${{ secrets.VIVADO_S3_SECRET_ACCESS_KEY }} make_zpkg_aws: - needs: - - start-runner - - setup-aws-runner uses: ./.github/workflows/_make_zpkg_aws.yml - with: - label: ${{ needs.start-runner.outputs.label }} - - # Stop the AWS runner - stop-runner: - needs: - - start-runner - - setup-aws-runner - - make_zpkg_aws - uses: ./.github/workflows/_stop_runner.yml - with: - label: ${{ needs.start-runner.outputs.label }} - ec2-instance-id: ${{ needs.start-runner.outputs.ec2-instance-id }} - secrets: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_REGION: ${{ secrets.AWS_REGION }} - GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} - + + # Python and hdl tests test: uses: ./.github/workflows/_test.yml - secrets: - VIVADO_S3_ACCESS_KEY_ID: ${{ secrets.VIVADO_S3_ACCESS_KEY_ID }} - VIVADO_S3_SECRET_ACCESS_KEY: ${{ secrets.VIVADO_S3_SECRET_ACCESS_KEY }} - # Conditionally undo final merge to main, given a job has failed + # Optional revert on failed push workflow undo: needs: [ make_boot, make_zpkg, make_zpkg_aws, test ] uses: ./.github/workflows/_undo.yml - + + # Release on push to tag release: - needs: [ make_boot, make_zpkg, make_zpkg_aws, test ] - uses: ./.github/workflows/_release.yml + needs: [ make_boot, make_zpkg, make_zpkg_aws, test ] + uses: ./.github/workflows/_release.yml \ No newline at end of file diff --git a/CONFIG.example b/CONFIG.example index 346420a14..7b6659d95 100644 --- a/CONFIG.example +++ b/CONFIG.example @@ -27,7 +27,8 @@ export ROOTFS_TOP = /rootfs export TAR_FILES = /tar-files # Path to root filesystem -PANDA_ROOTFS = /repos/PandABlocks-rootfs +# WORK_DIR can be ignored for local builds, explicitly set in CI +PANDA_ROOTFS = $(WORK_DIR)/repos/PandABlocks-rootfs # MAKE_ZPKG = $(PANDA_ROOTFS)/make-zpkg # Python interpreter for running scripts @@ -43,4 +44,4 @@ PANDA_ROOTFS = /repos/PandABlocks-rootfs # FPGA Application Name APP_NAME = PandABox-fmc_lback-sfp_lback -# vim: set filetype=make: +# vim: set filetype=make: \ No newline at end of file