Refactor E2E to use CustomPiOS multi-stage Docker build and reusable … #2289
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Image | |
| on: | |
| repository_dispatch: | |
| push: | |
| schedule: | |
| - cron: '0 0 * * *' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - board: raspberrypiarmhf | |
| arch: armhf | |
| - board: raspberrypiarm64 | |
| arch: arm64 | |
| steps: | |
| - name: Install Dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y coreutils p7zip-full qemu-user-static \ | |
| python3-git python3-yaml | |
| - name: Checkout CustomPiOS | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: 'guysoft/CustomPiOS' | |
| ref: devel | |
| path: CustomPiOS | |
| - name: Checkout Project Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: repository | |
| submodules: true | |
| - name: Update CustomPiOS Paths | |
| run: | | |
| cd repository/src | |
| ../../CustomPiOS/src/update-custompios-paths | |
| - name: Download Base Image | |
| run: | | |
| cd repository/src | |
| export DIST_PATH=$(pwd) | |
| export CUSTOM_PI_OS_PATH=$(cat custompios_path) | |
| export BASE_BOARD=${{ matrix.board }} | |
| $CUSTOM_PI_OS_PATH/base_image_downloader_wrapper.sh | |
| - name: Build Image | |
| run: | | |
| sudo modprobe loop | |
| cd repository/src | |
| sudo BASE_BOARD=${{ matrix.board }} bash -x ./build_dist | |
| - name: Copy output | |
| id: copy | |
| run: | | |
| source repository/src/config | |
| NOW=$(date +"%Y-%m-%d-%H%M") | |
| IMAGE="${NOW}-octopi-${DIST_VERSION}-${{ matrix.arch }}" | |
| cp repository/src/workspace/*.img ${IMAGE}.img | |
| echo "image=${IMAGE}" >> $GITHUB_OUTPUT | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: octopi-${{ matrix.arch }} | |
| path: ${{ steps.copy.outputs.image }}.img | |
| e2e-test: | |
| needs: build | |
| uses: guysoft/CustomPiOS/.github/workflows/e2e-test.yml@feature/e2e | |
| with: | |
| image-artifact-name: octopi-arm64 | |
| distro-name: OctoPi | |
| timeout-minutes: 45 |